summaryrefslogtreecommitdiffstats
path: root/layout/xul/nsMenuPopupFrame.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /layout/xul/nsMenuPopupFrame.cpp
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-upstream/125.0.1.tar.xz
firefox-upstream/125.0.1.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/xul/nsMenuPopupFrame.cpp')
-rw-r--r--layout/xul/nsMenuPopupFrame.cpp33
1 files changed, 4 insertions, 29 deletions
diff --git a/layout/xul/nsMenuPopupFrame.cpp b/layout/xul/nsMenuPopupFrame.cpp
index b41a666707..8ebb8b01d5 100644
--- a/layout/xul/nsMenuPopupFrame.cpp
+++ b/layout/xul/nsMenuPopupFrame.cpp
@@ -220,21 +220,16 @@ widget::PopupLevel nsMenuPopupFrame::GetPopupLevel(bool aIsNoAutoHide) const {
}
// If the level attribute has been set, use that.
- static Element::AttrValuesArray strings[] = {
- nsGkAtoms::top, nsGkAtoms::parent, nsGkAtoms::floating, nullptr};
+ static Element::AttrValuesArray strings[] = {nsGkAtoms::top,
+ nsGkAtoms::parent, nullptr};
switch (mContent->AsElement()->FindAttrValueIn(
kNameSpaceID_None, nsGkAtoms::level, strings, eCaseMatters)) {
case 0:
return PopupLevel::Top;
case 1:
return PopupLevel::Parent;
- case 2:
- return PopupLevel::Floating;
- }
-
- // Panels with titlebars most likely want to be floating popups.
- if (mContent->AsElement()->HasAttr(nsGkAtoms::titlebar)) {
- return PopupLevel::Floating;
+ default:
+ break;
}
// If this panel is a noautohide panel, the default is the parent level.
@@ -281,20 +276,6 @@ nsresult nsMenuPopupFrame::CreateWidgetForView(nsView* aView) {
}
}
- nsAutoString title;
- if (widgetData.mNoAutoHide &&
- mContent->AsElement()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::titlebar,
- nsGkAtoms::normal, eCaseMatters)) {
- widgetData.mBorderStyle = widget::BorderStyle::Title;
-
- mContent->AsElement()->GetAttr(nsGkAtoms::label, title);
- if (mContent->AsElement()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::close,
- nsGkAtoms::_true, eCaseMatters)) {
- widgetData.mBorderStyle =
- widgetData.mBorderStyle | widget::BorderStyle::Close;
- }
- }
-
bool remote = HasRemoteContent();
const auto mode = nsLayoutUtils::GetFrameTransparency(this, this);
@@ -328,12 +309,6 @@ nsresult nsMenuPopupFrame::CreateWidgetForView(nsView* aView) {
PropagateStyleToWidget();
- // most popups don't have a title so avoid setting the title if there isn't
- // one
- if (!title.IsEmpty()) {
- widget->SetTitle(title);
- }
-
return NS_OK;
}