Bug 1373739 - Apply thumb styles directly to their orientation variants. r?mossop draft
authorMichael Smith <michael@spinda.net>
Thu, 22 Jun 2017 17:45:50 -0700
changeset 620646 546ac22e03f8ae6e9ad934ce1b11c414c7854cb2
parent 620645 df073d68225b28d8da4385b5c5aa2835aabe912e
child 620647 f5d95ec725b32259fd18561678d4dc5493a04f97
push id72121
push userbmo:lists@spinda.net
push dateThu, 03 Aug 2017 18:54:01 +0000
reviewersmossop
bugs1373739
milestone56.0a1
Bug 1373739 - Apply thumb styles directly to their orientation variants. r?mossop Previously the min-height style from vertical thumbs was allowed to cascade down to horizontal thumbs. This caused broken scrollbar sizing behavior when running without a native (platform/widget toolkit) theme: horizontal scrollbars would have a non-zero height and width while vertical scrollbars would have a zero width and non-zero height. This broke one of the web platform tests in headless mode (/intersection-observer/root-margin.html). MozReview-Commit-ID: 4Y3jz77Z0UA
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
@@ -36,22 +36,22 @@ slider {
 }
 
 slider[orient="vertical"] {
   -moz-appearance: scrollbartrack-vertical;
 }
 
 /* ..... thumb ..... */
 
-thumb {
-  -moz-appearance: scrollbarthumb-horizontal;
+thumb[orient="vertical"] {
+  -moz-appearance: scrollbarthumb-vertical;
 }
 
-thumb[orient="vertical"] {
-  -moz-appearance: scrollbarthumb-vertical;
+thumb[orient="horizontal"] {
+  -moz-appearance: scrollbarthumb-horizontal;
 }
 
 /* ..... increment ..... */
 
 scrollbarbutton[type="increment"] {
   -moz-appearance: scrollbarbutton-right;
 }
 
--- a/toolkit/themes/windows/global/xulscrollbars.css
+++ b/toolkit/themes/windows/global/xulscrollbars.css
@@ -39,17 +39,17 @@ slider {
 }
 
 slider[orient="vertical"] {
   -moz-appearance: scrollbartrack-vertical;
 }
 
 /* ::::: thumb (horizontal) ::::: */
 
-thumb {
+thumb[orient="vertical"] {
   -moz-appearance: scrollbarthumb-vertical;
   min-height: 8px;
 }
 
 thumb[orient="horizontal"] {
   -moz-appearance: scrollbarthumb-horizontal;
   min-width: 8px;
 }