Bug 994861. Only overlay scrollbars should be positioned and have z-index. r=roc
authorTimothy Nikkel <tnikkel@gmail.com>
Mon, 14 Apr 2014 13:16:30 -0500
changeset 196891 8e5f7f4427dfaec51e4d778ac0a73061c129e6ab
parent 196890 220e9d8b1454df524a8c198070846d7403f0c478
child 196892 a1b2bc9af7969e6353d0db9f69d405486fda4853
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs994861, 896443
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 994861. Only overlay scrollbars should be positioned and have z-index. r=roc Bug 896443 added these but didn't guard them on overlay scrollbars. When drawing the scrollbars layout interprets a positioned scrollbar as an scrollbar that should be placed above the content (like overlay scrollbars). Classic scrollbars should be drawn in the background layer.
toolkit/themes/osx/global/nativescrollbars.css
toolkit/themes/windows/global/xulscrollbars.css
--- a/toolkit/themes/osx/global/nativescrollbars.css
+++ b/toolkit/themes/osx/global/nativescrollbars.css
@@ -8,33 +8,33 @@
 scrollbar {
   -moz-appearance: scrollbar;
   -moz-binding: url(chrome://global/content/bindings/scrollbar.xml#scrollbar);
   cursor: default;
   background-color: white;
   pointer-events: auto;
 }
 
-scrollbar[root="true"] {
-  position: relative;
-  z-index: 2147483647; /* largest positive value of a signed 32-bit integer */
+@media all and (-moz-overlay-scrollbars) {
+  scrollbar[root="true"] {
+    position: relative;
+    z-index: 2147483647; /* largest positive value of a signed 32-bit integer */
+  }
+
+  scrollbar:not([active="true"]),
+  scrollbar[disabled="true"] {
+    visibility: hidden;
+  }
 }
 
 html|select[size]:not([size="0"]):not([size="1"]) > scrollbar,
 html|select[multiple] > scrollbar {
   -moz-appearance: scrollbar-small;
 }
 
-@media all and (-moz-overlay-scrollbars) {
-  scrollbar:not([active="true"]),
-  scrollbar[disabled="true"] {
-    visibility: hidden;
-  }
-}
-
 /* ..... track ..... */
 
 slider {
   -moz-appearance: scrollbartrack-horizontal;
 }
 
 slider[orient="vertical"] {
   -moz-appearance: scrollbartrack-vertical;
--- a/toolkit/themes/windows/global/xulscrollbars.css
+++ b/toolkit/themes/windows/global/xulscrollbars.css
@@ -14,33 +14,33 @@
 scrollbar {
   -moz-appearance: scrollbartrack-horizontal;
   -moz-binding: url("chrome://global/content/bindings/scrollbar.xml#scrollbar");
   cursor: default;
   background: url("chrome://global/skin/scrollbar/slider.gif") scrollbar;
   pointer-events: auto;
 }
 
-scrollbar[root="true"] {
-  position: relative;
-  z-index: 2147483647; /* largest positive value of a signed 32-bit integer */
+@media all and (-moz-overlay-scrollbars) {
+  scrollbar[root="true"] {
+    position: relative;
+    z-index: 2147483647; /* largest positive value of a signed 32-bit integer */
+  }
+
+  scrollbar:not([active="true"]),
+  scrollbar[disabled="true"] {
+    visibility: hidden;
+  }
 }
 
 scrollbar[orient="vertical"] 
 {
    -moz-appearance: scrollbartrack-vertical;
 }
 
-@media all and (-moz-overlay-scrollbars) {
-  scrollbar:not([active="true"]),
-  scrollbar[disabled="true"] {
-    visibility: hidden;
-  }
-}
-
 /* ::::: borders for thumb and buttons ::::: */
 
 thumb,
 scrollbarbutton {
   border: 2px solid;
   -moz-border-top-colors: ThreeDLightShadow ThreeDHighlight;
   -moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
   -moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;