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

This commit is contained in:
roc+%cs.cmu.edu 2004-11-26 02:03:24 +00:00
parent f4ff1bc488
commit b527d8f5e6
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

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