diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index efbdcabbd6a..eb7e588988e 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -13138,15 +13138,20 @@ nsCSSFrameConstructor::ProcessInlineChildren(nsFrameConstructorState& aState, } } - *aKidsAllInline = allKidsInline; - // process the current pseudo frame state if (!aState.mPseudoFrames.IsEmpty()) { ProcessPseudoFrames(aState, aFrameItems); + // recompute allKidsInline to take into account new child frames + // XXX we DON'T do this yet because anonymous table children should + // be accepted as inline children, until we turn on inline-table. + // See bug 297537. + // allKidsInline = AreAllKidsInline(aFrameItems.childList); } // restore the pseudo frame state aState.mPseudoFrames = prevPseudoFrames; + *aKidsAllInline = allKidsInline; + return rv; } diff --git a/mozilla/layout/generic/nsLineLayout.cpp b/mozilla/layout/generic/nsLineLayout.cpp index d501aaceb99..21d3e056cd0 100644 --- a/mozilla/layout/generic/nsLineLayout.cpp +++ b/mozilla/layout/generic/nsLineLayout.cpp @@ -172,7 +172,7 @@ nsLineLayout::nsLineLayout(nsPresContext* aPresContext, SetFlag(LL_ENDSINWHITESPACE, PR_TRUE); mPlacedFloats = 0; mTotalPlacedFrames = 0; - mTopEdge = mBottomEdge = 0; + mTopEdge = 0; // Instead of always pre-initializing the free-lists for frames and // spans, we do it on demand so that situations that only use a few @@ -297,12 +297,6 @@ nsLineLayout::BeginLineReflow(nscoord aX, nscoord aY, } mTopEdge = aY; - if (NS_UNCONSTRAINEDSIZE == aHeight) { - mBottomEdge = NS_UNCONSTRAINEDSIZE; - } - else { - mBottomEdge = aY + aHeight; - } switch (mStyleText->mWhiteSpace) { case NS_STYLE_WHITESPACE_PRE: @@ -427,12 +421,6 @@ nsLineLayout::UpdateBand(nscoord aX, nscoord aY, psd->mRightEdge = aX + aWidth; } mTopEdge = aY; - if (NS_UNCONSTRAINEDSIZE == aHeight) { - mBottomEdge = NS_UNCONSTRAINEDSIZE; - } - else { - mBottomEdge = aY + aHeight; - } SetFlag(LL_UPDATEDBAND, PR_TRUE); mPlacedFloats |= (aPlacedLeftFloat ? PLACED_LEFT : PLACED_RIGHT); SetFlag(LL_IMPACTEDBYFLOATS, PR_TRUE); @@ -852,12 +840,10 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, availSize.width = psd->mReflowState->availableWidth; } } - if (NS_UNCONSTRAINEDSIZE == mBottomEdge) { - availSize.height = NS_UNCONSTRAINEDSIZE; - } - else { - availSize.height = mBottomEdge - mTopEdge; - } + // For now, set the available height to unconstrained always. + // XXX inline blocks and tables won't be able to break across pages/ + // columns, but it's not clear how to handle that anyway + availSize.height = NS_UNCONSTRAINEDSIZE; // Get reflow reason set correctly. It's possible that a child was // created and then it was decided that it could not be reflowed diff --git a/mozilla/layout/generic/nsLineLayout.h b/mozilla/layout/generic/nsLineLayout.h index bbaafbecee4..30022312820 100644 --- a/mozilla/layout/generic/nsLineLayout.h +++ b/mozilla/layout/generic/nsLineLayout.h @@ -324,7 +324,6 @@ protected: PRBool AllocateDeque(); nscoord mTopEdge; - nscoord mBottomEdge; nscoord mMaxTopBoxHeight; nscoord mMaxBottomBoxHeight;