59 bytes, text/x-review-board-request
Reset clears my styles to native which is super useful, however I then have to calculate all the visible windows again. If I could pass a windowId to browser.theme.reset() this would be simpler and less janky.
Severity: normal → enhancement
status-firefox57: affected → wontfix
Priority: -- → P5
As mentioned on irc the current code doesn't work with reset. I created a branch here: https://github.com/jonathanKingston/containers-theme/tree/reset-theme This currently works across containers, however when you change to a default tab it will retain the containers theme. :ntim I can double check the code works when you have a patch (which it sounds like you have).
Flags: needinfo?(jkt) → needinfo?(ntim.bugs)
Seems to work, thanks!
I think this can be considered for 57, as the patch is pretty straightforward and low-risk.
status-firefox57: wontfix → affected
Comment on attachment 8913738 [details] Bug 1401691 - Accept windowId parameter for browser.theme.reset(). https://reviewboard.mozilla.org/r/185126/#review190294
Attachment #8913738 - Flags: review?(jaws) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/55e00fb0f00b Accept windowId parameter for browser.theme.reset(). r=jaws
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox58: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Comment on attachment 8913738 [details] Bug 1401691 - Accept windowId parameter for browser.theme.reset(). Approval Request Comment [Feature/Bug causing the regression]: bug 1342712 [User impact if declined]: None for users, but the API introduced in bug 1342712 will be incomplete, as its equivalent for reset() won't be supported [Is this code covered by automated tests?]: No [Has the fix been verified in Nightly?]: not yet [Needs manual test from QE? If yes, steps to reproduce]: no [List of other uplifts needed for the feature/fix]: none [Is the change risky?]: no [Why is the change risky/not risky?]: Straightforward JS changes, that have the same logic as bug 1342712, which has been well tested. [String changes made/needed]: none
Attachment #8913738 - Flags: approval-mozilla-beta?
:jkt, can you please verify that this works for your add-on in Nightly ? Thanks!
I can confirm that the patch in Nightly now works with the branch that I made, thank you!
What kind of extension would use this? By the way, there is no test?
(In reply to Sylvestre Ledru [:sylvestre] from comment #11) > What kind of extension would use this? Theme related extensions: VivaldiFox (I'm working on a port for 57 atm), Containers theme. > By the way, there is no test? Both bug 1342712 and this bug don't have testing coverage, since I landed those in a rush to be able to port my own extensions in time for 57. I do plan to add tests later separately though.
Comment on attachment 8913738 [details] Bug 1401691 - Accept windowId parameter for browser.theme.reset(). OK, taking it to help theme support. Tim, please report a new bug to make sure we don't forget about adding tests. Thanks
Attachment #8913738 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Thanks! Filed bug 1404855 for tests
status-firefox57: affected → fixed
Updated doc (thanks ntim): https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/theme/reset
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.