Closed Bug 1487476 Opened 2 years ago Closed 2 years ago

browser.xhtml: lightweight themes don't quite work (lwtheme and lwthemetextcolor attribute changes only work with XUL Documents)

Categories

(Firefox :: Theme, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 63
Tracking Status
firefox63 --- fixed

People

(Reporter: bgrins, Assigned: bgrins)

References

Details

Attachments

(1 file)

This can be tested by going to about:addons and applying a theme (customize mode doesn't seem to work and I'm guessing that's related to these issues).

See: https://searchfox.org/mozilla-central/source/dom/xul/nsXULElement.cpp#869-872,893-899.

Relevant stuff on XULDocument that can hopefully be hoisted up to Document or to top-level windows:

mDocLWTheme
virtual nsIDocument::DocumentTheme GetDocumentLWTheme() override;
virtual nsIDocument::DocumentTheme ThreadSafeGetDocumentLWTheme() const override;
void ResetDocumentLWTheme()
Flags: qe-verify-
Error when opening Customize Mode:

CustomizeMode: Error entering customize mode TypeError: "lwthemeIcon is null, can't access property "style" of it"
	_updateLWThemeButtonIcon resource:///modules/CustomizeMode.jsm:170:5
	enter resource:///modules/CustomizeMode.jsm:346:7
	enter resource:///modules/CustomizeMode.jsm:266:6
	setTab resource:///modules/CustomizeMode.jsm:203:7
	enter resource:///modules/CustomizeMode.jsm:237:7
	oncommand chrome://browser/content/browser.xhtml:1:1
Note: this requires `mk_add_options 'export MOZ_BROWSER_XHTML=1'` to reproduce.
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Comment on attachment 9005459 [details]
Bug 1487476 - Expose lightweight themes as chrome-only features on nsIDocument instead of XULDocument;r=smaug

Olli Pettay [:smaug] has approved the revision.
Attachment #9005459 - Flags: review+
Pushed by bgrinstead@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/414403195a4e
Expose lightweight themes as chrome-only features on nsIDocument instead of XULDocument;r=smaug
https://hg.mozilla.org/mozilla-central/rev/414403195a4e
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
You need to log in before you can comment on or make changes to this bug.