summaryrefslogtreecommitdiffstats
path: root/layout/xul/nsMenuPopupFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;
}