Bug 270804. Lines that we skipped reflowing during shrink-wrap-width block reflow may need to be reflowed if the shrink-wrap-width changes. r+sr=dbaron

git-svn-id: svn://10.0.0.236/trunk@165795 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
roc+%cs.cmu.edu
2004-11-26 02:03:24 +00:00
parent 51a4995b51
commit 474bdee350
2 changed files with 24 additions and 0 deletions

View File

@@ -2312,6 +2312,18 @@ nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState)
// want to update mY, e.g. if they have clearance.)
if (line->IsBlock() || !line->CachedIsEmpty()) {
aState.mY = line->mBounds.YMost();
if (aState.GetFlag(BRS_SHRINKWRAPWIDTH)) {
// Mark the line as dirty so once we known the final shrink
// wrap width we can reflow the line to the correct size.
// It's OK to skip doing this for empty lines of inlines.
// XXX We don't always need to do this...
// XXX For inlines, we could record in the line box
// that HorzontalAlignFrames does not depend on the line width,
// and thus we don't have to mark it dirty here
line->MarkDirty();
aState.SetFlag(BRS_NEEDRESIZEREFLOW, PR_TRUE);
}
}
// Record if we need to clear floats before reflowing the next