Bug 1471162 - Stop using fake floating scrollbar in OSX dark theme;r=pbro draft
authorJulian Descottes <jdescottes@mozilla.com>
Thu, 28 Jun 2018 12:24:46 +0200
changeset 812665 af1196714bdda62acf289d624de6b4c84053d016
parent 812438 cc8c21478e6ca403629e91d22efbd398b08c9a14
child 812666 6291c64f72fc33a4ecb99130085410b1d09628cf
push id114627
push userjdescottes@mozilla.com
push dateFri, 29 Jun 2018 19:05:30 +0000
reviewerspbro
bugs1471162
milestone63.0a1
Bug 1471162 - Stop using fake floating scrollbar in OSX dark theme;r=pbro MozReview-Commit-ID: 8nFpHCWojYC
devtools/client/shared/theme-switching.js
devtools/client/themes/dark-theme.css
--- a/devtools/client/shared/theme-switching.js
+++ b/devtools/client/shared/theme-switching.js
@@ -84,18 +84,18 @@
 
     const loadEvents = [];
     for (const url of newThemeDef.stylesheets) {
       const {styleSheet, loadPromise} = appendStyleSheet(document, url);
       devtoolsStyleSheets.get(newThemeDef).push(styleSheet);
       loadEvents.push(loadPromise);
     }
 
-    if (os !== "win") {
-      // Windows always uses native scrollbars, other platforms still use custom floating
+    if (os !== "win" && os !== "mac") {
+      // Windows & Mac always use native scrollbars, Linux still uses custom floating
       // scrollbar implementation.
       try {
         const StylesheetUtils = require("devtools/shared/layout/utils");
         const SCROLLBARS_URL = "chrome://devtools/skin/floating-scrollbars-dark-theme.css";
         if (!Services.appShell.hiddenDOMWindow
           .matchMedia("(-moz-overlay-scrollbars)").matches) {
           if (newTheme == "dark") {
             StylesheetUtils.loadSheet(window, SCROLLBARS_URL, "agent");
--- a/devtools/client/themes/dark-theme.css
+++ b/devtools/client/themes/dark-theme.css
@@ -22,17 +22,18 @@ body {
   color: var(--theme-toolbar-color);
 }
 
 ::-moz-selection {
   background-color: var(--theme-selection-background);
   color: var(--theme-selection-color);
 }
 
-:root[platform="win"] {
+:root[platform="win"],
+:root[platform="mac"] {
   /* 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);
 }
 
 .theme-selected,
 .CodeMirror-hint-active {