Bug 297537. Line layout should not set an available-height constraint on the inline frames, because they can't break vertically ... and it certainly shouldn't set the constraint based on the band dimensions. Fixes Gmail rich text toolbar layout issue. r+sr=dbaron,a=asa

This commit is contained in:
roc+%cs.cmu.edu 2005-06-17 02:46:36 +00:00
parent 158a8445d3
commit 26ce4cd8a3
3 changed files with 12 additions and 22 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -324,7 +324,6 @@ protected:
PRBool AllocateDeque();
nscoord mTopEdge;
nscoord mBottomEdge;
nscoord mMaxTopBoxHeight;
nscoord mMaxBottomBoxHeight;