summaryrefslogtreecommitdiff
path: root/layout
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-10-10 23:09:26 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-01 14:47:16 +0200
commitddaee7c1be914cc28a28cbe27e5922215b3b2e6f (patch)
treecb8930a9ba1ed0ef574b7c2be9035b1a51201902 /layout
parentc030a50228349fa1b2c0b4fbc2e83752324dd4d7 (diff)
downloaduxp-ddaee7c1be914cc28a28cbe27e5922215b3b2e6f.tar.gz
Issue #1830 - Remove --disable-xul config and conditionals.
Diffstat (limited to 'layout')
-rw-r--r--layout/base/RestyleManager.cpp3
-rw-r--r--layout/base/nsCSSFrameConstructor.cpp70
-rw-r--r--layout/base/nsCSSFrameConstructor.h4
-rw-r--r--layout/base/nsCSSRendering.cpp8
-rw-r--r--layout/base/nsCaret.cpp2
-rw-r--r--layout/base/nsDisplayItemTypesList.h7
-rw-r--r--layout/base/nsDocumentViewer.cpp6
-rw-r--r--layout/base/nsLayoutUtils.cpp8
-rw-r--r--layout/base/nsPresShell.cpp16
-rw-r--r--layout/build/nsLayoutModule.cpp30
-rw-r--r--layout/build/nsLayoutStatics.cpp13
-rw-r--r--layout/generic/ReflowInput.cpp4
-rw-r--r--layout/generic/TextOverflow.cpp3
-rw-r--r--layout/generic/nsContainerFrame.cpp5
-rw-r--r--layout/generic/nsFrame.cpp4
-rw-r--r--layout/inspector/moz.build6
-rw-r--r--layout/style/Loader.cpp18
-rw-r--r--layout/style/SVGAttrAnimationRuleProcessor.cpp2
-rw-r--r--layout/style/SVGAttrAnimationRuleProcessor.h2
-rw-r--r--layout/style/StyleRule.cpp12
-rw-r--r--layout/style/nsCSSAnonBoxList.h2
-rw-r--r--layout/style/nsCSSAnonBoxes.cpp2
-rw-r--r--layout/style/nsCSSAnonBoxes.h2
-rw-r--r--layout/style/nsCSSParser.cpp21
-rw-r--r--layout/style/nsCSSProps.cpp2
-rw-r--r--layout/style/nsCSSPseudoElements.cpp2
-rw-r--r--layout/style/nsCSSPseudoElements.h2
-rw-r--r--layout/style/nsCSSRuleProcessor.cpp12
-rw-r--r--layout/style/nsCSSRuleProcessor.h2
-rw-r--r--layout/style/nsHTMLCSSStyleSheet.cpp2
-rw-r--r--layout/style/nsHTMLCSSStyleSheet.h2
-rw-r--r--layout/style/nsHTMLStyleSheet.cpp9
-rw-r--r--layout/style/nsHTMLStyleSheet.h2
-rw-r--r--layout/style/nsIStyleRuleProcessor.h4
-rw-r--r--layout/style/nsRuleNode.cpp4
-rw-r--r--layout/style/nsRuleProcessorData.h2
-rw-r--r--layout/style/nsStyleConsts.h2
-rw-r--r--layout/style/nsStyleSet.cpp9
-rw-r--r--layout/style/nsStyleSet.h2
-rw-r--r--layout/xul/BoxObject.cpp4
-rw-r--r--layout/xul/moz.build63
-rw-r--r--layout/xul/nsXULLabelFrame.h4
-rw-r--r--layout/xul/nsXULTooltipListener.cpp33
-rw-r--r--layout/xul/nsXULTooltipListener.h8
44 files changed, 46 insertions, 374 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) {
diff --git a/layout/build/nsLayoutModule.cpp b/layout/build/nsLayoutModule.cpp
index 3c6f5f3aa5..207ce6f2f9 100644
--- a/layout/build/nsLayoutModule.cpp
+++ b/layout/build/nsLayoutModule.cpp
@@ -136,15 +136,12 @@ class nsIDocumentLoaderFactory;
#include "nsIBoxObject.h"
-#ifdef MOZ_XUL
#include "inDOMView.h"
-#endif /* MOZ_XUL */
#include "inDeepTreeWalker.h"
#include "inCSSValueSearch.h"
#include "inDOMUtils.h"
-#ifdef MOZ_XUL
#include "nsIXULDocument.h"
#include "nsIXULSortService.h"
@@ -153,7 +150,6 @@ NS_NewXULContentBuilder(nsISupports* aOuter, REFNSIID aIID, void** aResult);
nsresult
NS_NewXULTreeBuilder(nsISupports* aOuter, REFNSIID aIID, void** aResult);
-#endif
static void Shutdown();
@@ -331,14 +327,12 @@ nsresult NS_NewLayoutDebugger(nsILayoutDebugger** aResult);
nsresult NS_NewBoxObject(nsIBoxObject** aResult);
-#ifdef MOZ_XUL
nsresult NS_NewListBoxObject(nsIBoxObject** aResult);
nsresult NS_NewScrollBoxObject(nsIBoxObject** aResult);
nsresult NS_NewMenuBoxObject(nsIBoxObject** aResult);
nsresult NS_NewPopupBoxObject(nsIBoxObject** aResult);
nsresult NS_NewContainerBoxObject(nsIBoxObject** aResult);
nsresult NS_NewTreeBoxObject(nsIBoxObject** aResult);
-#endif
nsresult NS_NewCanvasRenderingContextWebGL(nsIDOMWebGLRenderingContext** aResult);
@@ -401,18 +395,14 @@ MAKE_CTOR(CreateNewLayoutDebugger, nsILayoutDebugger, NS_NewLay
MAKE_CTOR(CreateNewFrameTraversal, nsIFrameTraversal, NS_CreateFrameTraversal)
MAKE_CTOR(CreateNewBoxObject, nsIBoxObject, NS_NewBoxObject)
-#ifdef MOZ_XUL
MAKE_CTOR(CreateNewListBoxObject, nsIBoxObject, NS_NewListBoxObject)
MAKE_CTOR(CreateNewMenuBoxObject, nsIBoxObject, NS_NewMenuBoxObject)
MAKE_CTOR(CreateNewPopupBoxObject, nsIBoxObject, NS_NewPopupBoxObject)
MAKE_CTOR(CreateNewScrollBoxObject, nsIBoxObject, NS_NewScrollBoxObject)
MAKE_CTOR(CreateNewTreeBoxObject, nsIBoxObject, NS_NewTreeBoxObject)
MAKE_CTOR(CreateNewContainerBoxObject, nsIBoxObject, NS_NewContainerBoxObject)
-#endif // MOZ_XUL
-#ifdef MOZ_XUL
NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMView)
-#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(inDeepTreeWalker)
NS_GENERIC_FACTORY_CONSTRUCTOR(inCSSValueSearch)
NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMUtils)
@@ -433,13 +423,11 @@ MAKE_CTOR(CreateHTMLContentSerializer, nsIContentSerializer, NS_NewHTM
MAKE_CTOR(CreateXHTMLContentSerializer, nsIContentSerializer, NS_NewXHTMLContentSerializer)
MAKE_CTOR(CreatePlainTextSerializer, nsIContentSerializer, NS_NewPlainTextSerializer)
MAKE_CTOR(CreateContentPolicy, nsIContentPolicy, NS_NewContentPolicy)
-#ifdef MOZ_XUL
MAKE_CTOR(CreateXULSortService, nsIXULSortService, NS_NewXULSortService)
// NS_NewXULContentBuilder
// NS_NewXULTreeBuilder
MAKE_CTOR(CreateXULDocument, nsIXULDocument, NS_NewXULDocument)
// NS_NewXULControllers
-#endif
MAKE_CTOR(CreateContentDLF, nsIDocumentLoaderFactory, NS_NewContentDocumentLoaderFactory)
MAKE_CTOR(CreateEventListenerService, nsIEventListenerService, NS_NewEventListenerService)
MAKE_CTOR(CreateGlobalMessageManager, nsIMessageBroadcaster, NS_NewGlobalMessageManager)
@@ -549,17 +537,13 @@ NS_DEFINE_NAMED_CID(NS_LAYOUT_DEBUGGER_CID);
#endif
NS_DEFINE_NAMED_CID(NS_FRAMETRAVERSAL_CID);
NS_DEFINE_NAMED_CID(NS_BOXOBJECT_CID);
-#ifdef MOZ_XUL
NS_DEFINE_NAMED_CID(NS_LISTBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_MENUBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_POPUPBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_CONTAINERBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_SCROLLBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_TREEBOXOBJECT_CID);
-#endif // MOZ_XUL
-#ifdef MOZ_XUL
NS_DEFINE_NAMED_CID(IN_DOMVIEW_CID);
-#endif
NS_DEFINE_NAMED_CID(IN_DEEPTREEWALKER_CID);
NS_DEFINE_NAMED_CID(IN_CSSVALUESEARCH_CID);
NS_DEFINE_NAMED_CID(IN_DOMUTILS_CID);
@@ -585,12 +569,10 @@ NS_DEFINE_NAMED_CID(NS_CONTENTPOLICY_CID);
NS_DEFINE_NAMED_CID(NS_DATADOCUMENTCONTENTPOLICY_CID);
NS_DEFINE_NAMED_CID(NS_NODATAPROTOCOLCONTENTPOLICY_CID);
NS_DEFINE_NAMED_CID(NS_XULCONTROLLERS_CID);
-#ifdef MOZ_XUL
NS_DEFINE_NAMED_CID(NS_XULSORTSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_XULTEMPLATEBUILDER_CID);
NS_DEFINE_NAMED_CID(NS_XULTREEBUILDER_CID);
NS_DEFINE_NAMED_CID(NS_XULDOCUMENT_CID);
-#endif
NS_DEFINE_NAMED_CID(NS_CONTENT_DOCUMENT_LOADER_FACTORY_CID);
NS_DEFINE_NAMED_CID(NS_JSPROTOCOLHANDLER_CID);
NS_DEFINE_NAMED_CID(NS_JSURI_CID);
@@ -802,17 +784,13 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
#endif
{ &kNS_FRAMETRAVERSAL_CID, false, nullptr, CreateNewFrameTraversal },
{ &kNS_BOXOBJECT_CID, false, nullptr, CreateNewBoxObject },
-#ifdef MOZ_XUL
{ &kNS_LISTBOXOBJECT_CID, false, nullptr, CreateNewListBoxObject },
{ &kNS_MENUBOXOBJECT_CID, false, nullptr, CreateNewMenuBoxObject },
{ &kNS_POPUPBOXOBJECT_CID, false, nullptr, CreateNewPopupBoxObject },
{ &kNS_CONTAINERBOXOBJECT_CID, false, nullptr, CreateNewContainerBoxObject },
{ &kNS_SCROLLBOXOBJECT_CID, false, nullptr, CreateNewScrollBoxObject },
{ &kNS_TREEBOXOBJECT_CID, false, nullptr, CreateNewTreeBoxObject },
-#endif // MOZ_XUL
-#ifdef MOZ_XUL
{ &kIN_DOMVIEW_CID, false, nullptr, inDOMViewConstructor },
-#endif
{ &kIN_DEEPTREEWALKER_CID, false, nullptr, inDeepTreeWalkerConstructor },
{ &kIN_CSSVALUESEARCH_CID, false, nullptr, inCSSValueSearchConstructor },
{ &kIN_DOMUTILS_CID, false, nullptr, inDOMUtilsConstructor },
@@ -838,12 +816,10 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
{ &kNS_DATADOCUMENTCONTENTPOLICY_CID, false, nullptr, nsDataDocumentContentPolicyConstructor },
{ &kNS_NODATAPROTOCOLCONTENTPOLICY_CID, false, nullptr, nsNoDataProtocolContentPolicyConstructor },
{ &kNS_XULCONTROLLERS_CID, false, nullptr, NS_NewXULControllers },
-#ifdef MOZ_XUL
{ &kNS_XULSORTSERVICE_CID, false, nullptr, CreateXULSortService },
{ &kNS_XULTEMPLATEBUILDER_CID, false, nullptr, NS_NewXULContentBuilder },
{ &kNS_XULTREEBUILDER_CID, false, nullptr, NS_NewXULTreeBuilder },
{ &kNS_XULDOCUMENT_CID, false, nullptr, CreateXULDocument },
-#endif
{ &kNS_CONTENT_DOCUMENT_LOADER_FACTORY_CID, false, nullptr, CreateContentDLF },
{ &kNS_JSPROTOCOLHANDLER_CID, false, nullptr, nsJSProtocolHandler::Create },
{ &kNS_JSURI_CID, false, nullptr, nsJSURIConstructor },
@@ -919,17 +895,13 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
XPCONNECT_CONTRACTS
{ "@mozilla.org/layout/xul-boxobject;1", &kNS_BOXOBJECT_CID },
-#ifdef MOZ_XUL
{ "@mozilla.org/layout/xul-boxobject-listbox;1", &kNS_LISTBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-menu;1", &kNS_MENUBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-popup;1", &kNS_POPUPBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-container;1", &kNS_CONTAINERBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-scrollbox;1", &kNS_SCROLLBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-tree;1", &kNS_TREEBOXOBJECT_CID },
-#endif // MOZ_XUL
-#ifdef MOZ_XUL
{ "@mozilla.org/inspector/dom-view;1", &kIN_DOMVIEW_CID },
-#endif
{ "@mozilla.org/inspector/deep-tree-walker;1", &kIN_DEEPTREEWALKER_CID },
{ "@mozilla.org/inspector/search;1?type=cssvalue", &kIN_CSSVALUESEARCH_CID },
{ IN_DOMUTILS_CONTRACTID, &kIN_DOMUTILS_CID },
@@ -960,12 +932,10 @@ static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
{ NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID, &kNS_DATADOCUMENTCONTENTPOLICY_CID },
{ NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID, &kNS_NODATAPROTOCOLCONTENTPOLICY_CID },
{ "@mozilla.org/xul/xul-controllers;1", &kNS_XULCONTROLLERS_CID },
-#ifdef MOZ_XUL
{ "@mozilla.org/xul/xul-sort-service;1", &kNS_XULSORTSERVICE_CID },
{ "@mozilla.org/xul/xul-template-builder;1", &kNS_XULTEMPLATEBUILDER_CID },
{ "@mozilla.org/xul/xul-tree-builder;1", &kNS_XULTREEBUILDER_CID },
{ "@mozilla.org/xul/xul-document;1", &kNS_XULDOCUMENT_CID },
-#endif
{ CONTENT_DLF_CONTRACTID, &kNS_CONTENT_DOCUMENT_LOADER_FACTORY_CID },
{ NS_JSPROTOCOLHANDLER_CONTRACTID, &kNS_JSPROTOCOLHANDLER_CID },
{ NS_WINDOWCONTROLLER_CONTRACTID, &kNS_WINDOWCONTROLLER_CID },
diff --git a/layout/build/nsLayoutStatics.cpp b/layout/build/nsLayoutStatics.cpp
index 014176f03c..e9095ce03e 100644
--- a/layout/build/nsLayoutStatics.cpp
+++ b/layout/build/nsLayoutStatics.cpp
@@ -75,7 +75,6 @@
#include "mozilla/dom/PromiseDebugging.h"
#include "mozilla/dom/WebCryptoThreadPool.h"
-#ifdef MOZ_XUL
#include "nsXULPopupManager.h"
#include "nsXULContentUtils.h"
#include "nsXULPrototypeCache.h"
@@ -84,7 +83,6 @@
#include "inDOMView.h"
#include "nsMenuBarListener.h"
-#endif
#include "nsTextServicesDocument.h"
@@ -208,15 +206,12 @@ nsLayoutStatics::Initialize()
return rv;
}
-#ifdef MOZ_XUL
rv = nsXULContentUtils::Init();
if (NS_FAILED(rv)) {
NS_ERROR("Could not initialize nsXULContentUtils");
return rv;
}
-#endif
-
nsMathMLOperators::AddRefTable();
#ifdef DEBUG
@@ -245,13 +240,11 @@ nsLayoutStatics::Initialize()
nsCSSParser::Startup();
nsCSSRuleProcessor::Startup();
-#ifdef MOZ_XUL
rv = nsXULPopupManager::Init();
if (NS_FAILED(rv)) {
NS_ERROR("Could not initialize nsXULPopupManager");
return rv;
}
-#endif
rv = nsFocusManager::Init();
if (NS_FAILED(rv)) {
@@ -288,9 +281,7 @@ nsLayoutStatics::Initialize()
HTMLVideoElement::Init();
-#ifdef MOZ_XUL
nsMenuBarListener::InitializeStatics();
-#endif
CacheObserver::Init();
@@ -328,9 +319,7 @@ nsLayoutStatics::Shutdown()
nsMessageManagerScriptExecutor::Shutdown();
nsFocusManager::Shutdown();
-#ifdef MOZ_XUL
nsXULPopupManager::Shutdown();
-#endif
DOMStorageObserver::Shutdown();
txMozillaXSLTProcessor::Shutdown();
Attr::Shutdown();
@@ -355,11 +344,9 @@ nsLayoutStatics::Shutdown()
nsStackLayout::Shutdown();
nsBox::Shutdown();
-#ifdef MOZ_XUL
nsXULContentUtils::Finish();
nsXULPrototypeCache::ReleaseGlobals();
nsSprocketLayout::Shutdown();
-#endif
SVGElementFactory::Shutdown();
nsMathMLOperators::ReleaseTable();
diff --git a/layout/generic/ReflowInput.cpp b/layout/generic/ReflowInput.cpp
index 077c68b5be..0c3fef3825 100644
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -507,9 +507,7 @@ static bool
IsQuirkContainingBlockHeight(const ReflowInput* rs, nsIAtom* aFrameType)
{
if (nsGkAtoms::blockFrame == aFrameType ||
-#ifdef MOZ_XUL
nsGkAtoms::XULLabelFrame == aFrameType ||
-#endif
nsGkAtoms::scrollFrame == aFrameType) {
// Note: This next condition could change due to a style change,
// but that would cause a style reflow anyway, which means we're ok.
@@ -1950,9 +1948,7 @@ CalcQuirkContainingBlockHeight(const ReflowInput* aCBReflowInput)
// if the ancestor is auto height then skip it and continue up if it
// is the first block frame and possibly the body/html
if (nsGkAtoms::blockFrame == frameType ||
-#ifdef MOZ_XUL
nsGkAtoms::XULLabelFrame == frameType ||
-#endif
nsGkAtoms::scrollFrame == frameType) {
secondAncestorRI = firstAncestorRI;
diff --git a/layout/generic/TextOverflow.cpp b/layout/generic/TextOverflow.cpp
index 3d78eaf911..d4d5b04afb 100644
--- a/layout/generic/TextOverflow.cpp
+++ b/layout/generic/TextOverflow.cpp
@@ -288,7 +288,6 @@ TextOverflow::TextOverflow(nsDisplayListBuilder* aBuilder,
, mBlockWM(aBlockFrame->GetWritingMode())
, mAdjustForPixelSnapping(false)
{
-#ifdef MOZ_XUL
if (!mScrollableFrame) {
nsIAtom* pseudoType = aBlockFrame->StyleContext()->GetPseudo();
if (pseudoType == nsCSSAnonBoxes::mozXULAnonymousBlock) {
@@ -301,7 +300,7 @@ TextOverflow::TextOverflow(nsDisplayListBuilder* aBuilder,
mAdjustForPixelSnapping = !mBlockWM.IsBidiLTR();
}
}
-#endif
+
mCanHaveInlineAxisScrollbar = false;
if (mScrollableFrame) {
auto scrollbarStyle = mBlockWM.IsVertical() ?
diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp
index 45c28c6107..125d602635 100644
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -394,12 +394,11 @@ ReparentFrameViewTo(nsIFrame* aFrame,
nsView* aOldParentView)
{
if (aFrame->HasView()) {
-#ifdef MOZ_XUL
if (aFrame->GetType() == nsGkAtoms::menuPopupFrame) {
// This view must be parented by the root view, don't reparent it.
return;
}
-#endif
+
nsView* view = aFrame->GetView();
// Verify that the current parent view is what we think it is
//nsView* parentView;
@@ -652,7 +651,6 @@ nsContainerFrame::SyncWindowProperties(nsPresContext* aPresContext,
nsRenderingContext* aRC,
uint32_t aFlags)
{
-#ifdef MOZ_XUL
if (!aView || !nsCSSRendering::IsCanvasFrame(aFrame) || !aView->HasWidget())
return;
@@ -716,7 +714,6 @@ nsContainerFrame::SyncWindowProperties(nsPresContext* aPresContext,
nsSize maxSize = rootFrame->GetXULMaxSize(aState);
SetSizeConstraints(aPresContext, windowWidget, minSize, maxSize);
-#endif
}
void nsContainerFrame::SetSizeConstraints(nsPresContext* aPresContext,
diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp
index b8e66ecbcd..14d411e6ab 100644
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -10759,12 +10759,10 @@ void DR_State::InitFrameTypeTable()
AddFrameTypeInfo(nsGkAtoms::textInputFrame, "textCtl", "textInput");
AddFrameTypeInfo(nsGkAtoms::textFrame, "text", "text");
AddFrameTypeInfo(nsGkAtoms::viewportFrame, "VP", "viewport");
-#ifdef MOZ_XUL
AddFrameTypeInfo(nsGkAtoms::XULLabelFrame, "XULLabel", "XULLabel");
AddFrameTypeInfo(nsGkAtoms::boxFrame, "Box", "Box");
AddFrameTypeInfo(nsGkAtoms::sliderFrame, "Slider", "Slider");
AddFrameTypeInfo(nsGkAtoms::popupSetFrame, "PopupSet", "PopupSet");
-#endif
AddFrameTypeInfo(nullptr, "unknown", "unknown");
}
@@ -11382,10 +11380,8 @@ ReflowInput::DisplayInitFrameTypeExit(nsIFrame* aFrame,
"grid", "inline-grid", "ruby", "ruby-base", "ruby-base-container",
"ruby-text", "ruby-text-container", "contents", "-webkit-box",
"-webkit-inline-box", "box", "inline-box",
-#ifdef MOZ_XUL
"grid", "inline-grid", "grid-group", "grid-line", "stack",
"inline-stack", "deck", "groupbox", "popup",
-#endif
};
const uint32_t display = static_cast<uint32_t>(disp->mDisplay);
if (display >= ArrayLength(displayTypes))
diff --git a/layout/inspector/moz.build b/layout/inspector/moz.build
index 3bc757a560..0fed1f1b01 100644
--- a/layout/inspector/moz.build
+++ b/layout/inspector/moz.build
@@ -29,17 +29,13 @@ SOURCES += [
'inCSSValueSearch.cpp',
'inDeepTreeWalker.cpp',
'inDOMUtils.cpp',
+ 'inDOMView.cpp',
'inLayoutUtils.cpp',
'inSearchLoop.cpp',
'nsFontFace.cpp',
'nsFontFaceList.cpp',
]
-if CONFIG['MOZ_XUL']:
- SOURCES += [
- 'inDOMView.cpp',
- ]
-
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'../style',
diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp
index 155ecbeeef..a28a1053f0 100644
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -5,13 +5,6 @@
* 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/.
*
- * This Original Code has been modified by IBM Corporation.
- * Modifications made by IBM described herein are Copyright (c)
- * International Business Machines Corporation, 2000. Modifications
- * to Mozilla code or documentation identified per MPL Section 3.3
- *
- * Date Modified by Description of modification
- * 04/20/2000 IBM Corp. OS/2 VisualAge build.
*/
/* loading of CSS style sheets using the network APIs */
@@ -58,9 +51,7 @@
#include "mozilla/StyleSheetInlines.h"
#include "mozilla/ConsoleReportCollector.h"
-#ifdef MOZ_XUL
#include "nsXULPrototypeCache.h"
-#endif
#include "nsIMediaList.h"
#include "nsIDOMStyleSheet.h"
@@ -1104,7 +1095,6 @@ Loader::CreateSheet(nsIURI* aURI,
RefPtr<StyleSheet> sheet;
// First, the XUL cache
-#ifdef MOZ_XUL
if (IsChromeURI(aURI)) {
nsXULPrototypeCache* cache = nsXULPrototypeCache::GetInstance();
if (cache) {
@@ -1114,7 +1104,6 @@ Loader::CreateSheet(nsIURI* aURI,
}
}
}
-#endif
bool fromCompleteSheets = false;
if (!sheet) {
@@ -1945,7 +1934,6 @@ Loader::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus,
}
data = data->mNext;
}
-#ifdef MOZ_XUL
if (IsChromeURI(aLoadData->mURI)) {
nsXULPrototypeCache* cache = nsXULPrototypeCache::GetInstance();
if (cache && cache->IsEnabled()) {
@@ -1956,9 +1944,7 @@ Loader::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus,
cache->PutStyleSheet(sheet);
}
}
- }
- else {
-#endif
+ } else {
URIPrincipalReferrerPolicyAndCORSModeHashKey key(aLoadData->mURI,
aLoadData->mLoaderPrincipal,
aLoadData->mSheet->GetCORSMode(),
@@ -1966,9 +1952,7 @@ Loader::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus,
NS_ASSERTION(sheet->IsComplete(),
"Should only be caching complete sheets");
mSheets->mCompleteSheets.Put(&key, sheet);
-#ifdef MOZ_XUL
}
-#endif
} else {
NS_WARNING("stylo: Stylesheet caching not yet supported - see bug 1290218.");
}
diff --git a/layout/style/SVGAttrAnimationRuleProcessor.cpp b/layout/style/SVGAttrAnimationRuleProcessor.cpp
index 9eb31b1b23..edc468003b 100644
--- a/layout/style/SVGAttrAnimationRuleProcessor.cpp
+++ b/layout/style/SVGAttrAnimationRuleProcessor.cpp
@@ -92,14 +92,12 @@ SVGAttrAnimationRuleProcessor::RulesMatching(AnonBoxRuleProcessorData* aData)
// see comment in RulesMatching(PseudoElementRuleProcessorData*).
}
-#ifdef MOZ_XUL
/* virtual */ void
SVGAttrAnimationRuleProcessor::RulesMatching(XULTreeRuleProcessorData* aData)
{
// If SMIL Animation of SVG attributes can ever target XUL tree pseudos,
// see comment in RulesMatching(PseudoElementRuleProcessorData*).
}
-#endif
/* virtual */ size_t
SVGAttrAnimationRuleProcessor::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
diff --git a/layout/style/SVGAttrAnimationRuleProcessor.h b/layout/style/SVGAttrAnimationRuleProcessor.h
index 1750c761bd..f5aa0aaf37 100644
--- a/layout/style/SVGAttrAnimationRuleProcessor.h
+++ b/layout/style/SVGAttrAnimationRuleProcessor.h
@@ -37,9 +37,7 @@ public:
virtual void RulesMatching(ElementRuleProcessorData* aData) override;
virtual void RulesMatching(PseudoElementRuleProcessorData* aData) override;
virtual void RulesMatching(AnonBoxRuleProcessorData* aData) override;
-#ifdef MOZ_XUL
virtual void RulesMatching(XULTreeRuleProcessorData* aData) override;
-#endif
virtual nsRestyleHint HasStateDependentStyle(StateRuleProcessorData* aData) override;
virtual nsRestyleHint HasStateDependentStyle(PseudoElementStateRuleProcessorData* aData) override;
virtual bool HasDocumentStateDependentStyle(StateRuleProcessorData* aData) override;
diff --git a/layout/style/StyleRule.cpp b/layout/style/StyleRule.cpp
index 8fde725349..6fad62f8b6 100644
--- a/layout/style/StyleRule.cpp
+++ b/layout/style/StyleRule.cpp
@@ -489,17 +489,11 @@ int32_t nsCSSSelector::CalcWeightWithoutNegations() const
{
int32_t weight = 0;
-#ifdef MOZ_XUL
MOZ_ASSERT(!(IsPseudoElement() &&
PseudoType() != CSSPseudoElementType::XULTree &&
mClassList),
"If non-XUL-tree pseudo-elements can have class selectors "
"after them, specificity calculation must be updated");
-#else
- MOZ_ASSERT(!(IsPseudoElement() && mClassList),
- "If pseudo-elements can have class selectors "
- "after them, specificity calculation must be updated");
-#endif
MOZ_ASSERT(!(IsPseudoElement() && (mIDList || mAttrList)),
"If pseudo-elements can have id or attribute selectors "
"after them, specificity calculation must be updated");
@@ -513,13 +507,11 @@ int32_t nsCSSSelector::CalcWeightWithoutNegations() const
list = list->mNext;
}
list = mClassList;
-#ifdef MOZ_XUL
// XUL tree pseudo-elements abuse mClassList to store some private
// data; ignore that.
if (PseudoType() == CSSPseudoElementType::XULTree) {
list = nullptr;
}
-#endif
while (nullptr != list) {
weight += 0x000100;
list = list->mNext;
@@ -793,7 +785,6 @@ nsCSSSelector::AppendToStringWithoutCombinatorsOrNegations
// Append each class in the linked list
if (mClassList) {
if (isPseudoElement) {
-#ifdef MOZ_XUL
MOZ_ASSERT(nsCSSAnonBoxes::IsTreePseudoElement(mLowercaseTag),
"must be tree pseudo-element");
@@ -804,9 +795,6 @@ nsCSSSelector::AppendToStringWithoutCombinatorsOrNegations
}
// replace the final comma with a close-paren
aString.Replace(aString.Length() - 1, 1, char16_t(')'));
-#else
- NS_ERROR("Can't happen");
-#endif
} else {
nsAtomList* list = mClassList;
while (list != nullptr) {
diff --git a/layout/style/nsCSSAnonBoxList.h b/layout/style/nsCSSAnonBoxList.h
index bb44215f18..fb97bff4dc 100644
--- a/layout/style/nsCSSAnonBoxList.h
+++ b/layout/style/nsCSSAnonBoxList.h
@@ -82,7 +82,6 @@ CSS_ANON_BOX(rubyBaseContainer, ":-moz-ruby-base-container")
CSS_ANON_BOX(rubyText, ":-moz-ruby-text")
CSS_ANON_BOX(rubyTextContainer, ":-moz-ruby-text-container")
-#ifdef MOZ_XUL
CSS_ANON_BOX(moztreecolumn, ":-moz-tree-column")
CSS_ANON_BOX(moztreerow, ":-moz-tree-row")
CSS_ANON_BOX(moztreeseparator, ":-moz-tree-separator")
@@ -95,7 +94,6 @@ CSS_ANON_BOX(moztreecelltext, ":-moz-tree-cell-text")
CSS_ANON_BOX(moztreecheckbox, ":-moz-tree-checkbox")
CSS_ANON_BOX(moztreeprogressmeter, ":-moz-tree-progressmeter")
CSS_ANON_BOX(moztreedropfeedback, ":-moz-tree-drop-feedback")
-#endif
CSS_ANON_BOX(mozSVGMarkerAnonChild, ":-moz-svg-marker-anon-child")
CSS_ANON_BOX(mozSVGOuterSVGAnonChild, ":-moz-svg-outer-svg-anon-child")
diff --git a/layout/style/nsCSSAnonBoxes.cpp b/layout/style/nsCSSAnonBoxes.cpp
index 3585c9e38d..0c0adbb1d1 100644
--- a/layout/style/nsCSSAnonBoxes.cpp
+++ b/layout/style/nsCSSAnonBoxes.cpp
@@ -42,11 +42,9 @@ bool nsCSSAnonBoxes::IsAnonBox(nsIAtom *aAtom)
ArrayLength(CSSAnonBoxes_info));
}
-#ifdef MOZ_XUL
/* static */ bool
nsCSSAnonBoxes::IsTreePseudoElement(nsIAtom* aPseudo)
{
return StringBeginsWith(nsDependentAtomString(aPseudo),
NS_LITERAL_STRING(":-moz-tree-"));
}
-#endif
diff --git a/layout/style/nsCSSAnonBoxes.h b/layout/style/nsCSSAnonBoxes.h
index f631f88013..ed55eef442 100644
--- a/layout/style/nsCSSAnonBoxes.h
+++ b/layout/style/nsCSSAnonBoxes.h
@@ -20,9 +20,7 @@ public:
static void AddRefAtoms();
static bool IsAnonBox(nsIAtom *aAtom);
-#ifdef MOZ_XUL
static bool IsTreePseudoElement(nsIAtom* aPseudo);
-#endif
static bool IsNonElement(nsIAtom* aPseudo)
{ return aPseudo == mozText || aPseudo == mozOtherNonElement; }
diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp
index 9866dd09e8..3d5edbd0ee 100644
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -863,9 +863,7 @@ protected:
};
PriorityParsingStatus ParsePriority();
-#ifdef MOZ_XUL
bool ParseTreePseudoElement(nsAtomList **aPseudoElementArgs);
-#endif
// Property specific parsing routines
bool ParseImageLayers(const nsCSSPropertyID aTable[]);
@@ -6052,7 +6050,6 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask,
}
}
-#ifdef MOZ_XUL
isTreePseudo = (pseudoElementType == CSSPseudoElementType::XULTree);
// If a tree pseudo-element is using the function syntax, it will
// get isTree set here and will pass the check below that only
@@ -6062,7 +6059,7 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask,
// pseudo-elements are allowed to be either functions or not, as
// desired.
bool isTree = (eCSSToken_Function == mToken.mType) && isTreePseudo;
-#endif
+
bool isPseudoElement = (pseudoElementType < CSSPseudoElementType::Count);
// anonymous boxes are only allowed if they're the tree boxes or we have
// enabled agent rules
@@ -6088,10 +6085,7 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask,
// If it's a function token, it better be on our "ok" list, and if the name
// is that of a function pseudo it better be a function token
if ((eCSSToken_Function == mToken.mType) !=
- (
-#ifdef MOZ_XUL
- isTree ||
-#endif
+ (isTree ||
CSSPseudoClassType::negation == pseudoClassType ||
nsCSSPseudoClasses::HasStringArg(pseudoClassType) ||
nsCSSPseudoClasses::HasNthPairArg(pseudoClassType) ||
@@ -6185,11 +6179,8 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask,
// various -moz-* pseudo-elements) must have |parsingPseudoElement|
// set.
if (!parsingPseudoElement &&
- !nsCSSPseudoElements::IsCSS2PseudoElement(pseudo)
-#ifdef MOZ_XUL
- && !isTreePseudo
-#endif
- ) {
+ !nsCSSPseudoElements::IsCSS2PseudoElement(pseudo) &&
+ !isTreePseudo) {
REPORT_UNEXPECTED_TOKEN(PEPseudoSelNewStyleOnly);
UngetToken();
return eSelectorParsingStatus_Error;
@@ -6200,7 +6191,6 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask,
NS_ADDREF(*aPseudoElement = pseudo);
*aPseudoElementType = pseudoElementType;
-#ifdef MOZ_XUL
if (isTree) {
// We have encountered a pseudoelement of the form
// -moz-tree-xxxx(a,b,c). We parse (a,b,c) and add each
@@ -6210,7 +6200,6 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask,
return eSelectorParsingStatus_Error;
}
}
-#endif
// Pseudo-elements can only be followed by user action pseudo-classes
// or be the end of the selector. So the next non-whitespace token must
@@ -7096,7 +7085,6 @@ CSSParserImpl::ParseRGBColor(ComponentType& aR,
return false;
}
-#ifdef MOZ_XUL
bool
CSSParserImpl::ParseTreePseudoElement(nsAtomList **aPseudoElementArgs)
{
@@ -7122,7 +7110,6 @@ CSSParserImpl::ParseTreePseudoElement(nsAtomList **aPseudoElementArgs)
fakeSelector.mClassList = nullptr;
return true;
}
-#endif
nsCSSKeyword
CSSParserImpl::LookupKeywordPrefixAware(nsAString& aKeywordStr,
diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp
index 461b3e3ee3..756e3eb25c 100644
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -1316,7 +1316,6 @@ KTableEntry nsCSSProps::kDisplayKTable[] = {
// nsCSSFrameConstructor::ConstructXULFrame
{ eCSSKeyword__moz_box, StyleDisplay::Box },
{ eCSSKeyword__moz_inline_box, StyleDisplay::InlineBox },
-#ifdef MOZ_XUL
{ eCSSKeyword__moz_grid, StyleDisplay::XulGrid },
{ eCSSKeyword__moz_inline_grid, StyleDisplay::InlineXulGrid },
{ eCSSKeyword__moz_grid_group, StyleDisplay::XulGridGroup },
@@ -1326,7 +1325,6 @@ KTableEntry nsCSSProps::kDisplayKTable[] = {
{ eCSSKeyword__moz_deck, StyleDisplay::Deck },
{ eCSSKeyword__moz_popup, StyleDisplay::Popup },
{ eCSSKeyword__moz_groupbox, StyleDisplay::Groupbox },
-#endif
{ eCSSKeyword_flex, StyleDisplay::Flex },
{ eCSSKeyword_inline_flex, StyleDisplay::InlineFlex },
{ eCSSKeyword_ruby, StyleDisplay::Ruby },
diff --git a/layout/style/nsCSSPseudoElements.cpp b/layout/style/nsCSSPseudoElements.cpp
index ef09f2d42a..49621374fe 100644
--- a/layout/style/nsCSSPseudoElements.cpp
+++ b/layout/style/nsCSSPseudoElements.cpp
@@ -92,11 +92,9 @@ nsCSSPseudoElements::GetPseudoType(nsIAtom *aAtom, EnabledState aEnabledState)
}
if (nsCSSAnonBoxes::IsAnonBox(aAtom)) {
-#ifdef MOZ_XUL
if (nsCSSAnonBoxes::IsTreePseudoElement(aAtom)) {
return Type::XULTree;
}
-#endif
return Type::AnonBox;
}
diff --git a/layout/style/nsCSSPseudoElements.h b/layout/style/nsCSSPseudoElements.h
index 22c744ad06..90db43c7d3 100644
--- a/layout/style/nsCSSPseudoElements.h
+++ b/layout/style/nsCSSPseudoElements.h
@@ -55,9 +55,7 @@ enum class CSSPseudoElementType : CSSPseudoElementTypeBase {
#undef CSS_PSEUDO_ELEMENT
Count,
AnonBox = Count,
-#ifdef MOZ_XUL
XULTree,
-#endif
NotPseudo,
MAX
};
diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcessor.cpp
index 6de279ac5c..aed26a1c01 100644
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -853,9 +853,7 @@ struct RuleCascadeData {
// case-sensitive match.
mAttributeSelectors(&AtomSelector_CSOps, sizeof(AtomSelectorEntry)),
mAnonBoxRules(&RuleHash_TagTable_Ops, sizeof(RuleHashTagTableEntry)),
-#ifdef MOZ_XUL
mXULTreeRules(&RuleHash_TagTable_Ops, sizeof(RuleHashTagTableEntry)),
-#endif
mKeyframesRuleTable(),
mCounterStyleRuleTable(),
mCacheKey(aMedium),
@@ -885,9 +883,7 @@ struct RuleCascadeData {
nsTArray<nsCSSSelector*> mPossiblyNegatedIDSelectors;
PLDHashTable mAttributeSelectors;
PLDHashTable mAnonBoxRules;
-#ifdef MOZ_XUL
PLDHashTable mXULTreeRules;
-#endif
nsTArray<nsFontFaceRuleContainer> mFontFaceRules;
nsTArray<nsCSSKeyframesRule*> mKeyframesRules;
@@ -940,9 +936,7 @@ RuleCascadeData::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
n += SizeOfSelectorsHashTable(mAttributeSelectors, aMallocSizeOf);
n += SizeOfRuleHashTable(mAnonBoxRules, aMallocSizeOf);
-#ifdef MOZ_XUL
n += SizeOfRuleHashTable(mXULTreeRules, aMallocSizeOf);
-#endif
n += mFontFaceRules.ShallowSizeOfExcludingThis(aMallocSizeOf);
n += mKeyframesRules.ShallowSizeOfExcludingThis(aMallocSizeOf);
@@ -2589,7 +2583,6 @@ nsCSSRuleProcessor::RulesMatching(AnonBoxRuleProcessorData* aData)
}
}
-#ifdef MOZ_XUL
/* virtual */ void
nsCSSRuleProcessor::RulesMatching(XULTreeRuleProcessorData* aData)
{
@@ -2612,7 +2605,6 @@ nsCSSRuleProcessor::RulesMatching(XULTreeRuleProcessorData* aData)
}
}
}
-#endif
static inline nsRestyleHint RestyleHintForOp(char16_t oper)
{
@@ -3362,7 +3354,6 @@ AddRule(RuleSelectorPair* aRuleInfo, RuleCascadeData* aCascade)
aRuleInfo->mSelector->mLowercaseTag,
RuleValue(*aRuleInfo, 0, aCascade->mQuirksMode));
} else {
-#ifdef MOZ_XUL
NS_ASSERTION(pseudoType == CSSPseudoElementType::XULTree,
"Unexpected pseudo type");
// Index doesn't matter here, since we'll just be walking these
@@ -3370,9 +3361,6 @@ AddRule(RuleSelectorPair* aRuleInfo, RuleCascadeData* aCascade)
AppendRuleToTagTable(&cascade->mXULTreeRules,
aRuleInfo->mSelector->mLowercaseTag,
RuleValue(*aRuleInfo, 0, aCascade->mQuirksMode));
-#else
- NS_NOTREACHED("Unexpected pseudo type");
-#endif
}
for (nsCSSSelector* selector = aRuleInfo->mSelector;
diff --git a/layout/style/nsCSSRuleProcessor.h b/layout/style/nsCSSRuleProcessor.h
index e207a71afe..ae3e76da28 100644
--- a/layout/style/nsCSSRuleProcessor.h
+++ b/layout/style/nsCSSRuleProcessor.h
@@ -140,9 +140,7 @@ public:
virtual void RulesMatching(AnonBoxRuleProcessorData* aData) override;
-#ifdef MOZ_XUL
virtual void RulesMatching(XULTreeRuleProcessorData* aData) override;
-#endif
virtual nsRestyleHint HasStateDependentStyle(StateRuleProcessorData* aData) override;
virtual nsRestyleHint HasStateDependentStyle(PseudoElementStateRuleProcessorData* aData) override;
diff --git a/layout/style/nsHTMLCSSStyleSheet.cpp b/layout/style/nsHTMLCSSStyleSheet.cpp
index 9b3bd65fb5..c477dc65f2 100644
--- a/layout/style/nsHTMLCSSStyleSheet.cpp
+++ b/layout/style/nsHTMLCSSStyleSheet.cpp
@@ -119,12 +119,10 @@ nsHTMLCSSStyleSheet::RulesMatching(AnonBoxRuleProcessorData* aData)
{
}
-#ifdef MOZ_XUL
/* virtual */ void
nsHTMLCSSStyleSheet::RulesMatching(XULTreeRuleProcessorData* aData)
{
}
-#endif
// Test if style is dependent on content state
/* virtual */ nsRestyleHint
diff --git a/layout/style/nsHTMLCSSStyleSheet.h b/layout/style/nsHTMLCSSStyleSheet.h
index 2b7ea7ae83..b5f2941c99 100644
--- a/layout/style/nsHTMLCSSStyleSheet.h
+++ b/layout/style/nsHTMLCSSStyleSheet.h
@@ -37,9 +37,7 @@ public:
virtual void RulesMatching(ElementRuleProcessorData* aData) override;
virtual void RulesMatching(PseudoElementRuleProcessorData* aData) override;
virtual void RulesMatching(AnonBoxRuleProcessorData* aData) override;
-#ifdef MOZ_XUL
virtual void RulesMatching(XULTreeRuleProcessorData* aData) override;
-#endif
virtual nsRestyleHint HasStateDependentStyle(StateRuleProcessorData* aData) override;
virtual nsRestyleHint HasStateDependentStyle(PseudoElementStateRuleProcessorData* aData) override;
virtual bool HasDocumentStateDependentStyle(StateRuleProcessorData* aData) override;
diff --git a/layout/style/nsHTMLStyleSheet.cpp b/layout/style/nsHTMLStyleSheet.cpp
index 70a5c7f414..af5df10493 100644
--- a/layout/style/nsHTMLStyleSheet.cpp
+++ b/layout/style/nsHTMLStyleSheet.cpp
@@ -3,13 +3,6 @@
* 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/.
- *
- * This Original Code has been modified by IBM Corporation. Modifications made by IBM
- * described herein are Copyright (c) International Business Machines Corporation, 2000.
- * Modifications to Mozilla code or documentation identified per MPL Section 3.3
- *
- * Date Modified by Description of modification
- * 04/20/2000 IBM Corp. OS/2 VisualAge build.
*/
/*
@@ -456,12 +449,10 @@ nsHTMLStyleSheet::RulesMatching(AnonBoxRuleProcessorData* aData)
{
}
-#ifdef MOZ_XUL
/* virtual */ void
nsHTMLStyleSheet::RulesMatching(XULTreeRuleProcessorData* aData)
{
}
-#endif
void
nsHTMLStyleSheet::SetOwningDocument(nsIDocument* aDocument)
diff --git a/layout/style/nsHTMLStyleSheet.h b/layout/style/nsHTMLStyleSheet.h
index a522fc3b41..eacee9d080 100644
--- a/layout/style/nsHTMLStyleSheet.h
+++ b/layout/style/nsHTMLStyleSheet.h
@@ -37,9 +37,7 @@ public:
virtual void RulesMatching(ElementRuleProcessorData* aData) override;
virtual void RulesMatching(PseudoElementRuleProcessorData* aData) override;
virtual void RulesMatching(AnonBoxRuleProcessorData* aData) override;
-#ifdef MOZ_XUL
virtual void RulesMatching(XULTreeRuleProcessorData* aData) override;
-#endif
virtual nsRestyleHint HasStateDependentStyle(StateRuleProcessorData* aData) override;
virtual nsRestyleHint HasStateDependentStyle(PseudoElementStateRuleProcessorData* aData) override;
virtual bool HasDocumentStateDependentStyle(StateRuleProcessorData* aData) override;
diff --git a/layout/style/nsIStyleRuleProcessor.h b/layout/style/nsIStyleRuleProcessor.h
index 2075050d40..fbaaf9c37d 100644
--- a/layout/style/nsIStyleRuleProcessor.h
+++ b/layout/style/nsIStyleRuleProcessor.h
@@ -20,9 +20,7 @@ struct RuleProcessorData;
struct ElementRuleProcessorData;
struct PseudoElementRuleProcessorData;
struct AnonBoxRuleProcessorData;
-#ifdef MOZ_XUL
struct XULTreeRuleProcessorData;
-#endif
struct StateRuleProcessorData;
struct PseudoElementStateRuleProcessorData;
struct AttributeRuleProcessorData;
@@ -70,13 +68,11 @@ public:
*/
virtual void RulesMatching(AnonBoxRuleProcessorData* aData) = 0;
-#ifdef MOZ_XUL
/**
* Just like the previous |RulesMatching|, except for a given content
* node <em>and tree pseudo</em>.
*/
virtual void RulesMatching(XULTreeRuleProcessorData* aData) = 0;
-#endif
/**
* Return whether style can depend on a change of the given document state.
diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp
index 9d0821406b..e59c10cd2f 100644
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -1402,11 +1402,7 @@ struct SetEnumValueHelper
DEFINE_ENUM_CLASS_SETTER(StyleUserModify, ReadOnly, WriteOnly)
DEFINE_ENUM_CLASS_SETTER(StyleWindowDragging, Default, NoDrag)
DEFINE_ENUM_CLASS_SETTER(StyleOrient, Inline, Vertical)
-#ifdef MOZ_XUL
DEFINE_ENUM_CLASS_SETTER(StyleDisplay, None, Popup)
-#else
- DEFINE_ENUM_CLASS_SETTER(StyleDisplay, None, InlineBox)
-#endif
#undef DEF_SET_ENUMERATED_VALUE
};
diff --git a/layout/style/nsRuleProcessorData.h b/layout/style/nsRuleProcessorData.h
index 6f8cba8959..fbaa768cc9 100644
--- a/layout/style/nsRuleProcessorData.h
+++ b/layout/style/nsRuleProcessorData.h
@@ -499,7 +499,6 @@ struct MOZ_STACK_CLASS AnonBoxRuleProcessorData : public RuleProcessorData {
nsIAtom* mPseudoTag;
};
-#ifdef MOZ_XUL
struct MOZ_STACK_CLASS XULTreeRuleProcessorData :
public ElementDependentRuleProcessorData {
XULTreeRuleProcessorData(nsPresContext* aPresContext,
@@ -522,7 +521,6 @@ struct MOZ_STACK_CLASS XULTreeRuleProcessorData :
nsIAtom* mPseudoTag;
nsICSSPseudoComparator* mComparator;
};
-#endif
struct MOZ_STACK_CLASS StateRuleProcessorData :
public ElementDependentRuleProcessorData {
diff --git a/layout/style/nsStyleConsts.h b/layout/style/nsStyleConsts.h
index 60377928b0..8966932626 100644
--- a/layout/style/nsStyleConsts.h
+++ b/layout/style/nsStyleConsts.h
@@ -559,7 +559,6 @@ enum class StyleDisplay : uint8_t {
WebkitInlineBox,
Box,
InlineBox,
-#ifdef MOZ_XUL
XulGrid,
InlineXulGrid,
XulGridGroup,
@@ -569,7 +568,6 @@ enum class StyleDisplay : uint8_t {
Deck,
Groupbox,
Popup,
-#endif
};
// See nsStyleDisplay
diff --git a/layout/style/nsStyleSet.cpp b/layout/style/nsStyleSet.cpp
index 558b9fa7f1..5890100eb0 100644
--- a/layout/style/nsStyleSet.cpp
+++ b/layout/style/nsStyleSet.cpp
@@ -1969,11 +1969,8 @@ nsStyleSet::ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag,
NS_ENSURE_FALSE(mInShutdown, nullptr);
#ifdef DEBUG
- bool isAnonBox = nsCSSAnonBoxes::IsAnonBox(aPseudoTag)
-#ifdef MOZ_XUL
- && !nsCSSAnonBoxes::IsTreePseudoElement(aPseudoTag)
-#endif
- ;
+ bool isAnonBox = nsCSSAnonBoxes::IsAnonBox(aPseudoTag) &&
+ !nsCSSAnonBoxes::IsTreePseudoElement(aPseudoTag);
NS_PRECONDITION(isAnonBox, "Unexpected pseudo");
#endif
@@ -2007,7 +2004,6 @@ nsStyleSet::ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag,
nullptr, aFlags);
}
-#ifdef MOZ_XUL
already_AddRefed<nsStyleContext>
nsStyleSet::ResolveXULTreePseudoStyle(Element* aParentElement,
nsIAtom* aPseudoTag,
@@ -2046,7 +2042,6 @@ nsStyleSet::ResolveXULTreePseudoStyle(Element* aParentElement,
aPseudoTag, CSSPseudoElementType::XULTree,
nullptr, eNoFlags);
}
-#endif
bool
nsStyleSet::AppendFontFaceRules(nsTArray<nsFontFaceRuleContainer>& aArray)
diff --git a/layout/style/nsStyleSet.h b/layout/style/nsStyleSet.h
index 879d0add39..52541d030f 100644
--- a/layout/style/nsStyleSet.h
+++ b/layout/style/nsStyleSet.h
@@ -240,7 +240,6 @@ class nsStyleSet final
ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag, nsStyleContext* aParentContext,
uint32_t aFlags = eNoFlags);
-#ifdef MOZ_XUL
// Get a style context for a XUL tree pseudo. aPseudoTag is the
// pseudo-tag to use and must be non-null. aParentContent must be
// non-null. aComparator must be non-null.
@@ -249,7 +248,6 @@ class nsStyleSet final
nsIAtom* aPseudoTag,
nsStyleContext* aParentContext,
nsICSSPseudoComparator* aComparator);
-#endif
// Append all the currently-active font face rules to aArray. Return
// true for success and false for failure.
diff --git a/layout/xul/BoxObject.cpp b/layout/xul/BoxObject.cpp
index c8e7b221ab..0b7289828a 100644
--- a/layout/xul/BoxObject.cpp
+++ b/layout/xul/BoxObject.cpp
@@ -14,11 +14,7 @@
#include "nsReadableUtils.h"
#include "nsDOMClassInfoID.h"
#include "nsView.h"
-#ifdef MOZ_XUL
#include "nsIDOMXULElement.h"
-#else
-#include "nsIDOMElement.h"
-#endif
#include "nsLayoutUtils.h"
#include "nsISupportsPrimitives.h"
#include "nsSupportsPrimitives.h"
diff --git a/layout/xul/moz.build b/layout/xul/moz.build
index e4186674b2..fa5204af90 100644
--- a/layout/xul/moz.build
+++ b/layout/xul/moz.build
@@ -3,12 +3,6 @@
# 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/.
-with Files('**'):
- BUG_COMPONENT = ('Core', 'XP Toolkit/Widgets: XUL')
-
-with Files('*Menu*'):
- BUG_COMPONENT = ('Core', 'XP Toolkit/Widgets: Menus')
-
if CONFIG['ENABLE_TESTS']:
MOCHITEST_MANIFESTS += ['test/mochitest.ini']
MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
@@ -45,54 +39,49 @@ EXPORTS.mozilla.dom += [
SOURCES += [
'BoxObject.cpp',
+ 'ContainerBoxObject.cpp',
+ 'ListBoxObject.cpp',
+ 'MenuBoxObject.cpp',
'nsBox.cpp',
'nsBoxFrame.cpp',
'nsBoxLayout.cpp',
'nsBoxLayoutState.cpp',
'nsButtonBoxFrame.cpp',
+ 'nsDeckFrame.cpp',
+ 'nsDocElementBoxFrame.cpp',
+ 'nsGroupBoxFrame.cpp',
+ 'nsImageBoxFrame.cpp',
+ 'nsLeafBoxFrame.cpp',
+ 'nsListBoxBodyFrame.cpp',
+ 'nsListBoxLayout.cpp',
+ 'nsListItemFrame.cpp',
+ 'nsMenuBarFrame.cpp',
+ 'nsMenuBarListener.cpp',
+ 'nsMenuFrame.cpp',
+ 'nsMenuPopupFrame.cpp',
+ 'nsPopupSetFrame.cpp',
+ 'nsProgressMeterFrame.cpp',
'nsRepeatService.cpp',
+ 'nsResizerFrame.cpp',
'nsRootBoxFrame.cpp',
'nsScrollbarButtonFrame.cpp',
'nsScrollbarFrame.cpp',
'nsScrollBoxFrame.cpp',
'nsSliderFrame.cpp',
+ 'nsSplitterFrame.cpp',
'nsSprocketLayout.cpp',
'nsStackFrame.cpp',
'nsStackLayout.cpp',
+ 'nsTextBoxFrame.cpp',
+ 'nsTitleBarFrame.cpp',
+ 'nsXULLabelFrame.cpp',
+ 'nsXULPopupManager.cpp',
'nsXULTooltipListener.cpp',
+ 'PopupBoxObject.cpp',
+ 'ScrollBoxObject.cpp',
]
-if CONFIG['MOZ_XUL']:
- SOURCES += [
- 'ContainerBoxObject.cpp',
- 'ListBoxObject.cpp',
- 'MenuBoxObject.cpp',
- 'nsDeckFrame.cpp',
- 'nsDocElementBoxFrame.cpp',
- 'nsGroupBoxFrame.cpp',
- 'nsImageBoxFrame.cpp',
- 'nsLeafBoxFrame.cpp',
- 'nsListBoxBodyFrame.cpp',
- 'nsListBoxLayout.cpp',
- 'nsListItemFrame.cpp',
- 'nsMenuBarFrame.cpp',
- 'nsMenuBarListener.cpp',
- 'nsMenuFrame.cpp',
- 'nsMenuPopupFrame.cpp',
- 'nsPopupSetFrame.cpp',
- 'nsProgressMeterFrame.cpp',
- 'nsResizerFrame.cpp',
- 'nsSplitterFrame.cpp',
- 'nsTextBoxFrame.cpp',
- 'nsTitleBarFrame.cpp',
- 'nsXULLabelFrame.cpp',
- 'nsXULPopupManager.cpp',
- 'PopupBoxObject.cpp',
- 'ScrollBoxObject.cpp',
- ]
-
-if CONFIG['MOZ_XUL']:
- DIRS += ['tree', 'grid']
+DIRS += ['tree', 'grid']
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
diff --git a/layout/xul/nsXULLabelFrame.h b/layout/xul/nsXULLabelFrame.h
index e97fc3fca3..faeb461f21 100644
--- a/layout/xul/nsXULLabelFrame.h
+++ b/layout/xul/nsXULLabelFrame.h
@@ -11,10 +11,6 @@
#include "mozilla/Attributes.h"
#include "nsBlockFrame.h"
-#ifndef MOZ_XUL
-#error "This file should not be included"
-#endif
-
class nsXULLabelFrame : public nsBlockFrame
{
public:
diff --git a/layout/xul/nsXULTooltipListener.cpp b/layout/xul/nsXULTooltipListener.cpp
index 110f8c0e09..eefeec3599 100644
--- a/layout/xul/nsXULTooltipListener.cpp
+++ b/layout/xul/nsXULTooltipListener.cpp
@@ -14,14 +14,10 @@
#include "nsIServiceManager.h"
#include "nsIDragService.h"
#include "nsIDragSession.h"
-#ifdef MOZ_XUL
#include "nsITreeView.h"
-#endif
#include "nsIScriptContext.h"
#include "nsPIDOMWindow.h"
-#ifdef MOZ_XUL
#include "nsXULPopupManager.h"
-#endif
#include "nsIRootBox.h"
#include "nsIBoxObject.h"
#include "mozilla/Preferences.h"
@@ -42,11 +38,9 @@ nsXULTooltipListener::nsXULTooltipListener()
: mMouseScreenX(0)
, mMouseScreenY(0)
, mTooltipShownOnce(false)
-#ifdef MOZ_XUL
, mIsSourceTree(false)
, mNeedTitletip(false)
, mLastTreeRow(-1)
-#endif
{
if (sTooltipListenerCount++ == 0) {
// register the callback so we get notified of updates
@@ -95,7 +89,6 @@ nsXULTooltipListener::MouseOut(nsIDOMEvent* aEvent)
return;
#endif
-#ifdef MOZ_XUL
// check to see if the mouse left the targetNode, and if so,
// hide the tooltip
if (currentTooltip) {
@@ -119,7 +112,6 @@ nsXULTooltipListener::MouseOut(nsIDOMEvent* aEvent)
}
}
}
-#endif
}
void
@@ -157,11 +149,9 @@ nsXULTooltipListener::MouseMove(nsIDOMEvent* aEvent)
nsCOMPtr<nsIContent> sourceContent = do_QueryInterface(
aEvent->InternalDOMEvent()->GetCurrentTarget());
mSourceNode = do_GetWeakReference(sourceContent);
-#ifdef MOZ_XUL
mIsSourceTree = sourceContent->IsXULElement(nsGkAtoms::treechildren);
if (mIsSourceTree)
CheckTreeBodyMove(mouseEvent);
-#endif
// as the mouse moves, we want to make sure we reset the timer to show it,
// so that the delay is from when the mouse stops moving, not when it enters
@@ -210,10 +200,8 @@ nsXULTooltipListener::MouseMove(nsIDOMEvent* aEvent)
return;
}
-#ifdef MOZ_XUL
if (mIsSourceTree)
return;
-#endif
HideTooltip();
// set a flag so that the tooltip is only displayed once until the mouse
@@ -319,7 +307,6 @@ nsXULTooltipListener::RemoveTooltipSupport(nsIContent* aNode)
return NS_OK;
}
-#ifdef MOZ_XUL
void
nsXULTooltipListener::CheckTreeBodyMove(nsIDOMMouseEvent* aMouseEvent)
{
@@ -376,7 +363,6 @@ nsXULTooltipListener::CheckTreeBodyMove(nsIDOMMouseEvent* aMouseEvent)
mLastTreeCol = col;
}
}
-#endif
nsresult
nsXULTooltipListener::ShowTooltip()
@@ -396,12 +382,10 @@ nsXULTooltipListener::ShowTooltip()
// Make sure the target node is still attached to some document.
// It might have been deleted.
if (sourceNode->IsInComposedDoc()) {
-#ifdef MOZ_XUL
if (!mIsSourceTree) {
mLastTreeRow = -1;
mLastTreeCol = nullptr;
}
-#endif
mCurrentTooltip = do_GetWeakReference(tooltipNode);
LaunchTooltip();
@@ -440,7 +424,6 @@ nsXULTooltipListener::ShowTooltip()
return NS_OK;
}
-#ifdef MOZ_XUL
// XXX: "This stuff inside DEBUG_crap could be used to make tree tooltips work
// in the future."
#ifdef DEBUG_crap
@@ -477,7 +460,6 @@ SetTitletipLabel(nsITreeBoxObject* aTreeBox, nsIContent* aTooltip,
aTooltip->SetAttr(kNameSpaceID_None, nsGkAtoms::label, label, true);
}
}
-#endif
void
nsXULTooltipListener::LaunchTooltip()
@@ -486,7 +468,6 @@ nsXULTooltipListener::LaunchTooltip()
if (!currentTooltip)
return;
-#ifdef MOZ_XUL
if (mIsSourceTree && mNeedTitletip) {
nsCOMPtr<nsITreeBoxObject> obx;
GetSourceTreeBoxObject(getter_AddRefs(obx));
@@ -514,21 +495,17 @@ nsXULTooltipListener::LaunchTooltip()
if (!pm->IsPopupOpen(currentTooltip))
mCurrentTooltip = nullptr;
}
-#endif
-
}
nsresult
nsXULTooltipListener::HideTooltip()
{
-#ifdef MOZ_XUL
nsCOMPtr<nsIContent> currentTooltip = do_QueryReferent(mCurrentTooltip);
if (currentTooltip) {
nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
if (pm)
pm->HidePopup(currentTooltip, false, false, false, false);
}
-#endif
DestroyTooltip();
return NS_OK;
@@ -603,22 +580,18 @@ nsXULTooltipListener::FindTooltip(nsIContent* aTarget, nsIContent** aTooltip)
nsCOMPtr<nsIContent> tooltipEl = document->GetElementById(tooltipId);
if (tooltipEl) {
-#ifdef MOZ_XUL
mNeedTitletip = false;
-#endif
tooltipEl.forget(aTooltip);
return NS_OK;
}
}
-#ifdef MOZ_XUL
// titletips should just use the default tooltip
if (mIsSourceTree && mNeedTitletip) {
nsIRootBox* rootBox = nsIRootBox::GetRootBox(document->GetShell());
NS_ENSURE_STATE(rootBox);
NS_IF_ADDREF(*aTooltip = rootBox->GetDefaultTooltip());
}
-#endif
return NS_OK;
}
@@ -634,7 +607,6 @@ nsXULTooltipListener::GetTooltipFor(nsIContent* aTarget, nsIContent** aTooltip)
return rv;
}
-#ifdef MOZ_XUL
// Submenus can't be used as tooltips, see bug 288763.
nsIContent* parent = tooltip->GetParent();
if (parent) {
@@ -644,7 +616,6 @@ nsXULTooltipListener::GetTooltipFor(nsIContent* aTarget, nsIContent** aTooltip)
return NS_ERROR_FAILURE;
}
}
-#endif
tooltip.swap(*aTooltip);
return rv;
@@ -679,9 +650,7 @@ nsXULTooltipListener::DestroyTooltip()
// kill any ongoing timers
KillTooltipTimer();
mSourceNode = nullptr;
-#ifdef MOZ_XUL
mLastTreeCol = nullptr;
-#endif
return NS_OK;
}
@@ -704,7 +673,6 @@ nsXULTooltipListener::sTooltipCallback(nsITimer *aTimer, void *aListener)
instance->ShowTooltip();
}
-#ifdef MOZ_XUL
nsresult
nsXULTooltipListener::GetSourceTreeBoxObject(nsITreeBoxObject** aBoxObject)
{
@@ -726,4 +694,3 @@ nsXULTooltipListener::GetSourceTreeBoxObject(nsITreeBoxObject** aBoxObject)
}
return NS_ERROR_FAILURE;
}
-#endif
diff --git a/layout/xul/nsXULTooltipListener.h b/layout/xul/nsXULTooltipListener.h
index 51e0a2c3f6..1f014c08b0 100644
--- a/layout/xul/nsXULTooltipListener.h
+++ b/layout/xul/nsXULTooltipListener.h
@@ -12,10 +12,8 @@
#include "nsITimer.h"
#include "nsCOMPtr.h"
#include "nsString.h"
-#ifdef MOZ_XUL
#include "nsITreeBoxObject.h"
#include "nsITreeColumns.h"
-#endif
#include "nsWeakPtr.h"
#include "mozilla/Attributes.h"
@@ -50,10 +48,8 @@ protected:
void KillTooltipTimer();
-#ifdef MOZ_XUL
void CheckTreeBodyMove(nsIDOMMouseEvent* aMouseEvent);
nsresult GetSourceTreeBoxObject(nsITreeBoxObject** aBoxObject);
-#endif
nsresult ShowTooltip();
void LaunchTooltip();
@@ -90,13 +86,11 @@ protected:
// the next time the mouse enters the node (bug #395668).
bool mTooltipShownOnce;
-#ifdef MOZ_XUL
- // special members for handling trees
+ // Special members for handling XUL trees.
bool mIsSourceTree;
bool mNeedTitletip;
int32_t mLastTreeRow;
nsCOMPtr<nsITreeColumn> mLastTreeCol;
-#endif
};
#endif // nsXULTooltipListener