From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- widget/windows/nsNativeThemeWin.cpp | 47 +------------------------------------ 1 file changed, 1 insertion(+), 46 deletions(-) (limited to 'widget/windows/nsNativeThemeWin.cpp') diff --git a/widget/windows/nsNativeThemeWin.cpp b/widget/windows/nsNativeThemeWin.cpp index 04883a833f..7ef968baf6 100644 --- a/widget/windows/nsNativeThemeWin.cpp +++ b/widget/windows/nsNativeThemeWin.cpp @@ -484,9 +484,6 @@ mozilla::Maybe nsNativeThemeWin::GetThemeClass( case StyleAppearance::Textfield: case StyleAppearance::Textarea: return Some(eUXEdit); - case StyleAppearance::Toolbox: - return Some(eUXRebar); - case StyleAppearance::Toolbar: case StyleAppearance::Toolbarbutton: case StyleAppearance::Separator: return Some(eUXToolbar); @@ -719,27 +716,6 @@ nsresult nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, } return NS_OK; } - case StyleAppearance::Toolbox: { - aState = 0; - aPart = RP_BACKGROUND; - return NS_OK; - } - case StyleAppearance::Toolbar: { - // Use -1 to indicate we don't wish to have the theme background drawn - // for this item. We will pass any nessessary information via aState, - // and will render the item using separate code. - aPart = -1; - aState = 0; - if (aFrame) { - nsIContent* content = aFrame->GetContent(); - nsIContent* parent = content->GetParent(); - // XXXzeniko hiding the first toolbar will result in an unwanted margin - if (parent && parent->GetFirstChild() == content) { - aState = 1; - } - } - return NS_OK; - } case StyleAppearance::Treeview: case StyleAppearance::Listbox: { aPart = TREEVIEW_BODY; @@ -1031,16 +1007,6 @@ RENDER_AGAIN: ::DeleteObject(hPen); } } - } else if (aAppearance == StyleAppearance::Toolbar && state == 0) { - // Draw toolbar separator lines above all toolbars except the first one. - // The lines are part of the Rebar theme, which is loaded for - // StyleAppearance::Toolbox. - theme = GetTheme(StyleAppearance::Toolbox); - if (!theme) return NS_ERROR_FAILURE; - - widgetRect.bottom = widgetRect.top + TB_SEPARATOR_HEIGHT; - DrawThemeEdge(theme, hdc, RP_BAND, 0, &widgetRect, EDGE_ETCHED, BF_TOP, - nullptr); } nativeDrawing.EndNativeDrawing(); @@ -1101,7 +1067,6 @@ LayoutDeviceIntMargin nsNativeThemeWin::GetWidgetBorder( } if (!WidgetIsContainer(aAppearance) || - aAppearance == StyleAppearance::Toolbox || aAppearance == StyleAppearance::Tabpanel) return result; // Don't worry about it. @@ -1109,12 +1074,6 @@ LayoutDeviceIntMargin nsNativeThemeWin::GetWidgetBorder( nsresult rv = GetThemePartAndState(aFrame, aAppearance, part, state); if (NS_FAILED(rv)) return result; - if (aAppearance == StyleAppearance::Toolbar) { - // make space for the separator line above all toolbars but the first - if (state == 0) result.top = TB_SEPARATOR_HEIGHT; - return result; - } - result = GetCachedWidgetBorder(theme, themeClass.value(), aAppearance, part, state); @@ -1278,8 +1237,6 @@ LayoutDeviceIntSize nsNativeThemeWin::GetMinimumWidgetSize( switch (aAppearance) { case StyleAppearance::NumberInput: case StyleAppearance::Textfield: - case StyleAppearance::Toolbox: - case StyleAppearance::Toolbar: case StyleAppearance::Progresschunk: case StyleAppearance::Tabpanels: case StyleAppearance::Tabpanel: @@ -1352,9 +1309,7 @@ nsNativeThemeWin::WidgetStateChanged(nsIFrame* aFrame, nsAtom* aAttribute, bool* aShouldRepaint, const nsAttrValue* aOldValue) { // Some widget types just never change state. - if (aAppearance == StyleAppearance::Toolbox || - aAppearance == StyleAppearance::Toolbar || - aAppearance == StyleAppearance::Progresschunk || + if (aAppearance == StyleAppearance::Progresschunk || aAppearance == StyleAppearance::ProgressBar || aAppearance == StyleAppearance::Tabpanels || aAppearance == StyleAppearance::Tabpanel || -- cgit v1.2.3