From 65fcd4c12c2f56fec5f585d6ddb85809bdbdb533 Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Wed, 6 Oct 2010 21:25:45 -0700 Subject: [PATCH] Split overflow areas for block frame float continuations. (Bug 542595, patch 12) r=roc a2.0=blocking2.0:beta8 --- layout/generic/nsBlockFrame.cpp | 10 +++++----- layout/generic/nsBlockFrame.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index aed90bc8af49..a2d38ace9fcd 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -1015,7 +1015,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext, // Drain & handle pushed floats DrainPushedFloats(state); - nsRect fcBounds; + nsOverflowAreas fcBounds; nsReflowStatus fcStatus = NS_FRAME_COMPLETE; rv = ReflowPushedFloats(state, fcBounds, fcStatus); NS_ENSURE_SUCCESS(rv, rv); @@ -1105,7 +1105,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext, // Factor overflow container child bounds into the overflow area aMetrics.mOverflowAreas.UnionWith(ocBounds); // Factor pushed float child bounds into the overflow area - aMetrics.mOverflowArea.UnionRect(aMetrics.mOverflowArea, fcBounds); + aMetrics.mOverflowAreas.UnionWith(fcBounds); // Let the absolutely positioned container reflow any absolutely positioned // child frames that need to be reflowed, e.g., elements with a percentage @@ -5802,8 +5802,8 @@ nsBlockFrame::FindTrailingClear() nsresult nsBlockFrame::ReflowPushedFloats(nsBlockReflowState& aState, - nsRect& aBounds, - nsReflowStatus& aStatus) + nsOverflowAreas& aOverflowAreas, + nsReflowStatus& aStatus) { nsresult rv = NS_OK; for (nsIFrame* f = mFloats.FirstChild(), *next; @@ -5841,7 +5841,7 @@ nsBlockFrame::ReflowPushedFloats(nsBlockReflowState& aState, NS_MergeReflowStatusInto(&aStatus, NS_FRAME_OVERFLOW_INCOMPLETE); } - ConsiderChildOverflow(aBounds, f); + ConsiderChildOverflow(aOverflowAreas, f); } // If there are continued floats, then we may need to continue BR clearance diff --git a/layout/generic/nsBlockFrame.h b/layout/generic/nsBlockFrame.h index 399c31a363db..671e2f75bbd5 100644 --- a/layout/generic/nsBlockFrame.h +++ b/layout/generic/nsBlockFrame.h @@ -477,8 +477,8 @@ protected: /** Reflow pushed floats */ nsresult ReflowPushedFloats(nsBlockReflowState& aState, - nsRect& aBounds, - nsReflowStatus& aStatus); + nsOverflowAreas& aOverflowAreas, + nsReflowStatus& aStatus); /** Find any trailing BR clear from the last line of the block (or its PIFs) */