Bug 465651: Move ReflowOverflowContainerChildren earlier in nsBlockFrame::Reflow. r+sr=roc

This commit is contained in:
Daniel Holbert 2009-06-28 20:56:13 -07:00
parent fb50b68efa
commit ab655b31be

View File

@ -925,6 +925,18 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
return NS_OK;
}
// Handle paginated overflow (see nsContainerFrame.h)
// Note: We use a temporary reflow status, which we'll merge into the state's
// reflow status down below.
nsRect overflowContainerBounds;
nsReflowStatus ocStatus = NS_FRAME_COMPLETE;
if (GetPrevInFlow()) {
ReflowOverflowContainerChildren(aPresContext, aReflowState,
overflowContainerBounds, 0,
ocStatus);
}
PRBool marginRoot = BlockIsMarginRoot(this);
nsBlockReflowState state(aReflowState, aPresContext, this, aMetrics,
marginRoot, marginRoot, needFloatManager);
@ -959,13 +971,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
NS_ASSERTION(NS_SUCCEEDED(rv), "reflow dirty lines failed");
if (NS_FAILED(rv)) return rv;
// Handle paginated overflow (see nsContainerFrame.h)
nsRect overflowContainerBounds;
if (GetPrevInFlow()) {
ReflowOverflowContainerChildren(aPresContext, aReflowState,
overflowContainerBounds, 0,
state.mReflowStatus);
}
NS_MergeReflowStatusInto(&state.mReflowStatus, ocStatus);
// If the block is complete, put continued floats in the closest ancestor
// block that uses the same float manager and leave the block complete; this