Switch away from nsBlockReflowState::mAvailSpaceRect in nsBlockReflowState::AddFloat. (Bug 25888) r+sr=roc
authorL. David Baron <dbaron@dbaron.org>
Wed, 08 Apr 2009 13:52:36 -0700
changeset 27099 4f86f4c5422439e9a126b371eb54286d8f129506
parent 27098 50ba649cfea213f3bedbf158292355401069c0dc
child 27100 df0130484852d12339e976cbfc916e91df69bd15
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs25888
milestone1.9.2a1pre
Switch away from nsBlockReflowState::mAvailSpaceRect in nsBlockReflowState::AddFloat. (Bug 25888) r+sr=roc
layout/generic/nsBlockReflowState.cpp
--- a/layout/generic/nsBlockReflowState.cpp
+++ b/layout/generic/nsBlockReflowState.cpp
@@ -601,19 +601,20 @@ nsBlockReflowState::AddFloat(nsLineLayou
     // force it to fit if we're at the top of the block and we can't
     // break before this
     PRBool forceFit = IsAdjacentWithTop() && !aLineLayout.LineIsBreakable();
     placed = FlowAndPlaceFloat(fc, &isLeftFloat, aReflowStatus, forceFit);
     NS_ASSERTION(placed || !forceFit,
                  "If we asked for force-fit, it should have been placed");
     if (forceFit || (placed && !NS_FRAME_IS_TRUNCATED(aReflowStatus))) {
       // Pass on updated available space to the current inline reflow engine
-      GetAvailableSpace(mY, forceFit);
-      nsRect availSpace(nsPoint(mAvailSpaceRect.x + BorderPadding().left, mY),
-                        mAvailSpaceRect.Size());
+      nsRect floatAvailSpace;
+      GetFloatAvailableSpace(mY, forceFit, floatAvailSpace);
+      nsRect availSpace(nsPoint(floatAvailSpace.x + BorderPadding().left, mY),
+                        floatAvailSpace.Size());
       aLineLayout.UpdateBand(availSpace, isLeftFloat,
                              aPlaceholder->GetOutOfFlowFrame());
       
       // Record this float in the current-line list
       mCurrentLineFloats.Append(fc);
       // If we can't break here, hide the fact that it's truncated
       // XXX We can probably do this more cleanly
       aReflowStatus &= ~NS_FRAME_TRUNCATED;