mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 20:49:27 +00:00
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:
parent
f4ff1bc488
commit
b527d8f5e6
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user