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

git-svn-id: svn://10.0.0.236/trunk@174750 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
roc+%cs.cmu.edu
2005-06-17 02:46:36 +00:00
parent 6ca1377728
commit 2816caa04c
3 changed files with 12 additions and 22 deletions

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