Fix typo in Color.jsm and ensure that consumers are updated to function properly
Categories
(Toolkit :: General, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox68 | --- | fixed |
People
(Reporter: mikedeboer, Assigned: mikedeboer)
References
Details
Attachments
(2 files)
ThunderBird devs over at bug 1534360 discovered that I made a typo in the relativeLuminance getter in our Color baseclass.
Apart from fixing that, I'll need to update its known consumers: browser.js, FinderHighlighter.jsm and ThunderBird's TagUtils.jsm.
| Assignee | ||
Updated•6 years ago
|
Comment 1•6 years ago
|
||
I'll gladly fix TB's consumer. You don't need to provide a patch.
| Assignee | ||
Comment 2•6 years ago
|
||
Since we rarely touch this code, I took the liberty of changing this to a JS class
and fix the contrast ratio calculations to actually conform to the WCAG spec,
instead of using arbitrary constants.
Is change the isBright getter to useBrightText, because that is more apt;
we're usually looking for an answer to 'should I use white text on this background?',
instead of looking for an arbitrary threshold to classify a color as being bright.
I updated the tests to cover more of this and clarified the assertion messages as
well.
| Assignee | ||
Comment 3•6 years ago
|
||
@Jorg K: with this patch, you should change the TB code to use useBrightText, which has the 0.179 constant baked in.
Comment 5•6 years ago
|
||
Richard, please r+ this. R? doesn't work in M-C bugs any more.
Comment 6•6 years ago
|
||
Comment 7•6 years ago
|
||
| bugherder | ||
Description
•