Closed
Bug 926974
Opened 11 years ago
Closed 11 years ago
[markup view] Theme does not immediately apply after switching
Categories
(DevTools :: Inspector, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 27
People
(Reporter: bgrins, Assigned: bgrins)
Details
Attachments
(2 files)
244.45 KB,
image/png
|
Details | |
1.41 KB,
patch
|
paul
:
review+
|
Details | Diff | Splinter Review |
Steps to reproduce:
Open devtools
Open the inspector panel and note the theme applied to the markup view
Open the devtools settings
Switch the theme
Go back to inspector panel
Expected behavior:
The markup view's theme will have been updated
Actual behavior:
The markup view's theme is still the same as the old one.
This appears to have been triggered by Bug 918996, somehow related to this line:
window.matchMedia("(-moz-overlay-scrollbars)").matches
If this is replaced with either true or false, the theme switches as expected.
https://hg.mozilla.org/mozilla-central/rev/18e092a846a8#l2.12
Assignee | ||
Comment 1•11 years ago
|
||
theme-switching.js is throwing an exception the first time this is run on markup-view.xhtml in line 38 of theme-switching.js: https://hg.mozilla.org/mozilla-central/file/18e092a846a8/browser/devtools/shared/theme-switching.js#l38.
"TypeError: window.matchMedia(...) is null"
This is causing the markup view to not bind to the "pref-changed" event and causes the error. We could work around this issue using the hiddenDOMWindow instead of window. It seems like maybe this is this a bug in the implementation that we need to get fixed? According to https://developer.mozilla.org/en-US/docs/Web/API/window.matchMedia, this function should be returning a MediaQueryList, it doesn't specify any times that it should be returning null. The main difference with this one place where it fails is that it seems to be that it is running inside of an HTML window.
Here is a patch that works around the problem by using the hiddenDOMWindow. Should we go with this or deal with it some other way?
Attachment #817233 -
Flags: review?(paul)
Updated•11 years ago
|
Attachment #817233 -
Flags: review?(paul) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 2•11 years ago
|
||
Keywords: checkin-needed
Comment 3•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 27
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•