From cd06b20493d94364b1654a4ffe76f94de52fe009 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Wed, 30 Aug 2006 18:04:27 +0000 Subject: [PATCH] Fix build bustage for --disable-xul. Bug 349921 git-svn-id: svn://10.0.0.236/trunk@208822 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSFrameConstructor.cpp | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 6ef0a7b088c..d83b85ea935 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -1120,8 +1120,10 @@ public: // Whether the parent is a block (see ProcessChildren's aParentIsBlock) PRBool mCreatorIsBlock; +#ifdef MOZ_XUL // The root box, if any. nsIRootBox* mRootBox; +#endif // Constructor // Use the passed-in history state. @@ -1232,8 +1234,10 @@ nsFrameConstructorState::nsFrameConstructorState(nsIPresShell* aPresShe mPseudoFrames(), mAnonymousCreator(nsnull), mInsertionContent(nsnull), - mCreatorIsBlock(PR_FALSE), - mRootBox(nsIRootBox::GetRootBox(aPresShell)) + mCreatorIsBlock(PR_FALSE) +#ifdef MOZ_XUL + , mRootBox(nsIRootBox::GetRootBox(aPresShell)) +#endif { } @@ -1252,8 +1256,10 @@ nsFrameConstructorState::nsFrameConstructorState(nsIPresShell* aPresShell, mPseudoFrames(), mAnonymousCreator(nsnull), mInsertionContent(nsnull), - mCreatorIsBlock(PR_FALSE), - mRootBox(nsIRootBox::GetRootBox(aPresShell)) + mCreatorIsBlock(PR_FALSE) +#ifdef MOZ_XUL + , mRootBox(nsIRootBox::GetRootBox(aPresShell)) +#endif { mFrameState = aPresShell->GetDocument()->GetLayoutHistoryState(); } @@ -1425,6 +1431,7 @@ nsFrameConstructorState::AddChild(nsIFrame* aNewFrame, } #endif +#ifdef MOZ_XUL if (NS_UNLIKELY(aIsOutOfFlowPopup)) { NS_ASSERTION(mRootBox && mRootBox->GetPopupSetFrame(), "Must have a popup set frame!"); @@ -1432,6 +1439,7 @@ nsFrameConstructorState::AddChild(nsIFrame* aNewFrame, aNewFrame); } +#endif frameItems->AddChild(aNewFrame); @@ -6485,13 +6493,18 @@ nsCSSFrameConstructor::ConstructXULFrame(nsFrameConstructorState& aState, // xul does not support absolute positioning nsIFrame* geometricParent; +#ifdef MOZ_XUL if (isPopup) { NS_ASSERTION(aState.mRootBox && aState.mRootBox->GetPopupSetFrame(), "How did we get here?"); geometricParent = aState.mRootBox->GetPopupSetFrame(); - } else { + } + else +#else + { geometricParent = aParentFrame; } +#endif /* nsIFrame* geometricParent = aState.GetGeometricParent(display, aParentFrame);