From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- layout/xul/nsMenuPopupFrame.cpp | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) (limited to 'layout/xul/nsMenuPopupFrame.cpp') 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; } -- cgit v1.2.3