diff --git a/browser/base/content/test/general/head.js b/browser/base/content/test/general/head.js index f6f407499cf3..a69409a47934 100644 --- a/browser/base/content/test/general/head.js +++ b/browser/base/content/test/general/head.js @@ -284,7 +284,7 @@ function is_hidden(element) { if (style.visibility != "visible") { return true; } - if (style.display == "-moz-popup") { + if (XULPopupElement.isInstance(element)) { return ["hiding", "closed"].includes(element.state); } diff --git a/browser/components/customizableui/CustomizableUI.jsm b/browser/components/customizableui/CustomizableUI.jsm index 9a2b2117a13d..e97c97936377 100644 --- a/browser/components/customizableui/CustomizableUI.jsm +++ b/browser/components/customizableui/CustomizableUI.jsm @@ -5596,7 +5596,7 @@ class OverflowableToolbar { let style = win.getComputedStyle(child); if ( style.display == "none" || - style.display == "-moz-popup" || + win.XULPopupElement.isInstance(child) || (style.position != "static" && style.position != "relative") ) { continue; diff --git a/browser/components/customizableui/test/browser_PanelMultiView.js b/browser/components/customizableui/test/browser_PanelMultiView.js index b3c1ccf1f581..645f09f03d9e 100644 --- a/browser/components/customizableui/test/browser_PanelMultiView.js +++ b/browser/components/customizableui/test/browser_PanelMultiView.js @@ -39,14 +39,15 @@ const EVENT_TYPES = [ * they need to read style or layout information, like other code normally does. */ function is_visible(element) { - var style = element.ownerGlobal.getComputedStyle(element); + let win = element.ownerGlobal; + let style = win.getComputedStyle(element); if (style.display == "none") { return false; } if (style.visibility != "visible") { return false; } - if (style.display == "-moz-popup" && element.state != "open") { + if (win.XULPopupElement.isInstance(element) && element.state != "open") { return false; } diff --git a/browser/components/uitour/test/head.js b/browser/components/uitour/test/head.js index 5157cf9ee4b9..9aa6d69e642b 100644 --- a/browser/components/uitour/test/head.js +++ b/browser/components/uitour/test/head.js @@ -68,14 +68,15 @@ function taskify(fun) { } function is_hidden(element) { - var style = element.ownerGlobal.getComputedStyle(element); + let win = element.ownerGlobal; + let style = win.getComputedStyle(element); if (style.display == "none") { return true; } if (style.visibility != "visible") { return true; } - if (style.display == "-moz-popup") { + if (win.XULPopupElement.isInstance(element)) { return ["hiding", "closed"].includes(element.state); } @@ -88,14 +89,15 @@ function is_hidden(element) { } function is_visible(element) { - var style = element.ownerGlobal.getComputedStyle(element); + let win = element.ownerGlobal; + let style = win.getComputedStyle(element); if (style.display == "none") { return false; } if (style.visibility != "visible") { return false; } - if (style.display == "-moz-popup" && element.state != "open") { + if (win.XULPopupElement.isInstance(element) && element.state != "open") { return false; } diff --git a/dom/events/EventStateManager.cpp b/dom/events/EventStateManager.cpp index e2c8dfd4c37f..05fee4220a1c 100644 --- a/dom/events/EventStateManager.cpp +++ b/dom/events/EventStateManager.cpp @@ -3486,7 +3486,7 @@ nsresult EventStateManager::PostHandleEvent(nsPresContext* aPresContext, // If the mousedown happened inside a popup, don't try to set focus on // one of its containing elements - if (frame->StyleDisplay()->mDisplay == StyleDisplay::MozPopup) { + if (frame->IsMenuPopupFrame()) { newFocus = nullptr; break; } diff --git a/layout/base/crashtests/306940-1.html b/layout/base/crashtests/306940-1.html index f6197c37c4af..51cced408f71 100644 --- a/layout/base/crashtests/306940-1.html +++ b/layout/base/crashtests/306940-1.html @@ -8,14 +8,13 @@ function init() var c1 = document.getElementById("c1"); var f1 = document.getElementById("f1"); var a1 = document.getElementById("a1"); - + function first() { - f1.style.display = "-moz-popup"; c1.style.height = "2em"; window.status = "A"; } - + function second() { c1.style.position = "absolute"; diff --git a/layout/base/crashtests/372475-1.xhtml b/layout/base/crashtests/372475-1.xhtml deleted file mode 100644 index ec3d7546313b..000000000000 --- a/layout/base/crashtests/372475-1.xhtml +++ /dev/null @@ -1,9 +0,0 @@ - - - - -
- - - \ No newline at end of file diff --git a/layout/base/crashtests/373628.html b/layout/base/crashtests/373628.html index d71cc2518bdc..749af86b9ced 100644 --- a/layout/base/crashtests/373628.html +++ b/layout/base/crashtests/373628.html @@ -113,7 +113,7 @@ mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m

-

+

@@ -314,7 +314,7 @@ mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m - + @@ -345,7 +345,7 @@ mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m - + @@ -378,12 +378,12 @@ mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m - + mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m - + mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m @@ -414,7 +414,7 @@ mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m - + mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m @@ -448,7 +448,7 @@ mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m - + mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m @@ -479,7 +479,7 @@ mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m - + mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m @@ -553,7 +553,7 @@ mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m - + @@ -598,7 +598,7 @@ mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m - + @@ -639,7 +639,7 @@ mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m - + @@ -699,7 +699,7 @@ mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m - + @@ -740,7 +740,7 @@ mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m - + @@ -780,7 +780,7 @@ mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m - + @@ -880,7 +880,7 @@ mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m - + @@ -919,7 +919,7 @@ mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m mm m - + diff --git a/layout/base/crashtests/405049-1.xhtml b/layout/base/crashtests/405049-1.xhtml index fb68de11eb9b..07d2f4b18d5f 100644 --- a/layout/base/crashtests/405049-1.xhtml +++ b/layout/base/crashtests/405049-1.xhtml @@ -1,3 +1,3 @@ - - \ No newline at end of file + + diff --git a/layout/base/crashtests/613817-1.svg b/layout/base/crashtests/613817-1.svg deleted file mode 100644 index 9f5165ffe5fa..000000000000 --- a/layout/base/crashtests/613817-1.svg +++ /dev/null @@ -1,12 +0,0 @@ - -
- diff --git a/layout/base/crashtests/crashtests.list b/layout/base/crashtests/crashtests.list index 9218e01ea33c..cfd122e75d78 100644 --- a/layout/base/crashtests/crashtests.list +++ b/layout/base/crashtests/crashtests.list @@ -137,7 +137,6 @@ load 369547-2.html load 369945-1.xhtml load 371681-1.xhtml load 372237-1.html -load 372475-1.xhtml load 372550-1.html load 373628-1.html load 374297-1.html @@ -328,7 +327,6 @@ load 595039-1.html load 597924-1.html load 606432-1.html load 609821-1.xhtml -load 613817-1.svg load 615146-1.html load 615781-1.xhtml load 616495-single-side-composite-color-border.html diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 5559bd199e79..ec13c68c8511 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -2399,14 +2399,12 @@ nsIFrame* nsCSSFrameConstructor::ConstructDocElementFrame( } else if (display->mDisplay == StyleDisplay::Flex || display->mDisplay == StyleDisplay::WebkitBox || display->mDisplay == StyleDisplay::Grid || - display->mDisplay == StyleDisplay::MozBox || - display->mDisplay == StyleDisplay::MozPopup) { + display->mDisplay == StyleDisplay::MozBox) { auto func = [&] { if (display->mDisplay == StyleDisplay::Grid) { return NS_NewGridContainerFrame; } - if ((display->mDisplay == StyleDisplay::MozBox || - display->mDisplay == StyleDisplay::MozPopup) && + if (display->mDisplay == StyleDisplay::MozBox && !computedStyle->StyleVisibility()->EmulateMozBoxWithFlex()) { return NS_NewBoxFrame; } @@ -4022,6 +4020,8 @@ const nsCSSFrameConstructor::FrameConstructionData* nsCSSFrameConstructor::FindXULTagData(const Element& aElement, ComputedStyle& aStyle) { MOZ_ASSERT(aElement.IsXULElement()); + static constexpr FrameConstructionData kPopupData( + NS_NewMenuPopupFrame, FCDATA_IS_POPUP | FCDATA_SKIP_ABSPOS_PUSH); static constexpr FrameConstructionDataByTag sXULTagData[] = { SIMPLE_XUL_CREATE(image, NS_NewImageBoxFrame), @@ -4047,7 +4047,11 @@ nsCSSFrameConstructor::FindXULTagData(const Element& aElement, SIMPLE_XUL_CREATE(splitter, NS_NewSplitterFrame), SIMPLE_XUL_CREATE(slider, NS_NewSliderFrame), SIMPLE_XUL_CREATE(scrollbar, NS_NewScrollbarFrame), - SIMPLE_XUL_CREATE(scrollbarbutton, NS_NewScrollbarButtonFrame)}; + SIMPLE_XUL_CREATE(scrollbarbutton, NS_NewScrollbarButtonFrame), + {nsGkAtoms::panel, kPopupData}, + {nsGkAtoms::menupopup, kPopupData}, + {nsGkAtoms::tooltip, kPopupData}, + }; return FindDataByTag(aElement, aStyle, sXULTagData, ArrayLength(sXULTagData)); } @@ -4457,11 +4461,6 @@ nsCSSFrameConstructor::FindDisplayData(const nsStyleDisplay& aDisplay, FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRuby)); return &data; } - case StyleDisplayInside::MozPopup: { - static constexpr FrameConstructionData data( - NS_NewMenuPopupFrame, FCDATA_IS_POPUP | FCDATA_SKIP_ABSPOS_PUSH); - return &data; - } default: MOZ_ASSERT_UNREACHABLE("unknown 'display' value"); return nullptr; @@ -5465,15 +5464,6 @@ void nsCSSFrameConstructor::ConstructFramesFromItem( nsContainerFrame* aParentFrame, nsFrameList& aFrameList) { FrameConstructionItem& item = aIter.item(); ComputedStyle* computedStyle = item.mComputedStyle; - - const auto* disp = computedStyle->StyleDisplay(); - MOZ_ASSERT(!disp->IsAbsolutelyPositionedStyle() || - disp->DisplayInside() != StyleDisplayInside::MozBox, - "This may be a frame that was previously blockified " - "but isn't any longer! It probably needs explicit " - "'display:block' to preserve behavior"); - Unused << disp; // (unused in configs that define the assertion away) - if (item.mIsText) { // If this is collapsible whitespace next to a line boundary, // don't create a frame. item.IsWhitespace() also sets the @@ -5843,10 +5833,6 @@ bool nsCSSFrameConstructor::IsValidSibling(nsIFrame* aSibling, } StyleDisplay display = aDisplay.value(); - if (LayoutFrameType::Menu == parentType) { - return (StyleDisplay::MozPopup == display) == - (StyleDisplay::MozPopup == siblingDisplay); - } // To have decent performance we want to return false in cases in which // reordering the two siblings has no effect on display. To ensure // correctness, we MUST return false in cases where the two siblings have diff --git a/layout/base/nsFrameTraversal.cpp b/layout/base/nsFrameTraversal.cpp index c770feb845bd..f380e61684da 100644 --- a/layout/base/nsFrameTraversal.cpp +++ b/layout/base/nsFrameTraversal.cpp @@ -422,8 +422,7 @@ bool nsFrameIterator::IsPopupFrame(nsIFrame* aFrame) { if (mSkipPopupChecks) { return false; } - - return (aFrame && aFrame->StyleDisplay()->mDisplay == StyleDisplay::MozPopup); + return aFrame && aFrame->IsMenuPopupFrame(); } // nsVisualIterator implementation diff --git a/layout/reftests/bugs/490173-1-ref.html b/layout/reftests/bugs/490173-1-ref.html deleted file mode 100644 index 73bace2f3add..000000000000 --- a/layout/reftests/bugs/490173-1-ref.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - -

Foo
- - diff --git a/layout/reftests/bugs/490173-1.html b/layout/reftests/bugs/490173-1.html deleted file mode 100644 index 4bef4d61218b..000000000000 --- a/layout/reftests/bugs/490173-1.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - -
Foo
- - diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 24d3f9c86d81..18e0a115f9a4 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -1314,7 +1314,6 @@ fuzzy(0-1,0-5) == 482659-1d.html 482659-1-ref.html == 488685-1.html 488685-1-ref.html == 488692-1.html 488692-1-ref.html == 489868-1.svg 489868-1-ref.svg -== 490173-1.html 490173-1-ref.html == 490173-2.html 490173-2-ref.html == 490176-1.html 490176-1-ref.html == 490177-1.svg 490177-1-ref.svg diff --git a/layout/reftests/table-anonymous-boxes/162063-1.xhtml b/layout/reftests/table-anonymous-boxes/162063-1.xhtml index 6a83f3a6f51b..387ad4e6ec33 100644 --- a/layout/reftests/table-anonymous-boxes/162063-1.xhtml +++ b/layout/reftests/table-anonymous-boxes/162063-1.xhtml @@ -68,7 +68,7 @@ window.addEventListener("MozReftestInvalidate", boom);
-
target
+
target
diff --git a/layout/style/nsStyleConsts.h b/layout/style/nsStyleConsts.h index d0b963b7710f..07e89619bed6 100644 --- a/layout/style/nsStyleConsts.h +++ b/layout/style/nsStyleConsts.h @@ -91,8 +91,6 @@ enum class StyleDisplay : uint16_t { StyleDisplayFrom(StyleDisplayOutside::Block, StyleDisplayInside::MozBox), MozInlineBox = StyleDisplayFrom(StyleDisplayOutside::Inline, StyleDisplayInside::MozBox), - MozPopup = - StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozPopup), }; // The order of the StyleDisplay values isn't meaningful. bool operator<(const StyleDisplay&, const StyleDisplay&) = delete; diff --git a/layout/style/test/test_non_content_accessible_values.html b/layout/style/test/test_non_content_accessible_values.html index c1f640be730c..4307d5852693 100644 --- a/layout/style/test/test_non_content_accessible_values.html +++ b/layout/style/test/test_non_content_accessible_values.html @@ -19,7 +19,6 @@ const NON_CONTENT_ACCESSIBLE_VALUES = { "-moz-autofill-background", ], "display": [ - "-moz-popup", "-moz-box", "-moz-inline-box", ], diff --git a/layout/xul/crashtests/350460.xhtml b/layout/xul/crashtests/350460.xhtml deleted file mode 100644 index b13de6c977fd..000000000000 --- a/layout/xul/crashtests/350460.xhtml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/layout/xul/crashtests/crashtests.list b/layout/xul/crashtests/crashtests.list index 04797e55040f..975b88fc4024 100644 --- a/layout/xul/crashtests/crashtests.list +++ b/layout/xul/crashtests/crashtests.list @@ -16,7 +16,6 @@ skip-if(Android) load chrome://reftest/content/crashtests/layout/xul/crashtests/ load 329407-1.xml load chrome://reftest/content/crashtests/layout/xul/crashtests/336962-1.xhtml skip-if(Android) load chrome://reftest/content/crashtests/layout/xul/crashtests/344228-1.xhtml -load chrome://reftest/content/crashtests/layout/xul/crashtests/350460.xhtml skip-if(Android) load chrome://reftest/content/crashtests/layout/xul/crashtests/365151.xhtml load chrome://reftest/content/crashtests/layout/xul/crashtests/366112-1.xhtml skip-if(Android) load chrome://reftest/content/crashtests/layout/xul/crashtests/366203-1.xhtml diff --git a/layout/xul/test/chrome.ini b/layout/xul/test/chrome.ini index 5732f2507204..b0ebb99b0711 100644 --- a/layout/xul/test/chrome.ini +++ b/layout/xul/test/chrome.ini @@ -15,7 +15,6 @@ support-files = [test_blockify_moz_box.html] [test_bug159346.xhtml] -[test_bug372685.xhtml] [test_bug381167.xhtml] [test_bug398982-1.xhtml] [test_bug398982-2.xhtml] diff --git a/layout/xul/test/test_bug372685.xhtml b/layout/xul/test/test_bug372685.xhtml deleted file mode 100644 index 56d4d8434660..000000000000 --- a/layout/xul/test/test_bug372685.xhtml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - -Mozilla Bug 372685 -

- -
-
- - - - -
diff --git a/servo/components/style/values/specified/box.rs b/servo/components/style/values/specified/box.rs index 285c4a84a199..d275c311dc29 100644 --- a/servo/components/style/values/specified/box.rs +++ b/servo/components/style/values/specified/box.rs @@ -104,8 +104,6 @@ pub enum DisplayInside { WebkitBox, #[cfg(feature = "gecko")] MozBox, - #[cfg(feature = "gecko")] - MozPopup, } #[allow(missing_docs)] @@ -217,8 +215,6 @@ impl Display { pub const MozBox: Self = Self::new(DisplayOutside::Block, DisplayInside::MozBox); #[cfg(feature = "gecko")] pub const MozInlineBox: Self = Self::new(DisplayOutside::Inline, DisplayInside::MozBox); - #[cfg(feature = "gecko")] - pub const MozPopup: Self = Self::new(DisplayOutside::XUL, DisplayInside::MozPopup); /// Make a raw display value from and values. #[inline] @@ -597,8 +593,6 @@ impl Parse for Display { "-moz-box" if moz_display_values_enabled(context) => Display::MozBox, #[cfg(feature = "gecko")] "-moz-inline-box" if moz_display_values_enabled(context) => Display::MozInlineBox, - #[cfg(feature = "gecko")] - "-moz-popup" if moz_display_values_enabled(context) => Display::MozPopup, }) } } diff --git a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm index 7bb997820b94..6bb8b4e3ca78 100644 --- a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm +++ b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm @@ -295,14 +295,15 @@ var BrowserTestUtils = { * @return {boolean} */ is_hidden(element) { - var style = element.ownerGlobal.getComputedStyle(element); + let win = element.ownerGlobal; + let style = win.getComputedStyle(element); if (style.display == "none") { return true; } if (style.visibility != "visible") { return true; } - if (style.display == "-moz-popup") { + if (win.XULPopupElement.isInstance(element)) { return ["hiding", "closed"].includes(element.state); } @@ -323,14 +324,15 @@ var BrowserTestUtils = { * @return {boolean} */ is_visible(element) { - var style = element.ownerGlobal.getComputedStyle(element); + let win = element.ownerGlobal; + let style = win.getComputedStyle(element); if (style.display == "none") { return false; } if (style.visibility != "visible") { return false; } - if (style.display == "-moz-popup" && element.state != "open") { + if (win.XULPopupElement.isInstance(element) && element.state != "open") { return false; } diff --git a/toolkit/components/narrate/test/NarrateTestUtils.jsm b/toolkit/components/narrate/test/NarrateTestUtils.jsm index 228b44546b70..8b42f0a15946 100644 --- a/toolkit/components/narrate/test/NarrateTestUtils.jsm +++ b/toolkit/components/narrate/test/NarrateTestUtils.jsm @@ -27,12 +27,15 @@ var NarrateTestUtils = { FORWARD: ".narrate-skip-next", isVisible(element) { - let style = element.ownerGlobal.getComputedStyle(element); + let win = element.ownerGlobal; + let style = win.getComputedStyle(element); if (style.display == "none") { return false; - } else if (style.visibility != "visible") { + } + if (style.visibility != "visible") { return false; - } else if (style.display == "-moz-popup" && element.state != "open") { + } + if (win.XULPopupElement.isInstance(element) && element.state != "open") { return false; } diff --git a/toolkit/content/widgets/button.js b/toolkit/content/widgets/button.js index 2f1c8369112c..da29495d0644 100644 --- a/toolkit/content/widgets/button.js +++ b/toolkit/content/widgets/button.js @@ -182,7 +182,7 @@ return NodeFilter.FILTER_REJECT; } // but it may be a popup element, in which case we look at "state"... - if (cs.display == "-moz-popup" && node.state != "open") { + if (XULPopupElement.isInstance(node) && node.state != "open") { return NodeFilter.FILTER_REJECT; } // OK - the node seems visible, so it is a candidate. diff --git a/toolkit/content/xul.css b/toolkit/content/xul.css index 8d96457c6648..63d95bb59c2c 100644 --- a/toolkit/content/xul.css +++ b/toolkit/content/xul.css @@ -270,7 +270,6 @@ panel { menupopup, panel, tooltip { - display: -moz-popup; position: absolute; -moz-top-layer: top; /* Popups can't have overflow */