mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1050229 - Use matchMedia when computing the value for the windowsDefaultTheme reftest variable. r=ehsan
This commit is contained in:
parent
2e87873593
commit
00908ae029
@ -2,14 +2,6 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<?xml-stylesheet type="text/css" href="data:text/css,
|
||||
|
||||
%23_box_windowsDefaultTheme:-moz-system-metric(windows-default-theme) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
" ?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="recording-window"
|
||||
hidechrome="true"
|
||||
|
@ -689,11 +689,7 @@ function BuildConditionSandbox(aURL) {
|
||||
sandbox.haveTestPlugin = !!testPlugin && !gBrowserIsRemote;
|
||||
|
||||
// Set a flag on sandbox if the windows default theme is active
|
||||
var box = gContainingWindow.document.createElement("box");
|
||||
box.setAttribute("id", "_box_windowsDefaultTheme");
|
||||
gContainingWindow.document.documentElement.appendChild(box);
|
||||
sandbox.windowsDefaultTheme = (gContainingWindow.getComputedStyle(box, null).display == "none");
|
||||
gContainingWindow.document.documentElement.removeChild(box);
|
||||
sandbox.windowsDefaultTheme = gContainingWindow.matchMedia("(-moz-windows-default-theme)").matches;
|
||||
|
||||
var prefs = CC["@mozilla.org/preferences-service;1"].
|
||||
getService(CI.nsIPrefBranch);
|
||||
|
@ -2,14 +2,6 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<?xml-stylesheet type="text/css" href="data:text/css,
|
||||
|
||||
%23_box_windowsDefaultTheme:-moz-system-metric(windows-default-theme) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
" ?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="reftest-window"
|
||||
hidechrome="true"
|
||||
|
Loading…
Reference in New Issue
Block a user