From ab655b31bec66b754e164f52741dc5b380ede82f Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Sun, 28 Jun 2009 20:56:13 -0700 Subject: [PATCH] Bug 465651: Move ReflowOverflowContainerChildren earlier in nsBlockFrame::Reflow. r+sr=roc --- layout/generic/nsBlockFrame.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 9bf15785097c..54d4d9b7355e 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -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