[MSU Capstone] Port LightweightThemeChild to JSWindowActors
Categories
(WebExtensions :: Themes, task)
Tracking
(Fission Milestone:M5, firefox72 verified)
Tracking | Status | |
---|---|---|
firefox72 | --- | verified |
People
(Reporter: mconley, Assigned: jahnsjam)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Implemented here: https://searchfox.org/mozilla-central/rev/b2b0077c2e6a516a76bf8077d6f0237c58f5959a/browser/actors/LightweightThemeChild.jsm
Registered here: https://searchfox.org/mozilla-central/rev/b2b0077c2e6a516a76bf8077d6f0237c58f5959a/browser/components/BrowserGlue.jsm#317-325
Interestingly, this actor doesn't actually do any cross-process communication directly. It's job is to attach itself to about:home, about:newtab and about:welcome, and check the Services.cpmm.sharedData
structure for any theme data to apply, and then sends a special event down to content to apply that data.
There are two other things to note:
- Sidebars use this actor as well, but do so in a really strange way - the sidebars for Sync'd Tabs, History and Bookmarks manually instantiate the LightweightThemeChild actor and mock out a dispatcher rather than relying on the underlying ActorManagerChild thing to do it for them. I guess this is because there's no ActorManagerChild for these sidebars, since those sidebars actually run in the parent process. I suspect we can probably add the bookmarks and history URIs to the matches: registration for the JSWindowActor implementation, and set the
includeChrome
property to true in the registration as well, and I think then we can have LightweightThemeChild be instantiated in the "normal" lazy fashion like with about:* pages, instead of manually doing it like we do here.
For reference, the URIs for the sync'd tabs, history and bookmark sidebar pages are:
chrome://browser/content/syncedtabs/sidebar.xhtml
and
chrome://browser/content/places/historySidebar.xul
and
chrome://browser/content/places/bookmarksSidebar.xul
- The
Services.cpmm.sharedData
is keyed on a special identifier,chromeOuterWindowID
, that represents which window a particular Actor is within. This is because each browser window can be themed differently. I suspect until we figure out a way of makingchromeOuterWindowID
available on aBrowsingContext
, we should keep getting it off of the message manager. So for now, in the port, let's access the message manager'schromeOuterWindowID
like so:
this.docShell.messageManager.chromeOuterWindowID
.
Assignee | ||
Comment 1•5 years ago
|
||
r=mconley, gijs, barret
Reporter | ||
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Tentatively moving all bugs whose summaries mention "Fission" (or other Fission-related keywords) but are not assigned to a Fission Milestone to the "?" triage milestone.
This will generate a lot of bugmail, so you can filter your bugmail for the following UUID and delete them en masse:
0ee3c76a-bc79-4eb2-8d12-05dc0b68e732
Updated•5 years ago
|
Comment 4•5 years ago
|
||
bugherder |
Comment 5•5 years ago
|
||
Hello,
Will this fix require manual validation? If yes, please provide some steps to reproduce in order to correctly test it and also, please set the "qe-verify+" flag. Otherwise, could the "qe-verify-" flag be added? Thanks!
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
Hello,
"qe-verify+" has been set.
In particular, testing application of the theme to the history/bookmarks sidebar is desired.
To view the sidebar, press the Sidebar icon in the top left, or press Ctrl+B.
Here's some themes to test with:
-Firefox Menu > Customize... , then in the bottom bar switch to Dark Theme
-unofficial themes like https://addons.mozilla.org/en-US/firefox/addon/matte-black-red/ or https://addons.mozilla.org/en-US/firefox/addon/gradient-orange-blue , which should affect the sidebar
Comment 7•5 years ago
|
||
Hello,
Verified the fix on the latest Beta (72.0b3/20191205201734) and Nightly (73.0a1/20191205215330) under Windows 10 Pro 64-bit and Ubuntu 18.04.
The proposed themes to test the fix are properly applied to the bookmarks/history sidebar, confirming the fix.
Description
•