diff --git a/mozilla/layout/generic/nsAbsoluteContainingBlock.cpp b/mozilla/layout/generic/nsAbsoluteContainingBlock.cpp index fcff042a6c8..21ba08eb7af 100644 --- a/mozilla/layout/generic/nsAbsoluteContainingBlock.cpp +++ b/mozilla/layout/generic/nsAbsoluteContainingBlock.cpp @@ -143,6 +143,7 @@ nsAbsoluteContainingBlock::Reflow(nsContainerFrame* aDelegatingFrame, nsReflowStatus& aReflowStatus, nscoord aContainingBlockWidth, nscoord aContainingBlockHeight, + PRBool aConstrainHeight, PRBool aCBWidthChanged, PRBool aCBHeightChanged, nsRect* aChildBounds) @@ -164,7 +165,7 @@ nsAbsoluteContainingBlock::Reflow(nsContainerFrame* aDelegatingFrame, nsReflowStatus kidStatus = NS_FRAME_COMPLETE; ReflowAbsoluteFrame(aDelegatingFrame, aPresContext, aReflowState, aContainingBlockWidth, aContainingBlockHeight, - kidFrame, kidStatus, aChildBounds); + aConstrainHeight, kidFrame, kidStatus, aChildBounds); nsIFrame* nextFrame = kidFrame->GetNextInFlow(); if (!NS_FRAME_IS_FULLY_COMPLETE(kidStatus)) { // Need a continuation @@ -358,6 +359,7 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat const nsHTMLReflowState& aReflowState, nscoord aContainingBlockWidth, nscoord aContainingBlockHeight, + PRBool aConstrainHeight, nsIFrame* aKidFrame, nsReflowStatus& aStatus, nsRect* aChildBounds) @@ -415,8 +417,8 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat aKidFrame->WillReflow(aPresContext); PRBool constrainHeight = (aReflowState.availableHeight != NS_UNCONSTRAINEDSIZE) - && (nsGkAtoms::fixedList != GetChildListName()) - // Don't split fixed frames + && aConstrainHeight + // Don't split if told not to (e.g. for fixed frames) && (aDelegatingFrame->GetType() != nsGkAtoms::positionedInlineFrame) //XXX we don't handle splitting frames for inline absolute containing blocks yet && (aKidFrame->GetRect().y <= aReflowState.availableHeight); diff --git a/mozilla/layout/generic/nsAbsoluteContainingBlock.h b/mozilla/layout/generic/nsAbsoluteContainingBlock.h index 38d48798ac0..80202cc259d 100644 --- a/mozilla/layout/generic/nsAbsoluteContainingBlock.h +++ b/mozilla/layout/generic/nsAbsoluteContainingBlock.h @@ -71,14 +71,18 @@ class nsAbsoluteContainingBlock { public: nsAbsoluteContainingBlock(nsIAtom* aChildListName) +#ifdef DEBUG : mChildListName(aChildListName) +#endif { NS_ASSERTION(mChildListName == nsGkAtoms::absoluteList || mChildListName == nsGkAtoms::fixedList, "should either represent position:fixed or absolute content"); } +#ifdef DEBUG nsIAtom* GetChildListName() const { return mChildListName; } +#endif nsresult FirstChild(const nsIFrame* aDelegatingFrame, nsIAtom* aListName, @@ -116,6 +120,7 @@ public: nsReflowStatus& aReflowStatus, nscoord aContainingBlockWidth, nscoord aContainingBlockHeight, + PRBool aConstrainHeight, PRBool aCBWidthChanged, PRBool aCBHeightChanged, nsRect* aChildBounds = nsnull); @@ -137,6 +142,7 @@ protected: const nsHTMLReflowState& aReflowState, nscoord aContainingBlockWidth, nscoord aContainingBlockHeight, + PRBool aConstrainHeight, nsIFrame* aKidFrame, nsReflowStatus& aStatus, nsRect* aChildBounds); @@ -144,11 +150,13 @@ protected: protected: nsFrameList mAbsoluteFrames; // additional named child list +#ifdef DEBUG nsIAtom* const mChildListName; // nsGkAtoms::fixedList or nsGkAtoms::absoluteList // helper routine for debug printout void PrettyUC(nscoord aSize, char* aBuf); +#endif }; #endif /* nsnsAbsoluteContainingBlock_h___ */ diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 22b6158b603..76d2a786553 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -1136,7 +1136,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext, rv = mAbsoluteContainer.Reflow(this, aPresContext, aReflowState, state.mReflowStatus, containingBlockSize.width, - containingBlockSize.height, + containingBlockSize.height, PR_TRUE, cbWidthChanged, cbHeightChanged, &childBounds); diff --git a/mozilla/layout/generic/nsInlineFrame.cpp b/mozilla/layout/generic/nsInlineFrame.cpp index 495cd403c7e..5deb9778012 100644 --- a/mozilla/layout/generic/nsInlineFrame.cpp +++ b/mozilla/layout/generic/nsInlineFrame.cpp @@ -1133,7 +1133,7 @@ nsPositionedInlineFrame::Reflow(nsPresContext* aPresContext, // That will all be done by nsLineLayout::RelativePositionFrames. rv = mAbsoluteContainer.Reflow(this, aPresContext, aReflowState, aStatus, containingBlockWidth, containingBlockHeight, - PR_TRUE, PR_TRUE, // XXX could be optimized + PR_TRUE, PR_TRUE, PR_TRUE, // XXX could be optimized &aDesiredSize.mOverflowArea); } diff --git a/mozilla/layout/generic/nsPageContentFrame.cpp b/mozilla/layout/generic/nsPageContentFrame.cpp index 0eae99025bb..b5eb6be0c8b 100644 --- a/mozilla/layout/generic/nsPageContentFrame.cpp +++ b/mozilla/layout/generic/nsPageContentFrame.cpp @@ -149,7 +149,7 @@ nsPageContentFrame::Reflow(nsPresContext* aPresContext, mFixedContainer.Reflow(this, aPresContext, aReflowState, aStatus, aReflowState.availableWidth, aReflowState.availableHeight, - PR_TRUE, PR_TRUE); // XXX could be optimized + PR_FALSE, PR_TRUE, PR_TRUE); // XXX could be optimized // Return our desired size aDesiredSize.width = aReflowState.availableWidth; diff --git a/mozilla/layout/generic/nsViewportFrame.cpp b/mozilla/layout/generic/nsViewportFrame.cpp index d602397cbcb..43f3c4bbd8d 100644 --- a/mozilla/layout/generic/nsViewportFrame.cpp +++ b/mozilla/layout/generic/nsViewportFrame.cpp @@ -319,7 +319,7 @@ ViewportFrame::Reflow(nsPresContext* aPresContext, rv = mFixedContainer.Reflow(this, aPresContext, reflowState, aStatus, reflowState.ComputedWidth(), reflowState.ComputedHeight(), - PR_TRUE, PR_TRUE); // XXX could be optimized + PR_FALSE, PR_TRUE, PR_TRUE); // XXX could be optimized // If we were dirty then do a repaint if (GetStateBits() & NS_FRAME_IS_DIRTY) {