Avoid calling PlaceBlock and unsetting dirty bits that we still need when an ancestor is going to reflow for clearance. (Bug 476357) r+sr=roc

This commit is contained in:
L. David Baron
2009-02-09 20:36:54 -08:00
parent f87b0a5498
commit d255366dc1
4 changed files with 36 additions and 0 deletions

View File

@@ -3009,6 +3009,17 @@ nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState,
aState.mPrevBottomMargin = incomingMargin;
continue;
}
if (blockHtmlRS.WillReflowAgainForClearance()) {
// If an ancestor of ours is going to reflow for clearance, we
// need to avoid calling PlaceBlock, because it unsets dirty bits
// on the child block (both itself, and through its call to
// nsFrame::DidReflow), and those dirty bits imply dirtiness for
// all of the child block, including the lines it didn't reflow.
NS_ASSERTION(originalPosition == frame->GetPosition(),
"we need to call PositionChildViews");
return NS_OK;
}
aState.mPrevChild = frame;