Backed out changeset 78f117b43e0a (bug 1464785) for devtools failures on browser_parsable_css.js. CLOSED TREE

This commit is contained in:
Brindusan Cristian 2018-06-26 15:17:52 +03:00
Родитель 19dbb3ce5e
Коммит 6060756652
3 изменённых файлов: 18 добавлений и 23 удалений

Просмотреть файл

@ -89,24 +89,22 @@
loadEvents.push(loadPromise); loadEvents.push(loadPromise);
} }
if (os !== "win") { try {
// Windows always uses native scrollbars, other platforms might use custom floating const StylesheetUtils = require("devtools/shared/layout/utils");
// scrollbar implementation. const SCROLLBARS_URL = "chrome://devtools/skin/floating-scrollbars-dark-theme.css";
try {
const StylesheetUtils = require("devtools/shared/layout/utils"); // TODO: extensions might want to customize scrollbar styles too.
const SCROLLBARS_URL = "chrome://devtools/skin/floating-scrollbars-dark-theme.css"; if (!Services.appShell.hiddenDOMWindow
if (!Services.appShell.hiddenDOMWindow .matchMedia("(-moz-overlay-scrollbars)").matches) {
.matchMedia("(-moz-overlay-scrollbars)").matches) { if (newTheme == "dark") {
if (newTheme == "dark") { StylesheetUtils.loadSheet(window, SCROLLBARS_URL, "agent");
StylesheetUtils.loadSheet(window, SCROLLBARS_URL, "agent"); } else if (oldTheme == "dark") {
} else if (oldTheme == "dark") { StylesheetUtils.removeSheet(window, SCROLLBARS_URL, "agent");
StylesheetUtils.removeSheet(window, SCROLLBARS_URL, "agent");
}
forceStyle();
} }
} catch (e) { forceStyle();
console.warn("customize scrollbar styles is only supported in firefox");
} }
} catch (e) {
console.warn("customize scrollbar styles is only supported in firefox");
} }
Promise.all(loadEvents).then(() => { Promise.all(loadEvents).then(() => {

Просмотреть файл

@ -31,13 +31,6 @@
--monospace-font-family: monospace; --monospace-font-family: monospace;
} }
:root.theme-dark[platform="win"] {
/* Set colors for native scrollbars on Windows dark theme */
/* Other platforms support for scrollbar theming is Bug 1460109 */
scrollbar-face-color: var(--theme-body-color-inactive);
scrollbar-track-color: var(--theme-splitter-color);
}
.devtools-monospace { .devtools-monospace {
font-family: var(--monospace-font-family); font-family: var(--monospace-font-family);
} }

Просмотреть файл

@ -47,9 +47,13 @@
-moz-appearance: none !important; -moz-appearance: none !important;
} }
*|*:root[platform="win"] > scrollbar scrollbarbutton,
*|*:root[platform="linux"] > scrollbar scrollbarbutton, *|*:root[platform="linux"] > scrollbar scrollbarbutton,
*|*:root[platform="win"] > scrollbar gripper,
*|*:root[platform="linux"] > scrollbar gripper, *|*:root[platform="linux"] > scrollbar gripper,
*|*:root[platform="win"] *|*:not(html|select) > scrollbar scrollbarbutton,
*|*:root[platform="linux"] *|*:not(html|select) > scrollbar scrollbarbutton, *|*:root[platform="linux"] *|*:not(html|select) > scrollbar scrollbarbutton,
*|*:root[platform="win"] *|*:not(html|select) > scrollbar gripper,
*|*:root[platform="linux"] *|*:not(html|select) > scrollbar gripper { *|*:root[platform="linux"] *|*:not(html|select) > scrollbar gripper {
display: none; display: none;
} }