diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /layout/xul/nsMenuPopupFrame.cpp | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 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.cpp | 33 |
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; } |