Bug 290297. Reconstruct previous margin after propagating float damage, in case that dirties the line. r+sr=dbaron,a=asa

This commit is contained in:
roc+@cs.cmu.edu
2005-04-20 21:45:24 +00:00
parent b7d827c46d
commit c9224c3a60

View File

@@ -2205,8 +2205,12 @@ nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState, PRBool aTryPull)
line->MarkDirty();
}
// Make sure |aState.mPrevBottomMargin| is at the correct position
// before calling PropagateFloatDamage.
if (!line->IsDirty()) {
// See if there's any reflow damage that requires that we mark the
// line dirty.
PropagateFloatDamage(aState, line, deltaY);
}
if (needToRecoverState && line->IsDirty()) {
// We need to reconstruct the bottom margin only if we didn't
// reflow the previous line and we do need to reflow (or repair
@@ -2214,12 +2218,6 @@ nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState, PRBool aTryPull)
aState.ReconstructMarginAbove(line);
}
if (!line->IsDirty()) {
// See if there's any reflow damage that requires that we mark the
// line dirty.
PropagateFloatDamage(aState, line, deltaY);
}
if (needToRecoverState) {
needToRecoverState = PR_FALSE;