mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1673132 - Use the -moz-default-appearance values "scrollbar-horizontal" and "scrollbar-vertical" on macOS and remove the now-unused value "scrollbar". r=emilio
Other platforms were already converted to scrollbar-horizontal and scrollbar-vertical in bug 1205643. Differential Revision: https://phabricator.services.mozilla.com/D94674
This commit is contained in:
parent
cb8968058f
commit
af68ac4a30
@ -268,7 +268,6 @@ exports.CSS_PROPERTIES = {
|
||||
"resizer",
|
||||
"resizerpanel",
|
||||
"revert",
|
||||
"scrollbar",
|
||||
"scrollbar-horizontal",
|
||||
"scrollbar-vertical",
|
||||
"scrollbarbutton-down",
|
||||
@ -1578,7 +1577,6 @@ exports.CSS_PROPERTIES = {
|
||||
"resizer",
|
||||
"resizerpanel",
|
||||
"revert",
|
||||
"scrollbar",
|
||||
"scrollbar-horizontal",
|
||||
"scrollbar-vertical",
|
||||
"scrollbarbutton-down",
|
||||
@ -3427,7 +3425,6 @@ exports.CSS_PROPERTIES = {
|
||||
"resizer",
|
||||
"resizerpanel",
|
||||
"revert",
|
||||
"scrollbar",
|
||||
"scrollbar-horizontal",
|
||||
"scrollbar-vertical",
|
||||
"scrollbarbutton-down",
|
||||
|
@ -1641,9 +1641,6 @@ pub enum Appearance {
|
||||
/// The resizer itself.
|
||||
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||
Resizer,
|
||||
/// A scrollbar.
|
||||
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||
Scrollbar,
|
||||
/// The scrollbar slider
|
||||
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||
ScrollbarHorizontal,
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
scrollbar {
|
||||
appearance: auto;
|
||||
-moz-default-appearance: scrollbar;
|
||||
-moz-default-appearance: scrollbar-horizontal;
|
||||
cursor: default;
|
||||
background-color: white;
|
||||
}
|
||||
@ -29,6 +29,11 @@ html|select[multiple] {
|
||||
}
|
||||
}
|
||||
|
||||
scrollbar[orient="vertical"] {
|
||||
appearance: auto;
|
||||
-moz-default-appearance: scrollbar-vertical;
|
||||
}
|
||||
|
||||
/* ..... track ..... */
|
||||
|
||||
slider {
|
||||
|
@ -55,7 +55,8 @@ LayoutDeviceIntSize ScrollbarDrawingMac::GetMinimumWidgetSize(
|
||||
return IntSize{26, 0};
|
||||
case StyleAppearance::ScrollbarthumbVertical:
|
||||
return IntSize{0, 26};
|
||||
case StyleAppearance::Scrollbar:
|
||||
case StyleAppearance::ScrollbarVertical:
|
||||
case StyleAppearance::ScrollbarHorizontal:
|
||||
case StyleAppearance::ScrollbartrackVertical:
|
||||
case StyleAppearance::ScrollbartrackHorizontal: {
|
||||
if (nsLookAndFeel::GetInt(LookAndFeel::IntID::UseOverlayScrollbars) !=
|
||||
|
@ -2798,7 +2798,8 @@ Maybe<nsNativeThemeCocoa::WidgetInfo> nsNativeThemeCocoa::ComputeWidgetInfo(
|
||||
break;
|
||||
}
|
||||
|
||||
case StyleAppearance::Scrollbar:
|
||||
case StyleAppearance::ScrollbarHorizontal:
|
||||
case StyleAppearance::ScrollbarVertical:
|
||||
break;
|
||||
case StyleAppearance::ScrollbarthumbVertical:
|
||||
case StyleAppearance::ScrollbarthumbHorizontal:
|
||||
@ -3676,7 +3677,8 @@ nsNativeThemeCocoa::GetMinimumWidgetSize(nsPresContext* aPresContext, nsIFrame*
|
||||
|
||||
case StyleAppearance::ScrollbarthumbHorizontal:
|
||||
case StyleAppearance::ScrollbarthumbVertical:
|
||||
case StyleAppearance::Scrollbar:
|
||||
case StyleAppearance::ScrollbarHorizontal:
|
||||
case StyleAppearance::ScrollbarVertical:
|
||||
case StyleAppearance::ScrollbartrackVertical:
|
||||
case StyleAppearance::ScrollbartrackHorizontal:
|
||||
case StyleAppearance::ScrollbarbuttonUp:
|
||||
@ -3859,7 +3861,8 @@ bool nsNativeThemeCocoa::ThemeSupportsWidget(nsPresContext* aPresContext, nsIFra
|
||||
|
||||
case StyleAppearance::Range:
|
||||
|
||||
case StyleAppearance::Scrollbar:
|
||||
case StyleAppearance::ScrollbarHorizontal:
|
||||
case StyleAppearance::ScrollbarVertical:
|
||||
case StyleAppearance::ScrollbarbuttonUp:
|
||||
case StyleAppearance::ScrollbarbuttonDown:
|
||||
case StyleAppearance::ScrollbarbuttonLeft:
|
||||
@ -4041,7 +4044,8 @@ nsITheme::Transparency nsNativeThemeCocoa::GetWidgetTransparency(nsIFrame* aFram
|
||||
case StyleAppearance::Dialog:
|
||||
return eTransparent;
|
||||
|
||||
case StyleAppearance::Scrollbar:
|
||||
case StyleAppearance::ScrollbarHorizontal:
|
||||
case StyleAppearance::ScrollbarVertical:
|
||||
case StyleAppearance::Scrollcorner: {
|
||||
// We don't use custom scrollbars when using overlay scrollbars.
|
||||
if (nsLookAndFeel::UseOverlayScrollbars()) {
|
||||
|
@ -44,7 +44,6 @@ nsNativeBasicThemeGTK::GetMinimumWidgetSize(nsPresContext* aPresContext,
|
||||
uint32_t dpiRatio = GetDPIRatio(aFrame);
|
||||
|
||||
switch (aAppearance) {
|
||||
case StyleAppearance::Scrollbar:
|
||||
case StyleAppearance::ScrollbarVertical:
|
||||
case StyleAppearance::ScrollbarHorizontal:
|
||||
case StyleAppearance::ScrollbarbuttonUp:
|
||||
|
@ -1864,7 +1864,6 @@ nsNativeThemeGTK::ThemeSupportsWidget(nsPresContext* aPresContext,
|
||||
case StyleAppearance::SpinnerUpbutton:
|
||||
case StyleAppearance::SpinnerDownbutton:
|
||||
case StyleAppearance::SpinnerTextfield:
|
||||
// case StyleAppearance::Scrollbar: (n/a for gtk)
|
||||
case StyleAppearance::ScrollbarbuttonUp:
|
||||
case StyleAppearance::ScrollbarbuttonDown:
|
||||
case StyleAppearance::ScrollbarbuttonLeft:
|
||||
|
@ -1368,7 +1368,6 @@ nsNativeBasicTheme::GetMinimumWidgetSize(nsPresContext* aPresContext,
|
||||
aResult->width =
|
||||
static_cast<uint32_t>(kMinimumSpinnerButtonWidth) * dpiRatio;
|
||||
break;
|
||||
case StyleAppearance::Scrollbar:
|
||||
case StyleAppearance::ScrollbarVertical:
|
||||
case StyleAppearance::ScrollbarHorizontal:
|
||||
case StyleAppearance::ScrollbarbuttonUp:
|
||||
|
@ -658,7 +658,6 @@ bool nsNativeTheme::IsDarkBackground(nsIFrame* aFrame) {
|
||||
|
||||
bool nsNativeTheme::IsWidgetScrollbarPart(StyleAppearance aAppearance) {
|
||||
switch (aAppearance) {
|
||||
case StyleAppearance::Scrollbar:
|
||||
case StyleAppearance::ScrollbarVertical:
|
||||
case StyleAppearance::ScrollbarHorizontal:
|
||||
case StyleAppearance::ScrollbarbuttonUp:
|
||||
|
@ -708,7 +708,6 @@ mozilla::Maybe<nsUXThemeClass> nsNativeThemeWin::GetThemeClass(
|
||||
case StyleAppearance::Tabpanel:
|
||||
case StyleAppearance::Tabpanels:
|
||||
return Some(eUXTab);
|
||||
case StyleAppearance::Scrollbar:
|
||||
case StyleAppearance::ScrollbarVertical:
|
||||
case StyleAppearance::ScrollbarHorizontal:
|
||||
case StyleAppearance::ScrollbarbuttonUp:
|
||||
@ -1111,7 +1110,6 @@ nsresult nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame,
|
||||
case StyleAppearance::MozWinCommunicationsToolbox:
|
||||
case StyleAppearance::MozWinBrowsertabbarToolbox:
|
||||
case StyleAppearance::Statusbar:
|
||||
case StyleAppearance::Scrollbar:
|
||||
case StyleAppearance::Scrollcorner: {
|
||||
aState = 0;
|
||||
aPart = RP_BACKGROUND;
|
||||
@ -2315,7 +2313,6 @@ nsNativeThemeWin::GetMinimumWidgetSize(nsPresContext* aPresContext,
|
||||
return rv;
|
||||
}
|
||||
|
||||
case StyleAppearance::Scrollbar:
|
||||
case StyleAppearance::Scrollcorner: {
|
||||
if (nsLookAndFeel::GetInt(nsLookAndFeel::IntID::UseOverlayScrollbars) !=
|
||||
0) {
|
||||
@ -2617,7 +2614,8 @@ nsITheme::Transparency nsNativeThemeWin::GetWidgetTransparency(
|
||||
}
|
||||
|
||||
switch (aAppearance) {
|
||||
case StyleAppearance::Scrollbar:
|
||||
case StyleAppearance::ScrollbarHorizontal:
|
||||
case StyleAppearance::ScrollbarVertical:
|
||||
case StyleAppearance::Scrollcorner:
|
||||
case StyleAppearance::Statusbar:
|
||||
// Knowing that scrollbars and statusbars are opaque improves
|
||||
|
Loading…
Reference in New Issue
Block a user