Closed Bug 1453035 Opened 7 years ago Closed 7 years ago

--lwt-text-color fallback doesn't work

Categories

(Toolkit :: Themes, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla62
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox59 --- unaffected
firefox60 --- unaffected
firefox61 + verified
firefox62 --- verified

People

(Reporter: ntim, Assigned: Gijs)

References

Details

(Keywords: regression)

Attachments

(1 file)

Is someone still available to fix this?
Flags: needinfo?(jaws)
Keywords: regression
Priority: -- → P1
Assignee: nobody → ntim.bugs
Flags: needinfo?(jaws)
Comment on attachment 8971176 [details] Bug 1453035 - Fix textcolor theme fallback. https://reviewboard.mozilla.org/r/239974/#review245714 ::: toolkit/modules/LightweightThemeConsumer.jsm:27 (Diff revision 1) > }], > ["--lwt-text-color", { > lwtProperty: "textcolor", > processColor(rgbaChannels, element) { > - if (!rgbaChannels) { > + if (!rgbaChannels || rgbaChannels.a == 0) { > element.removeAttribute("lwthemetextcolor"); So this means we could activate a lwtheme without setting --lwt-text-color and the lwthemetextcolor attribute. I don't think we want that. ::: toolkit/modules/LightweightThemeConsumer.jsm:33 (Diff revision 1) > return null; > } > const {r, g, b, a} = rgbaChannels; > const luminance = _getLuminance(r, g, b); > element.setAttribute("lwthemetextcolor", luminance <= 110 ? "dark" : "bright"); > - element.setAttribute("lwtheme", "true"); > + return `rgba(${r}, ${g}, ${b}, ${a})`; Can we just drop the alpha channel here?
Attachment #8971176 - Flags: review?(dao+bmo) → review-
Can we make sure this gets into 61?
Flags: needinfo?(ntim.bugs)
Can we find someone for this?
Flags: needinfo?(dao+bmo)
Flags: needinfo?(dao+bmo) → needinfo?(jaws)
See Also: → 1460287
A newer version of this patch is in bug 1460287 (and fixes both this bug and bug 1460287). Thanks Gijs!
Assignee: ntim.bugs → gijskruitbosch+bugs
Flags: needinfo?(ntim.bugs)
Flags: needinfo?(jaws)
Depends on: 1460287
Fixed in bug 1460287.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
needinfo? myself to provide manual testing instructions
Flags: needinfo?(ntim.bugs)
Testing instructions: 1. create a webextension with: "theme": { "colors": { "accentcolor": "orange", "textcolor": "transparent", }, } in the manifest. 2. check that the text color is black and not transparent
Flags: needinfo?(ntim.bugs)
Following steps from comment 9 I reproduced this issue using Fx 61.0a1 (20180410100115)on Windows 10 x64. I can confirm this issue is fixed, I verified using Fx 61.0 and Fx 62.0a1, on Windows 10 x64, mac os X 10.12.6 and Ubuntu 14.04 LTS.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: