Bug 918996: Ensure that Responsive Design View always displays overlay scrollbars on OSX. r=paul

This commit is contained in:
Stephen Pohl 2013-09-26 11:33:50 -04:00
parent 099a37905e
commit 50b40b87f8
5 changed files with 44 additions and 2 deletions

View File

@ -116,6 +116,7 @@ function ResponsiveUI(aWindow, aTab)
this.container = aWindow.gBrowser.getBrowserContainer(this.browser);
this.stack = this.container.querySelector(".browserStack");
this._telemetry = new Telemetry();
this._floatingScrollbars = !this.mainWindow.matchMedia("(-moz-overlay-scrollbars)").matches;
// Try to load presets from prefs
@ -210,7 +211,6 @@ function ResponsiveUI(aWindow, aTab)
ResponsiveUI.prototype = {
_transitionsEnabled: true,
_floatingScrollbars: Services.appinfo.OS != "Darwin",
get transitionsEnabled() this._transitionsEnabled,
set transitionsEnabled(aValue) {
this._transitionsEnabled = aValue;

View File

@ -35,7 +35,7 @@
winUtils.loadSheet(newThemeUrl, winUtils.AUTHOR_SHEET);
// Floating scrollbars à la osx
if (Services.appinfo.OS != "Darwin") {
if (!window.matchMedia("(-moz-overlay-scrollbars)").matches) {
let scrollbarsUrl = Services.io.newURI(
DEVTOOLS_SKIN_URL + "floating-scrollbars-light.css", null, null);

View File

@ -0,0 +1,10 @@
/* vim:set ts=2 sw=2 sts=2 et: */
/* 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/. */
@import url("floating-scrollbars.css");
scrollbar thumb {
background-color: rgba(170,170,170,0.2) !important;
}

View File

@ -0,0 +1,30 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
scrollbar {
-moz-appearance: none;
position: relative;
background-color: transparent;
background-image: none;
border: 0px solid transparent;
z-index: 2147483647;
-moz-box-align: start;
padding: 2px;
}
scrollbar[orient="vertical"] {
-moz-margin-start: -8px;
min-width: 8px;
max-width: 8px;
}
scrollbar[orient="horizontal"] {
margin-top: -8px;
min-height: 8px;
max-height: 8px;
}
thumb {
-moz-appearance: none !important;
background-color: rgba(0,0,0,0.2);
border-radius: 3px;
}

View File

@ -288,6 +288,8 @@ browser.jar:
skin/classic/browser/devtools/debugger-step-in.png (devtools/debugger-step-in.png)
skin/classic/browser/devtools/debugger-step-out.png (devtools/debugger-step-out.png)
skin/classic/browser/devtools/debugger-step-over.png (devtools/debugger-step-over.png)
skin/classic/browser/devtools/floating-scrollbars.css (devtools/floating-scrollbars.css)
skin/classic/browser/devtools/floating-scrollbars-light.css (devtools/floating-scrollbars-light.css)
skin/classic/browser/devtools/responsive-se-resizer.png (devtools/responsive-se-resizer.png)
skin/classic/browser/devtools/responsive-vertical-resizer.png (devtools/responsive-vertical-resizer.png)
skin/classic/browser/devtools/responsive-horizontal-resizer.png (devtools/responsive-horizontal-resizer.png)