Open Bug 1111047 Opened 10 years ago Updated 2 years ago

Improve theme switching in devtools toolbox

Categories

(DevTools :: Framework, defect)

37 Branch
x86
macOS
defect

Tracking

(Not tracked)

People

(Reporter: jsantell, Unassigned)

References

Details

From bgrins from bug 1110952#c4 [1]: We should probably just change how this works from the gDevTools / toolbox level. Right now the theme-switching.js file waits for a gDevTools notification (that only gets fired from the options panel): http://dxr.mozilla.org/mozilla-central/source/browser/devtools/shared/theme-switching.js#115. This has the disadvantage of: 1) Extra boilerplate for stuff like this 2) The toolbox doesn't actually switch themes when the pref is changed through about:config I'd suggest that we add a normal pref listener in gDevTools for the theme that emits the pref-changed handler on itself, then modify the options panel entry to not emit the event so that we don't emit twice. Then all we would need to do for tests is set the pref. Not positive if this refactor would break existing tests that rely on the buggy behavior in 2, but it would make this more straightforward. [1]https://bugzilla.mozilla.org/show_bug.cgi?id=1110952#c4
This is blocking a configuration in mozscreenshots: https://github.com/mnoorenberghe/mozscreenshots/issues/25
Blocks: 1169993
No longer blocks: 1169993
See Also: → 1169993
See Also: → 1212975
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.