summaryrefslogtreecommitdiffstats
path: root/widget/windows/nsNativeThemeWin.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /widget/windows/nsNativeThemeWin.cpp
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/windows/nsNativeThemeWin.cpp')
-rw-r--r--widget/windows/nsNativeThemeWin.cpp47
1 files changed, 1 insertions, 46 deletions
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<nsUXThemeClass> 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 ||