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
--- 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;
}