diff --git a/devtools/shared/css/generated/properties-db.js b/devtools/shared/css/generated/properties-db.js index ceb11551c438..60ee7b3b8a57 100644 --- a/devtools/shared/css/generated/properties-db.js +++ b/devtools/shared/css/generated/properties-db.js @@ -265,8 +265,6 @@ exports.CSS_PROPERTIES = { "radiomenuitem", "range", "range-thumb", - "resizer", - "resizerpanel", "revert", "revert-layer", "scrollbar-horizontal", @@ -288,7 +286,6 @@ exports.CSS_PROPERTIES = { "spinner-upbutton", "splitter", "statusbar", - "statusbarpanel", "tab", "tab-scroll-arrow-back", "tab-scroll-arrow-forward", @@ -1538,8 +1535,6 @@ exports.CSS_PROPERTIES = { "radiomenuitem", "range", "range-thumb", - "resizer", - "resizerpanel", "revert", "revert-layer", "scrollbar-horizontal", @@ -1561,7 +1556,6 @@ exports.CSS_PROPERTIES = { "spinner-upbutton", "splitter", "statusbar", - "statusbarpanel", "tab", "tab-scroll-arrow-back", "tab-scroll-arrow-forward", @@ -3592,8 +3586,6 @@ exports.CSS_PROPERTIES = { "radiomenuitem", "range", "range-thumb", - "resizer", - "resizerpanel", "revert", "revert-layer", "scrollbar-horizontal", @@ -3615,7 +3607,6 @@ exports.CSS_PROPERTIES = { "spinner-upbutton", "splitter", "statusbar", - "statusbarpanel", "tab", "tab-scroll-arrow-back", "tab-scroll-arrow-forward", diff --git a/layout/reftests/native-theme/reftest.list b/layout/reftests/native-theme/reftest.list index 54669e191a5b..50ad52be0f10 100644 --- a/layout/reftests/native-theme/reftest.list +++ b/layout/reftests/native-theme/reftest.list @@ -44,21 +44,10 @@ fails-if(Android&&!asyncPan) != 492155-4.html about:blank # RTL mirroring tests == checkbox-not-mirrored-when-rtl.html checkbox-not-mirrored-when-rtl-ref.html -!= chrome://reftest/content/native-theme/resizer-bottomend.xhtml chrome://reftest/content/native-theme/blank-window.xhtml -random-if(d2d) == chrome://reftest/content/native-theme/resizer-bottomend.xhtml chrome://reftest/content/native-theme/resizer-bottomright.xhtml # bug 581086 -!= chrome://reftest/content/native-theme/resizer-bottomend.xhtml chrome://reftest/content/native-theme/resizer-bottomend-rtl.xhtml -# Disabled on Linux (bug 519152), random on Windows (bug 581086) -skip-if(gtkWidget) != chrome://reftest/content/native-theme/resizer-bottomend-rtl.xhtml chrome://reftest/content/native-theme/blank-window.xhtml -skip-if(gtkWidget) random-if(d2d) == chrome://reftest/content/native-theme/resizer-bottomend-rtl.xhtml chrome://reftest/content/native-theme/resizer-bottomend-flipped.xhtml -skip-if(gtkWidget) == chrome://reftest/content/native-theme/resizer-bottomleft-rtl.xhtml chrome://reftest/content/native-theme/resizer-bottomleft.xhtml -skip-if(gtkWidget) == chrome://reftest/content/native-theme/resizer-bottomright-rtl.xhtml chrome://reftest/content/native-theme/resizer-bottomright.xhtml - -!= chrome://reftest/content/native-theme/resizer-bottomstart.xhtml chrome://reftest/content/native-theme/blank-window.xhtml -random-if(d2d) == chrome://reftest/content/native-theme/resizer-bottomstart.xhtml chrome://reftest/content/native-theme/resizer-bottomleft.xhtml -random-if(d2d) == chrome://reftest/content/native-theme/resizer-bottomstart.xhtml chrome://reftest/content/native-theme/resizer-left.xhtml -!= chrome://reftest/content/native-theme/resizer-bottomstart.xhtml chrome://reftest/content/native-theme/resizer-bottomstart-rtl.xhtml -skip-if(gtkWidget) != chrome://reftest/content/native-theme/resizer-bottomstart-rtl.xhtml chrome://reftest/content/native-theme/blank-window.xhtml -skip-if(gtkWidget) random-if(d2d) == chrome://reftest/content/native-theme/resizer-bottomstart-rtl.xhtml chrome://reftest/content/native-theme/resizer-bottomend.xhtml +!= chrome://reftest/content/native-theme/resizer-bottomleft.xhtml chrome://reftest/content/native-theme/blank-window.xhtml +== chrome://reftest/content/native-theme/resizer-bottomleft-rtl.xhtml chrome://reftest/content/native-theme/resizer-bottomleft.xhtml +!= chrome://reftest/content/native-theme/resizer-bottomright.xhtml chrome://reftest/content/native-theme/blank-window.xhtml +== chrome://reftest/content/native-theme/resizer-bottomright-rtl.xhtml chrome://reftest/content/native-theme/resizer-bottomright.xhtml # Windows-only, depends on native scrollbar metrics skip-if(!winWidget) == scroll-thumb-minimum-size-notheme.html scroll-thumb-minimum-size-notheme-ref.html diff --git a/layout/reftests/native-theme/resizer-bottomend-flipped.xhtml b/layout/reftests/native-theme/resizer-bottomend-flipped.xhtml deleted file mode 100644 index 513ead7b63fc..000000000000 --- a/layout/reftests/native-theme/resizer-bottomend-flipped.xhtml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/layout/reftests/native-theme/resizer-bottomend-rtl.xhtml b/layout/reftests/native-theme/resizer-bottomend-rtl.xhtml deleted file mode 100644 index 89cec8a2c3f6..000000000000 --- a/layout/reftests/native-theme/resizer-bottomend-rtl.xhtml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/layout/reftests/native-theme/resizer-bottomend.xhtml b/layout/reftests/native-theme/resizer-bottomend.xhtml deleted file mode 100644 index a6023ce68017..000000000000 --- a/layout/reftests/native-theme/resizer-bottomend.xhtml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/layout/reftests/native-theme/resizer-bottomstart-rtl.xhtml b/layout/reftests/native-theme/resizer-bottomstart-rtl.xhtml deleted file mode 100644 index bfcd0f274176..000000000000 --- a/layout/reftests/native-theme/resizer-bottomstart-rtl.xhtml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/layout/reftests/native-theme/resizer-bottomstart.xhtml b/layout/reftests/native-theme/resizer-bottomstart.xhtml deleted file mode 100644 index 30fad8e7bcc5..000000000000 --- a/layout/reftests/native-theme/resizer-bottomstart.xhtml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/layout/reftests/xul/reftest.list b/layout/reftests/xul/reftest.list index 13880f1a12bc..7a753e7e4c6e 100644 --- a/layout/reftests/xul/reftest.list +++ b/layout/reftests/xul/reftest.list @@ -73,20 +73,3 @@ skip == chrome://reftest/content/xul/treecell-image-svg-1b.xhtml chrome://reftes test-pref(svg.context-properties.content.enabled,true) fuzzy(0-26,0-2) == chrome://reftest/content/xul/treetwisty-svg-context-paint-1.xhtml chrome://reftest/content/xul/treetwisty-svg-context-paint-1-ref.xhtml == chrome://reftest/content/xul/tree-scrollbar-height-change.xhtml chrome://reftest/content/xul/tree-scrollbar-height-change-ref.xhtml - -# resizer (non-native-themed) - -!= chrome://reftest/content/xul/resizer-bottomend.xhtml chrome://reftest/content/xul/blank-window.xhtml -== chrome://reftest/content/xul/resizer-bottomend.xhtml chrome://reftest/content/xul/resizer-bottomright.xhtml -!= chrome://reftest/content/xul/resizer-bottomend.xhtml chrome://reftest/content/xul/resizer-bottomend-rtl.xhtml -!= chrome://reftest/content/xul/resizer-bottomend-rtl.xhtml chrome://reftest/content/xul/blank-window.xhtml -== chrome://reftest/content/xul/resizer-bottomend-rtl.xhtml chrome://reftest/content/xul/resizer-bottomend-flipped.xhtml -== chrome://reftest/content/xul/resizer-bottomleft-rtl.xhtml chrome://reftest/content/xul/resizer-bottomleft.xhtml -== chrome://reftest/content/xul/resizer-bottomright-rtl.xhtml chrome://reftest/content/xul/resizer-bottomright.xhtml - -!= chrome://reftest/content/xul/resizer-bottomstart.xhtml chrome://reftest/content/xul/blank-window.xhtml -== chrome://reftest/content/xul/resizer-bottomstart.xhtml chrome://reftest/content/xul/resizer-bottomleft.xhtml -== chrome://reftest/content/xul/resizer-bottomstart.xhtml chrome://reftest/content/xul/resizer-left.xhtml -!= chrome://reftest/content/xul/resizer-bottomstart.xhtml chrome://reftest/content/xul/resizer-bottomstart-rtl.xhtml -!= chrome://reftest/content/xul/resizer-bottomstart-rtl.xhtml chrome://reftest/content/xul/blank-window.xhtml -== chrome://reftest/content/xul/resizer-bottomstart-rtl.xhtml chrome://reftest/content/xul/resizer-bottomend.xhtml diff --git a/layout/reftests/xul/resizer-bottomend-flipped.xhtml b/layout/reftests/xul/resizer-bottomend-flipped.xhtml deleted file mode 100644 index e82531969f44..000000000000 --- a/layout/reftests/xul/resizer-bottomend-flipped.xhtml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/layout/reftests/xul/resizer-bottomend-rtl.xhtml b/layout/reftests/xul/resizer-bottomend-rtl.xhtml deleted file mode 100644 index 04169aeb1108..000000000000 --- a/layout/reftests/xul/resizer-bottomend-rtl.xhtml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/layout/reftests/xul/resizer-bottomend.xhtml b/layout/reftests/xul/resizer-bottomend.xhtml deleted file mode 100644 index c8a5a3c90f37..000000000000 --- a/layout/reftests/xul/resizer-bottomend.xhtml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/layout/reftests/xul/resizer-bottomleft-rtl.xhtml b/layout/reftests/xul/resizer-bottomleft-rtl.xhtml deleted file mode 100644 index a9a1d88dc2bd..000000000000 --- a/layout/reftests/xul/resizer-bottomleft-rtl.xhtml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/layout/reftests/xul/resizer-bottomleft.xhtml b/layout/reftests/xul/resizer-bottomleft.xhtml deleted file mode 100644 index fca43d53cb26..000000000000 --- a/layout/reftests/xul/resizer-bottomleft.xhtml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/layout/reftests/xul/resizer-bottomright-rtl.xhtml b/layout/reftests/xul/resizer-bottomright-rtl.xhtml deleted file mode 100644 index f38591d441bb..000000000000 --- a/layout/reftests/xul/resizer-bottomright-rtl.xhtml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/layout/reftests/xul/resizer-bottomright.xhtml b/layout/reftests/xul/resizer-bottomright.xhtml deleted file mode 100644 index f3f5061ed192..000000000000 --- a/layout/reftests/xul/resizer-bottomright.xhtml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/layout/reftests/xul/resizer-bottomstart-rtl.xhtml b/layout/reftests/xul/resizer-bottomstart-rtl.xhtml deleted file mode 100644 index 78af428cf7f3..000000000000 --- a/layout/reftests/xul/resizer-bottomstart-rtl.xhtml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/layout/reftests/xul/resizer-bottomstart.xhtml b/layout/reftests/xul/resizer-bottomstart.xhtml deleted file mode 100644 index 5608a7ecf54a..000000000000 --- a/layout/reftests/xul/resizer-bottomstart.xhtml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/layout/reftests/xul/resizer-left.xhtml b/layout/reftests/xul/resizer-left.xhtml deleted file mode 100644 index 6e02b2f43da6..000000000000 --- a/layout/reftests/xul/resizer-left.xhtml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/layout/style/res/scrollbars.css b/layout/style/res/scrollbars.css index ce9e0eac6205..3a08e5b846da 100644 --- a/layout/style/res/scrollbars.css +++ b/layout/style/res/scrollbars.css @@ -82,10 +82,6 @@ scrollbar, scrollbarbutton, scrollcorner, slider, thumb, resizer { resizer { position: relative; z-index: 2147483647; - /* Widget gets decide on its own whether or not the native theme should apply, - based on the context/OS theme. If it does not, SVG background will kick in. */ - appearance: auto; - -moz-default-appearance: resizer; background: url("chrome://global/skin/icons/resizer.svg") no-repeat; background-size: 100% 100%; @@ -94,17 +90,12 @@ resizer { height: 15px; } -/* bottomstart/bottomend is supported in XUL window only */ resizer[dir="bottom"][flip], -resizer[dir="bottomleft"], -resizer[dir="bottomstart"]:-moz-locale-dir(ltr), -resizer[dir="bottomend"]:-moz-locale-dir(rtl) { +resizer[dir="bottomleft"] { transform: scaleX(-1); } -resizer[dir="bottomleft"], -resizer[dir="bottomstart"]:-moz-locale-dir(ltr), -resizer[dir="bottomend"]:-moz-locale-dir(rtl) { +resizer[dir="bottomleft"] { cursor: sw-resize; } diff --git a/servo/components/style/values/specified/box.rs b/servo/components/style/values/specified/box.rs index a877de8cbf1c..3decb2582bdc 100644 --- a/servo/components/style/values/specified/box.rs +++ b/servo/components/style/values/specified/box.rs @@ -1516,13 +1516,6 @@ pub enum Appearance { Range, #[parse(condition = "ParserContext::in_ua_or_chrome_sheet")] RangeThumb, - /// The resizer background area in a status bar for the resizer widget in - /// the corner of a window. - #[parse(condition = "ParserContext::in_ua_or_chrome_sheet")] - Resizerpanel, - /// The resizer itself. - #[parse(condition = "ParserContext::in_ua_or_chrome_sheet")] - Resizer, /// The scrollbar slider #[parse(condition = "ParserContext::in_ua_or_chrome_sheet")] ScrollbarHorizontal, @@ -1573,9 +1566,6 @@ pub enum Appearance { /// A status bar in a main application window. #[parse(condition = "ParserContext::in_ua_or_chrome_sheet")] Statusbar, - /// A single pane of a status bar. - #[parse(condition = "ParserContext::in_ua_or_chrome_sheet")] - Statusbarpanel, /// A single tab in a tab widget. #[parse(condition = "ParserContext::in_ua_or_chrome_sheet")] Tab, diff --git a/widget/ScrollbarDrawingWin.cpp b/widget/ScrollbarDrawingWin.cpp index f516f694cb92..c2d85ae671b0 100644 --- a/widget/ScrollbarDrawingWin.cpp +++ b/widget/ScrollbarDrawingWin.cpp @@ -109,7 +109,6 @@ Maybe ScrollbarDrawingWin::GetScrollbarPartTransparency( case StyleAppearance::ScrollbarHorizontal: case StyleAppearance::ScrollbarVertical: case StyleAppearance::Scrollcorner: - case StyleAppearance::Statusbar: // Knowing that scrollbars and statusbars are opaque improves // performance, because we create layers for them. This better be // true across all Windows themes! If it's not true, we should diff --git a/widget/cocoa/nsNativeThemeCocoa.h b/widget/cocoa/nsNativeThemeCocoa.h index 36445ddae800..a6c9812238ae 100644 --- a/widget/cocoa/nsNativeThemeCocoa.h +++ b/widget/cocoa/nsNativeThemeCocoa.h @@ -194,7 +194,6 @@ class nsNativeThemeCocoa : public mozilla::widget::ThemeCocoa { eActiveSourceListSelection, // bool eInactiveSourceListSelection, // bool eTabPanel, - eResizer }; struct WidgetInfo { @@ -267,7 +266,6 @@ class nsNativeThemeCocoa : public mozilla::widget::ThemeCocoa { return WidgetInfo(Widget::eInactiveSourceListSelection, aParams); } static WidgetInfo TabPanel(bool aParams) { return WidgetInfo(Widget::eTabPanel, aParams); } - static WidgetInfo Resizer(bool aParams) { return WidgetInfo(Widget::eResizer, aParams); } template T Params() const { @@ -393,7 +391,6 @@ class nsNativeThemeCocoa : public mozilla::widget::ThemeCocoa { const SpinButtonParams& aParams); void DrawToolbar(CGContextRef cgContext, const CGRect& inBoxRect, bool aIsMain); void DrawStatusBar(CGContextRef cgContext, const HIRect& inBoxRect, bool aIsMain); - void DrawResizer(CGContextRef cgContext, const HIRect& aRect, bool aIsRTL); void DrawMultilineTextField(CGContextRef cgContext, const CGRect& inBoxRect, bool aIsFocused); void DrawSourceListSelection(CGContextRef aContext, const CGRect& aRect, bool aWindowIsActive, bool aSelectionIsActive); diff --git a/widget/cocoa/nsNativeThemeCocoa.mm b/widget/cocoa/nsNativeThemeCocoa.mm index 5617381520ba..e14f161663ca 100644 --- a/widget/cocoa/nsNativeThemeCocoa.mm +++ b/widget/cocoa/nsNativeThemeCocoa.mm @@ -2169,26 +2169,6 @@ void nsNativeThemeCocoa::DrawStatusBar(CGContextRef cgContext, const HIRect& inB NS_OBJC_END_TRY_IGNORE_BLOCK; } -static void RenderResizer(CGContextRef cgContext, const HIRect& aRenderRect, void* aData) { - HIThemeGrowBoxDrawInfo* drawInfo = (HIThemeGrowBoxDrawInfo*)aData; - HIThemeDrawGrowBox(&CGPointZero, drawInfo, cgContext, kHIThemeOrientationNormal); -} - -void nsNativeThemeCocoa::DrawResizer(CGContextRef cgContext, const HIRect& aRect, bool aIsRTL) { - NS_OBJC_BEGIN_TRY_IGNORE_BLOCK; - - HIThemeGrowBoxDrawInfo drawInfo; - drawInfo.version = 0; - drawInfo.state = kThemeStateActive; - drawInfo.kind = kHIThemeGrowBoxKindNormal; - drawInfo.direction = kThemeGrowRight | kThemeGrowDown; - drawInfo.size = kHIThemeGrowBoxSizeNormal; - - RenderTransformedHIThemeControl(cgContext, aRect, RenderResizer, &drawInfo, aIsRTL); - - NS_OBJC_END_TRY_IGNORE_BLOCK; -} - void nsNativeThemeCocoa::DrawMultilineTextField(CGContextRef cgContext, const CGRect& inBoxRect, bool aIsFocused) { mTextFieldCell.enabled = YES; @@ -2531,9 +2511,6 @@ Maybe nsNativeThemeCocoa::ComputeWidgetInfo( case StyleAppearance::Tabpanels: return Some(WidgetInfo::TabPanel(FrameIsInActiveWindow(aFrame))); - case StyleAppearance::Resizer: - return Some(WidgetInfo::Resizer(IsFrameRTL(aFrame))); - default: break; } @@ -2772,11 +2749,6 @@ void nsNativeThemeCocoa::RenderWidget(const WidgetInfo& aWidgetInfo, DrawTabPanel(cgContext, macRect, isInsideActiveWindow); break; } - case Widget::eResizer: { - bool isRTL = aWidgetInfo.Params(); - DrawResizer(cgContext, macRect, isRTL); - break; - } } // Reset the base CTM. @@ -2848,7 +2820,6 @@ bool nsNativeThemeCocoa::CreateWebRenderCommandsForWidget( case StyleAppearance::Listbox: case StyleAppearance::Tab: case StyleAppearance::Tabpanels: - case StyleAppearance::Resizer: return false; default: @@ -3183,19 +3154,6 @@ LayoutDeviceIntSize nsNativeThemeCocoa::GetMinimumWidgetSize(nsPresContext* aPre case StyleAppearance::MozMenulistArrowButton: return ThemeCocoa::GetMinimumWidgetSize(aPresContext, aFrame, aAppearance); - case StyleAppearance::Resizer: { - HIThemeGrowBoxDrawInfo drawInfo; - drawInfo.version = 0; - drawInfo.state = kThemeStateActive; - drawInfo.kind = kHIThemeGrowBoxKindNormal; - drawInfo.direction = kThemeGrowRight | kThemeGrowDown; - drawInfo.size = kHIThemeGrowBoxSizeNormal; - HIPoint pnt = {0, 0}; - HIRect bounds; - HIThemeGetGrowBoxBounds(&pnt, &drawInfo, &bounds); - result.SizeTo(bounds.size.width, bounds.size.height); - break; - } default: break; } @@ -3219,8 +3177,6 @@ nsNativeThemeCocoa::WidgetStateChanged(nsIFrame* aFrame, StyleAppearance aAppear case StyleAppearance::Toolbox: case StyleAppearance::Toolbar: case StyleAppearance::Statusbar: - case StyleAppearance::Statusbarpanel: - case StyleAppearance::Resizerpanel: case StyleAppearance::Tooltip: case StyleAppearance::Tabpanels: case StyleAppearance::Tabpanel: @@ -3346,20 +3302,6 @@ bool nsNativeThemeCocoa::ThemeSupportsWidget(nsPresContext* aPresContext, nsIFra case StyleAppearance::Range: return !IsWidgetStyled(aPresContext, aFrame, aAppearance); - case StyleAppearance::Resizer: { - nsIFrame* parentFrame = aFrame->GetParent(); - if (!parentFrame || !parentFrame->IsScrollFrame()) return true; - - // Note that IsWidgetStyled is not called for resizers on Mac. This is - // because for scrollable containers, the native resizer looks better - // when (non-overlay) scrollbars are present even when the style is - // overriden, and the custom transparent resizer looks better when - // scrollbars are not present. - nsIScrollableFrame* scrollFrame = do_QueryFrame(parentFrame); - return (!LookAndFeel::UseOverlayScrollbars() && scrollFrame && - (!scrollFrame->GetScrollbarVisibility().isEmpty())); - } - default: break; } @@ -3433,7 +3375,6 @@ bool nsNativeThemeCocoa::WidgetAppearanceDependsOnWindowFocus(StyleAppearance aA case StyleAppearance::Treeline: case StyleAppearance::Textarea: case StyleAppearance::Listbox: - case StyleAppearance::Resizer: return false; default: return true; diff --git a/widget/gtk/nsNativeThemeGTK.cpp b/widget/gtk/nsNativeThemeGTK.cpp index 5f7c21db269f..d20e7244602c 100644 --- a/widget/gtk/nsNativeThemeGTK.cpp +++ b/widget/gtk/nsNativeThemeGTK.cpp @@ -315,9 +315,6 @@ bool nsNativeThemeGTK::GetGtkWidgetAndState(StyleAppearance aAppearance, case StyleAppearance::Toolbargripper: aGtkWidgetType = MOZ_GTK_GRIPPER; break; - case StyleAppearance::Resizer: - aGtkWidgetType = MOZ_GTK_RESIZER; - break; case StyleAppearance::NumberInput: case StyleAppearance::Textfield: aGtkWidgetType = MOZ_GTK_ENTRY; @@ -415,10 +412,6 @@ bool nsNativeThemeGTK::GetGtkWidgetAndState(StyleAppearance aAppearance, case StyleAppearance::Tooltip: aGtkWidgetType = MOZ_GTK_TOOLTIP; break; - case StyleAppearance::Statusbarpanel: - case StyleAppearance::Resizerpanel: - aGtkWidgetType = MOZ_GTK_FRAME; - break; case StyleAppearance::ProgressBar: aGtkWidgetType = MOZ_GTK_PROGRESSBAR; break; @@ -1238,10 +1231,6 @@ LayoutDeviceIntSize nsNativeThemeGTK::GetMinimumWidgetSize( result.width = 14; result.height = 13; break; - case StyleAppearance::Resizer: - // same as Windows to make our lives easier - result.width = result.height = 15; - break; case StyleAppearance::Treetwisty: case StyleAppearance::Treetwistyopen: { gint expander_size; @@ -1271,9 +1260,6 @@ nsNativeThemeGTK::WidgetStateChanged(nsIFrame* aFrame, // Some widget types just never change state. if (aAppearance == StyleAppearance::Toolbox || aAppearance == StyleAppearance::Toolbar || - aAppearance == StyleAppearance::Statusbar || - aAppearance == StyleAppearance::Statusbarpanel || - aAppearance == StyleAppearance::Resizerpanel || aAppearance == StyleAppearance::Progresschunk || aAppearance == StyleAppearance::ProgressBar || aAppearance == StyleAppearance::Menubar || @@ -1360,10 +1346,6 @@ nsNativeThemeGTK::ThemeSupportsWidget(nsPresContext* aPresContext, case StyleAppearance::ButtonArrowPrevious: case StyleAppearance::Separator: case StyleAppearance::Toolbargripper: - case StyleAppearance::Statusbar: - case StyleAppearance::Statusbarpanel: - case StyleAppearance::Resizerpanel: - case StyleAppearance::Resizer: case StyleAppearance::Listbox: case StyleAppearance::Treeview: // case StyleAppearance::Treeitem: diff --git a/widget/nsNativeTheme.cpp b/widget/nsNativeTheme.cpp index 479890821ae6..cfc57cd5f030 100644 --- a/widget/nsNativeTheme.cpp +++ b/widget/nsNativeTheme.cpp @@ -209,31 +209,6 @@ bool nsNativeTheme::IsWidgetStyled(nsPresContext* aPresContext, return false; } - // Resizers have some special handling, dependent on whether in a scrollable - // container or not. If so, use the scrollable container's to determine - // whether the style is overriden instead of the resizer. This allows a - // non-native transparent resizer to be used instead. Otherwise, we just - // fall through and return false. - if (aAppearance == StyleAppearance::Resizer) { - nsIFrame* parentFrame = aFrame->GetParent(); - if (parentFrame && parentFrame->IsScrollFrame()) { - // if the parent is a scrollframe, the resizer should be native themed - // only if the scrollable area doesn't override the widget style. - // - // note that the condition below looks a bit suspect but it's the right - // one. If there's no valid appearance, then we should return true, it's - // effectively the same as if it had overridden the appearance. - parentFrame = parentFrame->GetParent(); - if (!parentFrame) { - return false; - } - auto parentAppearance = - parentFrame->StyleDisplay()->EffectiveAppearance(); - return parentAppearance == StyleAppearance::None || - IsWidgetStyled(aPresContext, parentFrame, parentAppearance); - } - } - /** * Progress bar appearance should be the same for the bar and the container * frame. nsProgressFrame owns the logic and will tell us what we should do. diff --git a/widget/windows/nsNativeThemeWin.cpp b/widget/windows/nsNativeThemeWin.cpp index 5ac186d84658..7b54e92bb4eb 100644 --- a/widget/windows/nsNativeThemeWin.cpp +++ b/widget/windows/nsNativeThemeWin.cpp @@ -724,11 +724,6 @@ mozilla::Maybe nsNativeThemeWin::GetThemeClass( case StyleAppearance::SpinnerUpbutton: case StyleAppearance::SpinnerDownbutton: return Some(eUXSpin); - case StyleAppearance::Statusbar: - case StyleAppearance::Statusbarpanel: - case StyleAppearance::Resizerpanel: - case StyleAppearance::Resizer: - return Some(eUXStatus); case StyleAppearance::Menulist: case StyleAppearance::MenulistButton: case StyleAppearance::MozMenulistArrowButton: @@ -1026,8 +1021,7 @@ nsresult nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, case StyleAppearance::Toolbox: case StyleAppearance::MozWinMediaToolbox: case StyleAppearance::MozWinCommunicationsToolbox: - case StyleAppearance::MozWinBrowsertabbarToolbox: - case StyleAppearance::Statusbar: { + case StyleAppearance::MozWinBrowsertabbarToolbox: { aState = 0; aPart = RP_BACKGROUND; return NS_OK; @@ -1048,26 +1042,6 @@ nsresult nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, } return NS_OK; } - case StyleAppearance::Statusbarpanel: - case StyleAppearance::Resizerpanel: - case StyleAppearance::Resizer: { - switch (aAppearance) { - case StyleAppearance::Statusbarpanel: - aPart = 1; - break; - case StyleAppearance::Resizerpanel: - aPart = 2; - break; - case StyleAppearance::Resizer: - aPart = 3; - break; - default: - MOZ_ASSERT_UNREACHABLE("Oops, we're missing a case"); - aPart = 1; // just something valid - } - aState = TS_NORMAL; - return NS_OK; - } case StyleAppearance::Treeview: case StyleAppearance::Listbox: { aPart = TREEVIEW_BODY; @@ -1657,8 +1631,7 @@ RENDER_AGAIN: IsFrameRTL(aFrame)); } // The following widgets need to be RTL-aware - else if (aAppearance == StyleAppearance::Resizer || - aAppearance == StyleAppearance::MozMenulistArrowButton) { + else if (aAppearance == StyleAppearance::MozMenulistArrowButton) { DrawThemeBGRTLAware(theme, hdc, part, state, &widgetRect, &clipRect, IsFrameRTL(aFrame)); } else if (aAppearance == StyleAppearance::NumberInput || @@ -1783,8 +1756,6 @@ LayoutDeviceIntMargin nsNativeThemeWin::GetWidgetBorder( aAppearance == StyleAppearance::MozWinMediaToolbox || aAppearance == StyleAppearance::MozWinCommunicationsToolbox || aAppearance == StyleAppearance::MozWinBrowsertabbarToolbox || - aAppearance == StyleAppearance::Statusbar || - aAppearance == StyleAppearance::Resizer || aAppearance == StyleAppearance::Tabpanel || aAppearance == StyleAppearance::Menuitem || aAppearance == StyleAppearance::Checkmenuitem || @@ -2059,7 +2030,6 @@ LayoutDeviceIntSize nsNativeThemeWin::GetMinimumWidgetSize( case StyleAppearance::MozWinCommunicationsToolbox: case StyleAppearance::MozWinBrowsertabbarToolbox: case StyleAppearance::Toolbar: - case StyleAppearance::Statusbar: case StyleAppearance::Progresschunk: case StyleAppearance::Tabpanels: case StyleAppearance::Tabpanel: @@ -2116,9 +2086,6 @@ LayoutDeviceIntSize nsNativeThemeWin::GetMinimumWidgetSize( sizeReq = TS_MIN; break; - case StyleAppearance::Resizer: - break; - case StyleAppearance::RangeThumb: { LayoutDeviceIntSize result(12, 20); if (!IsRangeHorizontal(aFrame)) { @@ -2233,9 +2200,6 @@ nsNativeThemeWin::WidgetStateChanged(nsIFrame* aFrame, aAppearance == StyleAppearance::MozWinCommunicationsToolbox || aAppearance == StyleAppearance::MozWinBrowsertabbarToolbox || aAppearance == StyleAppearance::Toolbar || - aAppearance == StyleAppearance::Statusbar || - aAppearance == StyleAppearance::Statusbarpanel || - aAppearance == StyleAppearance::Resizerpanel || aAppearance == StyleAppearance::Progresschunk || aAppearance == StyleAppearance::ProgressBar || aAppearance == StyleAppearance::Tabpanels || @@ -2314,9 +2278,7 @@ bool nsNativeThemeWin::ThemeSupportsWidget(nsPresContext* aPresContext, else theme = GetTheme(aAppearance); - if (theme && aAppearance == StyleAppearance::Resizer) return true; - - if ((theme) || (!theme && ClassicThemeSupportsWidget(aFrame, aAppearance))) + if (theme || ClassicThemeSupportsWidget(aFrame, aAppearance)) // turn off theming for some HTML widgets styled by the page return (!IsWidgetStyled(aPresContext, aFrame, aAppearance)); @@ -2424,13 +2386,6 @@ nsITheme::Transparency nsNativeThemeWin::GetWidgetTransparency( bool nsNativeThemeWin::ClassicThemeSupportsWidget(nsIFrame* aFrame, StyleAppearance aAppearance) { switch (aAppearance) { - case StyleAppearance::Resizer: { - // The classic native resizer has an opaque grey background which doesn't - // match the usually white background of the scrollable container, so - // only support the native resizer if not in a scrollframe. - nsIFrame* parentFrame = aFrame->GetParent(); - return !parentFrame || !parentFrame->IsScrollFrame(); - } case StyleAppearance::Menubar: case StyleAppearance::Menupopup: // Classic non-flat menus are handled almost entirely through CSS. @@ -2452,9 +2407,6 @@ bool nsNativeThemeWin::ClassicThemeSupportsWidget(nsIFrame* aFrame, case StyleAppearance::SpinnerDownbutton: case StyleAppearance::Listbox: case StyleAppearance::Treeview: - case StyleAppearance::Statusbar: - case StyleAppearance::Statusbarpanel: - case StyleAppearance::Resizerpanel: case StyleAppearance::ProgressBar: case StyleAppearance::Progresschunk: case StyleAppearance::Tab: @@ -2490,10 +2442,6 @@ LayoutDeviceIntMargin nsNativeThemeWin::ClassicGetWidgetBorder( case StyleAppearance::Button: result.top = result.left = result.bottom = result.right = 2; break; - case StyleAppearance::Statusbar: - result.bottom = result.left = result.right = 0; - result.top = 2; - break; case StyleAppearance::Listbox: case StyleAppearance::Treeview: case StyleAppearance::Menulist: @@ -2504,14 +2452,6 @@ LayoutDeviceIntMargin nsNativeThemeWin::ClassicGetWidgetBorder( case StyleAppearance::Textarea: result.top = result.left = result.bottom = result.right = 2; break; - case StyleAppearance::Statusbarpanel: - case StyleAppearance::Resizerpanel: { - result.top = 1; - result.left = 1; - result.bottom = 1; - result.right = aFrame->GetNextSibling() ? 3 : 1; - break; - } case StyleAppearance::ProgressBar: result.top = result.left = result.bottom = result.right = 1; break; @@ -2608,9 +2548,6 @@ LayoutDeviceIntSize nsNativeThemeWin::ClassicGetMinimumWidgetSize( case StyleAppearance::NumberInput: case StyleAppearance::Textfield: case StyleAppearance::Textarea: - case StyleAppearance::Statusbar: - case StyleAppearance::Statusbarpanel: - case StyleAppearance::Resizerpanel: case StyleAppearance::Progresschunk: case StyleAppearance::ProgressBar: case StyleAppearance::Tab: @@ -2618,15 +2555,6 @@ LayoutDeviceIntSize nsNativeThemeWin::ClassicGetMinimumWidgetSize( case StyleAppearance::Tabpanels: // no minimum widget size break; - case StyleAppearance::Resizer: { - NONCLIENTMETRICS nc; - nc.cbSize = sizeof(nc); - if (SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(nc), &nc, 0)) - result.width = result.height = abs(nc.lfStatusFont.lfHeight) + 4; - else - result.width = result.height = 15; - break; - } case StyleAppearance::Menuseparator: { result.width = 0; result.height = 10; @@ -2804,9 +2732,6 @@ nsresult nsNativeThemeWin::ClassicGetThemePartAndState( case StyleAppearance::MenulistButton: case StyleAppearance::Range: case StyleAppearance::RangeThumb: - case StyleAppearance::Statusbar: - case StyleAppearance::Statusbarpanel: - case StyleAppearance::Resizerpanel: case StyleAppearance::Progresschunk: case StyleAppearance::ProgressBar: case StyleAppearance::Tab: @@ -2878,11 +2803,6 @@ nsresult nsNativeThemeWin::ClassicGetThemePartAndState( return NS_OK; } - case StyleAppearance::Resizer: - aPart = DFC_SCROLL; - aState = - (IsFrameRTL(aFrame)) ? DFCS_SCROLLSIZEGRIPRIGHT : DFCS_SCROLLSIZEGRIP; - return NS_OK; case StyleAppearance::Menuseparator: aPart = 0; aState = 0; @@ -3137,8 +3057,7 @@ RENDER_AGAIN: case StyleAppearance::Radio: case StyleAppearance::SpinnerUpbutton: case StyleAppearance::SpinnerDownbutton: - case StyleAppearance::MozMenulistArrowButton: - case StyleAppearance::Resizer: { + case StyleAppearance::MozMenulistArrowButton: { int32_t oldTA; // setup DC to make DrawFrameControl draw correctly oldTA = ::SetTextAlign(hdc, TA_TOP | TA_LEFT | TA_NOUPDATECP); @@ -3187,20 +3106,8 @@ RENDER_AGAIN: ::DrawEdge(hdc, &widgetRect, BDR_SUNKENOUTER, BF_RECT | BF_MIDDLE); InflateRect(&widgetRect, -1, -1); [[fallthrough]]; - case StyleAppearance::Tabpanel: - case StyleAppearance::Statusbar: - case StyleAppearance::Resizerpanel: { + case StyleAppearance::Tabpanel: { ::FillRect(hdc, &widgetRect, (HBRUSH)(COLOR_BTNFACE + 1)); - - break; - } - // Draw 3D inset statusbar panel - case StyleAppearance::Statusbarpanel: { - if (aFrame->GetNextSibling()) - widgetRect.right -= 2; // space between sibling status panels - - ::DrawEdge(hdc, &widgetRect, BDR_SUNKENOUTER, BF_RECT | BF_MIDDLE); - break; } case StyleAppearance::RangeThumb: { diff --git a/widget/windows/nsUXThemeData.cpp b/widget/windows/nsUXThemeData.cpp index 435102505697..fe4061efb178 100644 --- a/widget/windows/nsUXThemeData.cpp +++ b/widget/windows/nsUXThemeData.cpp @@ -108,8 +108,6 @@ const wchar_t* nsUXThemeData::GetClassName(nsUXThemeClass cls) { return L"Trackbar"; case eUXSpin: return L"Spin"; - case eUXStatus: - return L"Status"; case eUXCombobox: return L"Combobox"; case eUXHeader: diff --git a/widget/windows/nsUXThemeData.h b/widget/windows/nsUXThemeData.h index d7c020083588..33ab0354b767 100644 --- a/widget/windows/nsUXThemeData.h +++ b/widget/windows/nsUXThemeData.h @@ -30,7 +30,6 @@ enum nsUXThemeClass { eUXTab, eUXTrackbar, eUXSpin, - eUXStatus, eUXCombobox, eUXHeader, eUXListview,