diff options
author | Moonchild <moonchild@palemoon.org> | 2021-10-10 23:09:26 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-01 14:47:16 +0200 |
commit | ddaee7c1be914cc28a28cbe27e5922215b3b2e6f (patch) | |
tree | cb8930a9ba1ed0ef574b7c2be9035b1a51201902 /layout/base | |
parent | c030a50228349fa1b2c0b4fbc2e83752324dd4d7 (diff) | |
download | uxp-ddaee7c1be914cc28a28cbe27e5922215b3b2e6f.tar.gz |
Issue #1830 - Remove --disable-xul config and conditionals.
Diffstat (limited to 'layout/base')
-rw-r--r-- | layout/base/RestyleManager.cpp | 3 | ||||
-rw-r--r-- | layout/base/nsCSSFrameConstructor.cpp | 70 | ||||
-rw-r--r-- | layout/base/nsCSSFrameConstructor.h | 4 | ||||
-rw-r--r-- | layout/base/nsCSSRendering.cpp | 8 | ||||
-rw-r--r-- | layout/base/nsCaret.cpp | 2 | ||||
-rw-r--r-- | layout/base/nsDisplayItemTypesList.h | 7 | ||||
-rw-r--r-- | layout/base/nsDocumentViewer.cpp | 6 | ||||
-rw-r--r-- | layout/base/nsLayoutUtils.cpp | 8 | ||||
-rw-r--r-- | layout/base/nsPresShell.cpp | 16 |
9 files changed, 9 insertions, 115 deletions
diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp index 9e80ef7bc7..44a9f4c3c5 100644 --- a/layout/base/RestyleManager.cpp +++ b/layout/base/RestyleManager.cpp @@ -311,7 +311,6 @@ RestyleManager::AttributeChanged(Element* aElement, bool reframe = (hint & nsChangeHint_ReconstructFrame) != 0; -#ifdef MOZ_XUL // The following listbox widget trap prevents offscreen listbox widget // content from being removed and re-inserted (which is what would // happen otherwise). @@ -338,8 +337,6 @@ RestyleManager::AttributeChanged(Element* aElement, } } -#endif // MOZ_XUL - if (primaryFrame) { // See if we have appearance information for a theme. const nsStyleDisplay* disp = primaryFrame->StyleDisplay(); diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index df793c67f8..5b514a330b 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -94,9 +94,8 @@ #include "nsTransitionManager.h" #include "DetailsFrame.h" -#ifdef MOZ_XUL #include "nsIRootBox.h" -#endif + #ifdef ACCESSIBILITY #include "nsAccessibilityService.h" #endif @@ -208,8 +207,6 @@ static FrameCtorDebugFlags gFlags[] = { #define NUM_DEBUG_FLAGS (sizeof(gFlags) / sizeof(gFlags[0])) #endif - -#ifdef MOZ_XUL #include "nsMenuFrame.h" #include "nsPopupSetFrame.h" #include "nsTreeColFrame.h" @@ -291,9 +288,6 @@ NS_NewTitleBarFrame (nsIPresShell* aPresShell, nsStyleContext* aContext); nsIFrame* NS_NewResizerFrame (nsIPresShell* aPresShell, nsStyleContext* aContext); - -#endif - nsHTMLScrollFrame* NS_NewHTMLScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, bool aIsRoot); @@ -748,10 +742,8 @@ public: nsIPresShell *mPresShell; nsFrameManager *mFrameManager; -#ifdef MOZ_XUL // Frames destined for the kPopupList. nsAbsoluteItems mPopupItems; -#endif // Containing block information for out-of-flow frames. nsAbsoluteItems mFixedItems; @@ -967,9 +959,7 @@ nsFrameConstructorState::nsFrameConstructorState( : mPresContext(aPresShell->GetPresContext()), mPresShell(aPresShell), mFrameManager(aPresShell->FrameManager()), -#ifdef MOZ_XUL mPopupItems(nullptr), -#endif mFixedItems(aFixedContainingBlock), mAbsoluteItems(aAbsoluteContainingBlock), mFloatedItems(aFloatContainingBlock), @@ -990,12 +980,10 @@ nsFrameConstructorState::nsFrameConstructorState( aPresShell->GetDocument()), mCurrentPendingBindingInsertionPoint(nullptr) { -#ifdef MOZ_XUL nsIRootBox* rootBox = nsIRootBox::GetRootBox(aPresShell); if (rootBox) { mPopupItems.containingBlock = rootBox->GetPopupSetFrame(); } -#endif MOZ_COUNT_CTOR(nsFrameConstructorState); } @@ -1018,9 +1006,7 @@ nsFrameConstructorState::~nsFrameConstructorState() ProcessFrameInsertions(mFloatedItems, nsIFrame::kFloatList); ProcessFrameInsertions(mAbsoluteItems, nsIFrame::kAbsoluteList); ProcessFrameInsertions(mFixedItems, nsIFrame::kFixedList); -#ifdef MOZ_XUL ProcessFrameInsertions(mPopupItems, nsIFrame::kPopupList); -#endif for (int32_t i = mGeneratedTextNodesWithInitializer.Count() - 1; i >= 0; --i) { mGeneratedTextNodesWithInitializer[i]-> DeleteProperty(nsGkAtoms::genConInitializerProperty); @@ -1164,13 +1150,11 @@ nsFrameConstructorState::GetOutOfFlowFrameItems(nsIFrame* aNewFrame, bool aIsOutOfFlowPopup, nsFrameState* aPlaceholderType) { -#ifdef MOZ_XUL if (MOZ_UNLIKELY(aIsOutOfFlowPopup)) { MOZ_ASSERT(mPopupItems.containingBlock, "Must have a popup set frame!"); *aPlaceholderType = PLACEHOLDER_FOR_POPUP; return &mPopupItems; } -#endif // MOZ_XUL if (aCanBeFloated && aNewFrame->IsFloating()) { *aPlaceholderType = PLACEHOLDER_FOR_FLOAT; return &mFloatedItems; @@ -1315,15 +1299,10 @@ nsFrameConstructorState::ProcessFrameInsertions(nsAbsoluteItems& aFrameItems, ((&aFrameItems == &mFixedItems || \ &aFrameItems == &mTopLayerFixedItems) && \ aChildListID == nsIFrame::kFixedList) -#ifdef MOZ_XUL NS_PRECONDITION(NS_NONXUL_LIST_TEST || (&aFrameItems == &mPopupItems && aChildListID == nsIFrame::kPopupList), "Unexpected aFrameItems/aChildListID combination"); -#else - NS_PRECONDITION(NS_NONXUL_LIST_TEST, - "Unexpected aFrameItems/aChildListID combination"); -#endif if (aFrameItems.IsEmpty()) { return; @@ -2525,7 +2504,6 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle nsFrameConstructorSaveState absoluteSaveState; // Check whether we need to build a XUL box or SVG root frame -#ifdef MOZ_XUL if (aDocElement->IsXULElement()) { contentFrame = NS_NewDocElementBoxFrame(mPresShell, styleContext); InitAndRestoreFrame(state, aDocElement, mDocElementContainingBlock, @@ -2534,7 +2512,6 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle processChildren = true; } else -#endif if (aDocElement->IsSVGElement()) { if (!aDocElement->IsSVGElement(nsGkAtoms::svg)) { return nullptr; @@ -2803,13 +2780,11 @@ nsCSSFrameConstructor::SetUpDocElementContainingBlock(nsIContent* aDocElement) nsIAtom* rootPseudo; if (!isPaginated) { -#ifdef MOZ_XUL if (aDocElement->IsXULElement()) { // pass a temporary stylecontext, the correct one will be set later rootFrame = NS_NewRootBoxFrame(mPresShell, viewportPseudoStyle); } else -#endif { // pass a temporary stylecontext, the correct one will be set later rootFrame = NS_NewCanvasFrame(mPresShell, viewportPseudoStyle); @@ -3972,9 +3947,8 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt nsContainerFrame* newFrameAsContainer = do_QueryFrame(newFrame); if (newFrameAsContainer) { -#ifdef MOZ_XUL - // Icky XUL stuff, sadly + // Icky XUL stuff, sadly if (aItem.mIsRootPopupgroup) { NS_ASSERTION(nsIRootBox::GetRootBox(mPresShell) && nsIRootBox::GetRootBox(mPresShell)->GetPopupSetFrame() == @@ -3983,7 +3957,6 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt aState.mPopupItems.containingBlock = newFrameAsContainer; aState.mHavePendingPopupgroup = false; } -#endif /* MOZ_XUL */ // Process the child content if requested nsFrameItems childItems; @@ -4072,7 +4045,6 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt } } -#ifdef MOZ_XUL // More icky XUL stuff if (aItem.mNameSpaceID == kNameSpaceID_XUL && (aItem.mTag == nsGkAtoms::treechildren || // trees always need titletips @@ -4083,7 +4055,6 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt rootBox->AddTooltipSupport(content); } } -#endif NS_ASSERTION(newFrame->IsFrameOfType(nsIFrame::eLineParticipant) == ((bits & FCDATA_IS_LINE_PARTICIPANT) != 0), @@ -4251,12 +4222,9 @@ static bool IsXULDisplayType(const nsStyleDisplay* aDisplay) { return (aDisplay->mDisplay == StyleDisplay::InlineBox || -#ifdef MOZ_XUL aDisplay->mDisplay == StyleDisplay::InlineXulGrid || aDisplay->mDisplay == StyleDisplay::InlineStack || -#endif aDisplay->mDisplay == StyleDisplay::Box -#ifdef MOZ_XUL || aDisplay->mDisplay == StyleDisplay::XulGrid || aDisplay->mDisplay == StyleDisplay::Stack || aDisplay->mDisplay == StyleDisplay::XulGridGroup || @@ -4264,7 +4232,6 @@ bool IsXULDisplayType(const nsStyleDisplay* aDisplay) aDisplay->mDisplay == StyleDisplay::Deck || aDisplay->mDisplay == StyleDisplay::Popup || aDisplay->mDisplay == StyleDisplay::Groupbox -#endif ); } @@ -4314,7 +4281,6 @@ nsCSSFrameConstructor::FindXULTagData(Element* aElement, } static const FrameConstructionDataByTag sXULTagData[] = { -#ifdef MOZ_XUL SCROLLABLE_XUL_CREATE(button, NS_NewButtonBoxFrame), SCROLLABLE_XUL_CREATE(checkbox, NS_NewButtonBoxFrame), SCROLLABLE_XUL_CREATE(radio, NS_NewButtonBoxFrame), @@ -4342,7 +4308,6 @@ nsCSSFrameConstructor::FindXULTagData(Element* aElement, SIMPLE_TAG_CHAIN(listboxbody, nsCSSFrameConstructor::FindXULListBoxBodyData), SIMPLE_TAG_CHAIN(listitem, nsCSSFrameConstructor::FindXULListItemData), -#endif /* MOZ_XUL */ SIMPLE_XUL_CREATE(slider, NS_NewSliderFrame), SIMPLE_XUL_CREATE(scrollbar, NS_NewScrollbarFrame), SIMPLE_XUL_CREATE(scrollbarbutton, NS_NewScrollbarButtonFrame) @@ -4352,7 +4317,6 @@ nsCSSFrameConstructor::FindXULTagData(Element* aElement, ArrayLength(sXULTagData)); } -#ifdef MOZ_XUL /* static */ const nsCSSFrameConstructor::FrameConstructionData* nsCSSFrameConstructor::FindPopupGroupData(Element* aElement, @@ -4436,8 +4400,6 @@ nsCSSFrameConstructor::FindXULListItemData(Element* aElement, return &sListItemData; } -#endif /* MOZ_XUL */ - /* static */ const nsCSSFrameConstructor::FrameConstructionData* nsCSSFrameConstructor::FindXULDisplayData(const nsStyleDisplay* aDisplay, @@ -4449,7 +4411,6 @@ nsCSSFrameConstructor::FindXULDisplayData(const nsStyleDisplay* aDisplay, NS_NewBoxFrame), SCROLLABLE_ABSPOS_CONTAINER_XUL_DISPLAY_CREATE(StyleDisplay::InlineBox, NS_NewBoxFrame), -#ifdef MOZ_XUL SCROLLABLE_XUL_DISPLAY_CREATE(StyleDisplay::XulGrid, NS_NewGridBoxFrame), SCROLLABLE_XUL_DISPLAY_CREATE(StyleDisplay::InlineXulGrid, NS_NewGridBoxFrame), SCROLLABLE_XUL_DISPLAY_CREATE(StyleDisplay::XulGridGroup, @@ -4463,7 +4424,6 @@ nsCSSFrameConstructor::FindXULDisplayData(const nsStyleDisplay* aDisplay, FCDATA_FOR_DISPLAY(StyleDisplay::Popup, FCDATA_DECL(FCDATA_DISALLOW_OUT_OF_FLOW | FCDATA_IS_POPUP | FCDATA_SKIP_ABSPOS_PUSH, NS_NewMenuPopupFrame)) -#endif /* MOZ_XUL */ }; if (aDisplay->mDisplay < StyleDisplay::Box) { @@ -5831,7 +5791,6 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState return; } -#ifdef MOZ_XUL if ((data->mBits & FCDATA_IS_POPUP) && (!aParentFrame || // Parent is inline aParentFrame->GetType() != nsGkAtoms::menuFrame)) { @@ -5844,7 +5803,6 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState isPopup = true; } -#endif /* MOZ_XUL */ } uint32_t bits = data->mBits; @@ -6821,8 +6779,6 @@ IsSpecialFramesetChild(nsIContent* aContent) static void InvalidateCanvasIfNeeded(nsIPresShell* presShell, nsIContent* node); -#ifdef MOZ_XUL - static bool IsXULListBox(nsIContent* aContainer) @@ -6850,7 +6806,6 @@ MaybeGetListBoxBodyFrame(nsIContent* aContainer, nsIContent* aChild) return nullptr; } -#endif void nsCSSFrameConstructor::AddTextItemIfNeeded(nsFrameConstructorState& aState, @@ -7075,12 +7030,9 @@ nsCSSFrameConstructor::IssueSingleInsertNofications(nsIContent* aContainer, child = child->GetNextSibling()) { if ((child->GetPrimaryFrame() || GetUndisplayedContent(child) || GetDisplayContentsStyleFor(child)) -#ifdef MOZ_XUL // Except listboxes suck, so do NOT skip anything here if // we plan to notify a listbox. - && !MaybeGetListBoxBodyFrame(aContainer, child) -#endif - ) { + && !MaybeGetListBoxBodyFrame(aContainer, child)) { // Already have a frame or undisplayed entry for this content; a // previous ContentInserted in this loop must have reconstructed // its insertion parent. Skip it. @@ -7208,7 +7160,6 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer, } #endif -#ifdef MOZ_XUL if (aContainer) { int32_t namespaceID; nsIAtom* tag = @@ -7221,7 +7172,6 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer, return; } -#endif // MOZ_XUL if (aContainer && aContainer->HasFlag(NODE_IS_IN_SHADOW_TREE) && !aContainer->IsInNativeAnonymousSubtree() && @@ -7511,8 +7461,6 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer, return; } -#ifdef MOZ_XUL - enum content_operation { CONTENT_INSERTED, @@ -7549,7 +7497,6 @@ bool NotifyListBoxBody(nsPresContext* aPresContext, return false; } -#endif // MOZ_XUL void nsCSSFrameConstructor::ContentInserted(nsIContent* aContainer, @@ -7632,7 +7579,6 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer, NS_ASSERTION(isSingleInsert || aEndChild, "range should not include all nodes after aStartChild"); -#ifdef MOZ_XUL if (aContainer && IsXULListBox(aContainer)) { if (isSingleInsert) { if (NotifyListBoxBody(mPresShell->GetPresContext(), aContainer, @@ -7651,7 +7597,6 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer, return; } } -#endif // MOZ_XUL // If we have a null parent, then this must be the document element being // inserted, or some other child of the document in the DOM (might be a PI, @@ -8172,7 +8117,6 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer, ClearDisplayContentsIn(aChild, aContainer); } -#ifdef MOZ_XUL if (NotifyListBoxBody(presContext, aContainer, aChild, aOldNextSibling, childFrame, CONTENT_REMOVED)) { if (aFlags == REMOVE_DESTROY_FRAMES) { @@ -8181,8 +8125,6 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer, return; } -#endif // MOZ_XUL - // If we're removing the root, then make sure to remove things starting at // the viewport's child instead of the primary frame (which might even be // null if the root had an XBL binding or display:none, even though the @@ -8774,11 +8716,9 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext, "no support for fragmenting table captions yet"); newFrame = NS_NewBlockFrame(shell, styleContext); newFrame->Init(content, aParentFrame, aFrame); -#ifdef MOZ_XUL } else if (nsGkAtoms::XULLabelFrame == frameType) { newFrame = NS_NewXULLabelFrame(shell, styleContext); newFrame->Init(content, aParentFrame, aFrame); -#endif } else if (nsGkAtoms::columnSetFrame == frameType) { MOZ_ASSERT(!aFrame->IsTableCaption(), "no support for fragmenting table captions yet"); @@ -9370,7 +9310,6 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval( return true; } -#ifdef MOZ_XUL if (aFrame->GetType() == nsGkAtoms::popupSetFrame) { nsIRootBox* rootBox = nsIRootBox::GetRootBox(mPresShell); if (rootBox && rootBox->GetPopupSetFrame() == aFrame) { @@ -9378,7 +9317,6 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval( return true; } } -#endif // Reconstruct if inflowFrame is parent's only child, and parent is, or has, // a non-fluid continuation, i.e. it was split by bidi resolution @@ -11487,7 +11425,6 @@ nsCSSFrameConstructor::CreateListBoxContent(nsContainerFrame* aParentFrame, nsIFrame** aNewFrame, bool aIsAppend) { -#ifdef MOZ_XUL // Construct a new frame if (nullptr != aParentFrame) { nsFrameItems frameItems; @@ -11544,7 +11481,6 @@ nsCSSFrameConstructor::CreateListBoxContent(nsContainerFrame* aParentFrame, } #endif } -#endif } //---------------------------------------- diff --git a/layout/base/nsCSSFrameConstructor.h b/layout/base/nsCSSFrameConstructor.h index 1df38b58a8..738ac82eca 100644 --- a/layout/base/nsCSSFrameConstructor.h +++ b/layout/base/nsCSSFrameConstructor.h @@ -633,11 +633,9 @@ private: /* If FCDATA_MAY_NEED_SCROLLFRAME is set, the new frame should be wrapped in a scrollframe if its overflow type so requires. */ #define FCDATA_MAY_NEED_SCROLLFRAME 0x80 -#ifdef MOZ_XUL /* If FCDATA_IS_POPUP is set, the new frame is a XUL popup frame. These need some really weird special handling. */ #define FCDATA_IS_POPUP 0x100 -#endif /* MOZ_XUL */ /* If FCDATA_SKIP_ABSPOS_PUSH is set, don't push this frame as an absolute containing block, no matter what its style says. */ #define FCDATA_SKIP_ABSPOS_PUSH 0x200 @@ -1462,7 +1460,6 @@ private: int32_t aNameSpaceID, nsStyleContext* aStyleContext); // XUL data-finding helper functions and structures -#ifdef MOZ_XUL static const FrameConstructionData* FindPopupGroupData(Element* aElement, nsStyleContext* aStyleContext); // sXULTextBoxData used for both labels and descriptions @@ -1475,7 +1472,6 @@ private: FindXULListBoxBodyData(Element* aElement, nsStyleContext* aStyleContext); static const FrameConstructionData* FindXULListItemData(Element* aElement, nsStyleContext* aStyleContext); -#endif /* MOZ_XUL */ // Function to find FrameConstructionData for aContent using one of the XUL // display types. Will return null if aDisplay doesn't have a XUL display diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index d5df170203..70186df2be 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -879,13 +879,7 @@ nsCSSRendering::PaintOutline(nsPresContext* aPresContext, bgContext->GetVisitedDependentColor(eCSSProperty_background_color); nsRect innerRect; - if ( -#ifdef MOZ_XUL - aStyleContext->GetPseudoType() == CSSPseudoElementType::XULTree -#else - false -#endif - ) { + if (aStyleContext->GetPseudoType() == CSSPseudoElementType::XULTree) { innerRect = aBorderArea; } else { innerRect = GetOutlineInnerRect(aForFrame) + aBorderArea.TopLeft(); diff --git a/layout/base/nsCaret.cpp b/layout/base/nsCaret.cpp index 2194a01f31..c79dde1a35 100644 --- a/layout/base/nsCaret.cpp +++ b/layout/base/nsCaret.cpp @@ -832,7 +832,6 @@ size_t nsCaret::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const bool nsCaret::IsMenuPopupHidingCaret() { -#ifdef MOZ_XUL // Check if there are open popups. nsXULPopupManager *popMgr = nsXULPopupManager::GetInstance(); nsTArray<nsIFrame*> popups; @@ -873,7 +872,6 @@ bool nsCaret::IsMenuPopupHidingCaret() return true; } } -#endif // There are no open menu popups, no need to hide the caret. return false; diff --git a/layout/base/nsDisplayItemTypesList.h b/layout/base/nsDisplayItemTypesList.h index cf809817ff..a46a0c0999 100644 --- a/layout/base/nsDisplayItemTypesList.h +++ b/layout/base/nsDisplayItemTypesList.h @@ -1,4 +1,9 @@ // IWYU pragma: private, include "nsDisplayList.h" +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ DECLARE_DISPLAY_ITEM_TYPE(ALT_FEEDBACK) DECLARE_DISPLAY_ITEM_TYPE(BACKGROUND) DECLARE_DISPLAY_ITEM_TYPE(THEMED_BACKGROUND) @@ -69,7 +74,6 @@ DECLARE_DISPLAY_ITEM_TYPE(ZOOM) DECLARE_DISPLAY_ITEM_TYPE(REFLOW_COUNT) #endif -#ifdef MOZ_XUL DECLARE_DISPLAY_ITEM_TYPE(XUL_EVENT_REDIRECTOR) DECLARE_DISPLAY_ITEM_TYPE(XUL_GROUP_BACKGROUND) DECLARE_DISPLAY_ITEM_TYPE(XUL_IMAGE) @@ -79,7 +83,6 @@ DECLARE_DISPLAY_ITEM_TYPE(XUL_TREE_COL_SPLITTER_TARGET) #ifdef DEBUG_LAYOUT DECLARE_DISPLAY_ITEM_TYPE(XUL_DEBUG) #endif -#endif DECLARE_DISPLAY_ITEM_TYPE(MATHML_BAR) DECLARE_DISPLAY_ITEM_TYPE(MATHML_CHAR_FOREGROUND) diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index a0af38c289..f919e16477 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -64,10 +64,8 @@ #include "nsCopySupport.h" #include "nsIDOMHTMLFrameSetElement.h" #include "nsIDOMHTMLImageElement.h" -#ifdef MOZ_XUL #include "nsIXULDocument.h" #include "nsXULPopupManager.h" -#endif #include "nsIClipboardHelper.h" @@ -1395,11 +1393,9 @@ nsDocumentViewer::PageHide(bool aIsUnload) EventDispatcher::Dispatch(window, mPresContext, &event, nullptr, &status); } -#ifdef MOZ_XUL // look for open menupopups and close them after the unload event, in case // the unload event listeners open any new popups nsContentUtils::HidePopupsInDocument(mDocument); -#endif return NS_OK; } @@ -3583,7 +3579,6 @@ nsDocumentViewer::GetPopupNode(nsIDOMNode** aNode) // get the popup node nsCOMPtr<nsIDOMNode> node = root->GetPopupNode(); -#ifdef MOZ_XUL if (!node) { nsPIDOMWindowOuter* rootWindow = root->GetWindow(); if (rootWindow) { @@ -3596,7 +3591,6 @@ nsDocumentViewer::GetPopupNode(nsIDOMNode** aNode) } } } -#endif node.swap(*aNode); } diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index ccdc5503f8..6c73db7e2e 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -118,11 +118,7 @@ #include "RegionBuilder.h" #include "SVGSVGElement.h" #include "nsDocument.h" - -#ifdef MOZ_XUL #include "nsXULPopupManager.h" -#endif - #include "GeckoProfiler.h" #include "nsAnimationManager.h" #include "nsTransitionManager.h" @@ -1443,7 +1439,6 @@ nsLayoutUtils::GetChildListNameFor(nsIFrame* aChildFrame) } else { id = nsIFrame::kAbsoluteList; } -#ifdef MOZ_XUL } else if (StyleDisplay::Popup == disp->mDisplay) { // Out-of-flows that are DISPLAY_POPUP must be kids of the root popup set #ifdef DEBUG @@ -1453,7 +1448,6 @@ nsLayoutUtils::GetChildListNameFor(nsIFrame* aChildFrame) #endif // DEBUG id = nsIFrame::kPopupList; -#endif // MOZ_XUL } else { NS_ASSERTION(aChildFrame->IsFloating(), "not a floated frame"); id = nsIFrame::kFloatList; @@ -2280,7 +2274,6 @@ nsIFrame* nsLayoutUtils::GetPopupFrameForEventCoordinates(nsPresContext* aPresContext, const WidgetEvent* aEvent) { -#ifdef MOZ_XUL nsXULPopupManager* pm = nsXULPopupManager::GetInstance(); if (!pm) { return nullptr; @@ -2297,7 +2290,6 @@ nsLayoutUtils::GetPopupFrameForEventCoordinates(nsPresContext* aPresContext, return popup; } } -#endif return nullptr; } diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 37475d9595..eeb059f278 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -149,7 +149,6 @@ // For style data reconstruction #include "nsStyleChangeList.h" #include "nsCSSFrameConstructor.h" -#ifdef MOZ_XUL #include "nsMenuFrame.h" #include "nsTreeBodyFrame.h" #include "nsIBoxObject.h" @@ -159,9 +158,6 @@ #include "nsIDOMXULMultSelectCntrlEl.h" #include "nsIDOMXULSelectCntrlItemEl.h" #include "nsIDOMXULMenuListElement.h" - -#endif - #include "GeckoProfiler.h" #include "gfxPlatform.h" #include "Layers.h" @@ -951,9 +947,7 @@ PresShell::Init(nsIDocument* aDocument, os->AddObserver(this, "agent-sheet-removed", false); os->AddObserver(this, "user-sheet-removed", false); os->AddObserver(this, "author-sheet-removed", false); -#ifdef MOZ_XUL os->AddObserver(this, "chrome-flush-skin-caches", false); -#endif os->AddObserver(this, "memory-pressure", false); } } @@ -1165,9 +1159,7 @@ PresShell::Destroy() os->RemoveObserver(this, "agent-sheet-removed"); os->RemoveObserver(this, "user-sheet-removed"); os->RemoveObserver(this, "author-sheet-removed"); -#ifdef MOZ_XUL os->RemoveObserver(this, "chrome-flush-skin-caches"); -#endif os->RemoveObserver(this, "memory-pressure"); } } @@ -8336,7 +8328,6 @@ PresShell::HandleDOMEventWithTarget(nsIContent* aTargetContent, bool PresShell::AdjustContextMenuKeyEvent(WidgetMouseEvent* aEvent) { -#ifdef MOZ_XUL // if a menu is open, open the context menu relative to the active item on the menu. nsXULPopupManager* pm = nsXULPopupManager::GetInstance(); if (pm) { @@ -8359,7 +8350,6 @@ PresShell::AdjustContextMenuKeyEvent(WidgetMouseEvent* aEvent) return true; } } -#endif // If we're here because of the key-equiv for showing context menus, we // have to twiddle with the NS event to make sure the context menu comes @@ -8562,7 +8552,6 @@ PresShell::GetCurrentItemAndPositionForElement(nsIDOMElement *aCurrentEl, bool istree = false, checkLineHeight = true; nscoord extraTreeY = 0; -#ifdef MOZ_XUL // Set the position to just underneath the current item for multi-select // lists or just underneath the selected item for single-select lists. If // the element is not a list, or there is no selection, leave the position @@ -8635,7 +8624,6 @@ PresShell::GetCurrentItemAndPositionForElement(nsIDOMElement *aCurrentEl, if (item) focusedContent = do_QueryInterface(item); -#endif nsIFrame *frame = focusedContent->GetPrimaryFrame(); if (frame) { @@ -9411,7 +9399,6 @@ PresShell::WindowSizeMoveDone() } } -#ifdef MOZ_XUL /* * It's better to add stuff to the |DidSetStyleContext| method of the * relevant frames than adding it here. These methods should (ideally, @@ -9475,7 +9462,6 @@ WalkFramesThroughPlaceholders(nsPresContext *aPresContext, nsIFrame *aFrame, } } } -#endif NS_IMETHODIMP PresShell::Observe(nsISupports* aSubject, @@ -9487,7 +9473,6 @@ PresShell::Observe(nsISupports* aSubject, return NS_OK; } -#ifdef MOZ_XUL if (!nsCRT::strcmp(aTopic, "chrome-flush-skin-caches")) { nsIFrame *rootFrame = mFrameConstructor->GetRootFrame(); // Need to null-check because "chrome-flush-skin-caches" can happen @@ -9527,7 +9512,6 @@ PresShell::Observe(nsISupports* aSubject, } return NS_OK; } -#endif if (!nsCRT::strcmp(aTopic, "agent-sheet-added")) { if (mStyleSet) { |