Make ReflowOverflowContainerChildren handle split overflow areas. (Bug 542595, patch 3) r=roc a2.0=blocking2.0:beta8

This commit is contained in:
L. David Baron
2010-10-06 21:25:45 -07:00
parent 36133921e8
commit 4df6cb15f6
4 changed files with 6 additions and 6 deletions

View File

@@ -1001,7 +1001,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
DrainOverflowLines(state); DrainOverflowLines(state);
// Handle paginated overflow (see nsContainerFrame.h) // Handle paginated overflow (see nsContainerFrame.h)
nsRect ocBounds; nsOverflowAreas ocBounds;
nsReflowStatus ocStatus = NS_FRAME_COMPLETE; nsReflowStatus ocStatus = NS_FRAME_COMPLETE;
if (GetPrevInFlow()) { if (GetPrevInFlow()) {
ReflowOverflowContainerChildren(aPresContext, aReflowState, ocBounds, 0, ReflowOverflowContainerChildren(aPresContext, aReflowState, ocBounds, 0,
@@ -1103,7 +1103,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
ComputeFinalSize(aReflowState, state, aMetrics, &bottomEdgeOfChildren); ComputeFinalSize(aReflowState, state, aMetrics, &bottomEdgeOfChildren);
ComputeCombinedArea(aReflowState, aMetrics, bottomEdgeOfChildren); ComputeCombinedArea(aReflowState, aMetrics, bottomEdgeOfChildren);
// Factor overflow container child bounds into the overflow area // Factor overflow container child bounds into the overflow area
aMetrics.mOverflowArea.UnionRect(aMetrics.mOverflowArea, ocBounds); aMetrics.mOverflowAreas.UnionWith(ocBounds);
// Factor pushed float child bounds into the overflow area // Factor pushed float child bounds into the overflow area
aMetrics.mOverflowArea.UnionRect(aMetrics.mOverflowArea, fcBounds); aMetrics.mOverflowArea.UnionRect(aMetrics.mOverflowArea, fcBounds);

View File

@@ -597,7 +597,7 @@ nsCanvasFrame::Reflow(nsPresContext* aPresContext,
if (prevCanvasFrame) { if (prevCanvasFrame) {
ReflowOverflowContainerChildren(aPresContext, aReflowState, ReflowOverflowContainerChildren(aPresContext, aReflowState,
aDesiredSize.mOverflowArea, 0, aDesiredSize.mOverflowAreas, 0,
aStatus); aStatus);
} }

View File

@@ -856,7 +856,7 @@ nsContainerFrame::FinishReflowChild(nsIFrame* aKidFrame,
nsresult nsresult
nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPresContext, nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState, const nsHTMLReflowState& aReflowState,
nsRect& aOverflowRect, nsOverflowAreas& aOverflowRects,
PRUint32 aFlags, PRUint32 aFlags,
nsReflowStatus& aStatus) nsReflowStatus& aStatus)
{ {
@@ -993,7 +993,7 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres
if (aReflowState.mFloatManager) if (aReflowState.mFloatManager)
nsBlockFrame::RecoverFloatsFor(frame, *aReflowState.mFloatManager); nsBlockFrame::RecoverFloatsFor(frame, *aReflowState.mFloatManager);
} }
ConsiderChildOverflow(aOverflowRect, frame); ConsiderChildOverflow(aOverflowRects, frame);
} }
return NS_OK; return NS_OK;

View File

@@ -277,7 +277,7 @@ public:
*/ */
nsresult ReflowOverflowContainerChildren(nsPresContext* aPresContext, nsresult ReflowOverflowContainerChildren(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState, const nsHTMLReflowState& aReflowState,
nsRect& aOverflowRect, nsOverflowAreas& aOverflowRects,
PRUint32 aFlags, PRUint32 aFlags,
nsReflowStatus& aStatus); nsReflowStatus& aStatus);