Bug 1114239 patch 1: Backout bug 1105137, r=jfkthame, a=lmandel
authorSimon Montagu <smontagu@smontagu.org>
Thu, 19 Mar 2015 01:48:45 +0200
changeset 250428 0837b7d1188b
parent 250427 bd028b4c3b95
child 250429 8fca3694654a
push id4586
push usersmontagu@mozilla.com
push date2015-03-18 23:49 +0000
treeherdermozilla-beta@470cd8c739c5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame, lmandel
bugs1114239, 1105137
milestone37.0
Bug 1114239 patch 1: Backout bug 1105137, r=jfkthame, a=lmandel
layout/generic/nsBlockFrame.cpp
layout/generic/nsBlockReflowContext.cpp
layout/generic/nsBlockReflowState.cpp
layout/generic/nsFloatManager.cpp
layout/generic/nsFloatManager.h
layout/generic/nsLineLayout.cpp
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -1928,22 +1928,22 @@ nsBlockFrame::PropagateFloatDamage(nsBlo
                                                   containerWidth);
     nscoord lineBCoordCombinedBefore = overflow.BStart(wm) + aDeltaBCoord;
     nscoord lineBCoordCombinedAfter = lineBCoordCombinedBefore +
                                       overflow.BSize(wm);
 
     // "Translate" the float manager with an offset of (0, 0) in order to
     // set the origin to our writing mode
     LogicalPoint oPt(wm);
-    WritingMode oldWM = floatManager->Translate(wm, oPt);
+    WritingMode oldWM = floatManager->Translate(wm, oPt, containerWidth);
     bool isDirty = floatManager->IntersectsDamage(wm, lineBCoordBefore,
                                                   lineBCoordAfter) ||
                    floatManager->IntersectsDamage(wm, lineBCoordCombinedBefore,
                                                   lineBCoordCombinedAfter);
-    floatManager->Untranslate(oldWM, oPt);
+    floatManager->Untranslate(oldWM, oPt, containerWidth);
     if (isDirty) {
       aLine->MarkDirty();
       return;
     }
   }
 
   // Check if the line is moving relative to the float manager
   if (aDeltaBCoord + aState.mReflowState.mBlockDelta != 0) {
@@ -6167,19 +6167,19 @@ nsBlockFrame::RecoverFloatsFor(nsIFrame*
   // Don't recover any state inside a block that has its own space manager
   // (we don't currently have any blocks like this, though, thanks to our
   // use of extra frames for 'overflow')
   if (block && !nsBlockFrame::BlockNeedsFloatManager(block)) {
     // If the element is relatively positioned, then adjust x and y
     // accordingly so that we consider relatively positioned frames
     // at their original position.
     LogicalPoint pos = block->GetLogicalNormalPosition(aWM, aContainerWidth);
-    WritingMode oldWM = aFloatManager.Translate(aWM, pos);
+    WritingMode oldWM = aFloatManager.Translate(aWM, pos, aContainerWidth);
     block->RecoverFloats(aFloatManager, aWM, aContainerWidth);
-    aFloatManager.Untranslate(oldWM, pos);
+    aFloatManager.Untranslate(oldWM, pos, aContainerWidth);
   }
 }
 
 //////////////////////////////////////////////////////////////////////
 // Painting, event handling
 
 #ifdef DEBUG
 static void ComputeVisualOverflowArea(nsLineList& aLines,
--- a/layout/generic/nsBlockReflowContext.cpp
+++ b/layout/generic/nsBlockReflowContext.cpp
@@ -279,20 +279,21 @@ nsBlockReflowContext::ReflowBlock(const 
   // Let frame know that we are reflowing it
   mFrame->WillReflow(mPresContext);
 
 #ifdef DEBUG
   mMetrics.ISize(mWritingMode) = nscoord(0xdeadbeef);
   mMetrics.BSize(mWritingMode) = nscoord(0xdeadbeef);
 #endif
 
-  WritingMode oldWM = mOuterReflowState.mFloatManager->Translate(mWritingMode,
-                                                                 tPt);
+  WritingMode oldWM =
+    mOuterReflowState.mFloatManager->Translate(mWritingMode, tPt,
+                                               mContainerWidth);
   mFrame->Reflow(mPresContext, mMetrics, aFrameRS, aFrameReflowStatus);
-  mOuterReflowState.mFloatManager->Untranslate(oldWM, tPt);
+  mOuterReflowState.mFloatManager->Untranslate(oldWM, tPt, mContainerWidth);
 
 #ifdef DEBUG
   if (!NS_INLINE_IS_BREAK_BEFORE(aFrameReflowStatus)) {
     if (CRAZY_SIZE(mMetrics.ISize(mWritingMode)) ||
         CRAZY_SIZE(mMetrics.BSize(mWritingMode))) {
       printf("nsBlockReflowContext: ");
       nsFrame::ListTag(stdout, mFrame);
       printf(" metrics=%d,%d!\n",
--- a/layout/generic/nsBlockReflowState.cpp
+++ b/layout/generic/nsBlockReflowState.cpp
@@ -459,17 +459,17 @@ nsBlockReflowState::AppendPushedFloatCha
 void
 nsBlockReflowState::RecoverFloats(nsLineList::iterator aLine,
                                   nscoord aDeltaBCoord)
 {
   WritingMode wm = mReflowState.GetWritingMode();
   // "Translate" the float manager with an offset of (0, 0) in order to
   // set the origin to our writing mode
   LogicalPoint oPt(wm);
-  WritingMode oldWM = mFloatManager->Translate(wm, oPt);
+  WritingMode oldWM = mFloatManager->Translate(wm, oPt, mContainerWidth);
   if (aLine->HasFloats()) {
     // Place the floats into the space-manager again. Also slide
     // them, just like the regular frames on the line.
     nsFloatCache* fc = aLine->GetFirstFloat();
     while (fc) {
       nsIFrame* floatFrame = fc->mFloat;
       if (aDeltaBCoord != 0) {
         floatFrame->MovePositionBy(nsPoint(0, aDeltaBCoord));
@@ -499,17 +499,17 @@ nsBlockReflowState::RecoverFloats(nsLine
                                                            mContainerWidth),
                               wm, mContainerWidth);
       fc = fc->Next();
     }
   } else if (aLine->IsBlock()) {
     nsBlockFrame::RecoverFloatsFor(aLine->mFirstChild, *mFloatManager, wm,
                                    mContainerWidth);
   }
-  mFloatManager->Untranslate(oldWM, oPt);
+  mFloatManager->Untranslate(oldWM, oPt, mContainerWidth);
 }
 
 /**
  * Everything done in this function is done O(N) times for each pass of
  * reflow so it is O(N*M) where M is the number of incremental reflow
  * passes.  That's bad.  Don't do stuff here.
  *
  * When this function is called, |aLine| has just been slid by |aDeltaBCoord|
@@ -698,17 +698,17 @@ nsBlockReflowState::FlowAndPlaceFloat(ns
   LogicalRect oldRegion = nsFloatManager::GetRegionFor(wm, aFloat,
                                                        mContainerWidth);
 
   // Enforce CSS2 9.5.1 rule [2], i.e., make sure that a float isn't
   // ``above'' another float that preceded it in the flow.
   // "Translate" the float manager with an offset of (0, 0) in order to
   // set the origin to our writing mode
   LogicalPoint oPt(wm);
-  WritingMode oldWM = mFloatManager->Translate(wm, oPt);
+  WritingMode oldWM = mFloatManager->Translate(wm, oPt, mContainerWidth);
   mBCoord = std::max(mFloatManager->GetLowestFloatTop(wm, mContainerWidth),
                      mBCoord);
 
   // See if the float should clear any preceding floats...
   // XXX We need to mark this float somehow so that it gets reflowed
   // when floats are inserted before it.
   if (NS_STYLE_CLEAR_NONE != floatDisplay->mBreakType) {
     // XXXldb Does this handle vertical margins correctly?
@@ -996,17 +996,17 @@ nsBlockReflowState::FlowAndPlaceFloat(ns
     nsRect r = aFloat->GetRect();
     nsFrame::IndentBy(stdout, nsBlockFrame::gNoiseIndent);
     printf("placed float: ");
     nsFrame::ListTag(stdout, aFloat);
     printf(" %d,%d,%d,%d\n", r.x, r.y, r.width, r.height);
   }
 #endif
 
-  mFloatManager->Untranslate(oldWM, oPt);
+  mFloatManager->Untranslate(oldWM, oPt, mContainerWidth);
 
   return true;
 }
 
 void
 nsBlockReflowState::PushFloatPastBreak(nsIFrame *aFloat)
 {
   // This ensures that we:
--- a/layout/generic/nsFloatManager.cpp
+++ b/layout/generic/nsFloatManager.cpp
@@ -35,17 +35,17 @@ PSArenaFreeCB(size_t aSize, void* aPtr, 
 }
 
 /////////////////////////////////////////////////////////////////////////////
 // nsFloatManager
 
 nsFloatManager::nsFloatManager(nsIPresShell* aPresShell,
                                mozilla::WritingMode aWM)
   : mWritingMode(aWM),
-    mOffset(aWM),
+    mOrigin(aWM),
     mFloatDamage(PSArenaAllocCB, PSArenaFreeCB, aPresShell),
     mPushedLeftFloatPastBreak(false),
     mPushedRightFloatPastBreak(false),
     mSplitLeftFloatAcrossBreak(false),
     mSplitRightFloatAcrossBreak(false)
 {
   MOZ_COUNT_CTOR(nsFloatManager);
 }
@@ -116,18 +116,18 @@ nsFloatManager::GetFlowArea(WritingMode 
                             BandInfoType aInfoType, nscoord aBSize,
                             LogicalRect aContentArea, SavedState* aState,
                             nscoord aContainerWidth) const
 {
   NS_ASSERTION(aBSize >= 0, "unexpected max block size");
   NS_ASSERTION(aContentArea.ISize(aWM) >= 0,
                "unexpected content area inline size");
 
-  LogicalPoint offset = mOffset.ConvertTo(aWM, mWritingMode, 0);
-  nscoord blockStart = aBOffset + offset.B(aWM);
+  LogicalPoint origin = mOrigin.ConvertTo(aWM, mWritingMode, aContainerWidth);
+  nscoord blockStart = aBOffset + origin.B(aWM);
   if (blockStart < nscoord_MIN) {
     NS_WARNING("bad value");
     blockStart = nscoord_MIN;
   }
 
   // Determine the last float that we should consider.
   uint32_t floatCount;
   if (aState) {
@@ -157,18 +157,18 @@ nsFloatManager::GetFlowArea(WritingMode 
     blockEnd = nscoord_MAX;
   } else {
     blockEnd = blockStart + aBSize;
     if (blockEnd < blockStart || blockEnd > nscoord_MAX) {
       NS_WARNING("bad value");
       blockEnd = nscoord_MAX;
     }
   }
-  nscoord inlineStart = offset.I(aWM) + aContentArea.IStart(aWM);
-  nscoord inlineEnd = offset.I(aWM) + aContentArea.IEnd(aWM);
+  nscoord inlineStart = origin.I(aWM) + aContentArea.IStart(aWM);
+  nscoord inlineEnd = origin.I(aWM) + aContentArea.IEnd(aWM);
   if (inlineEnd < inlineStart) {
     NS_WARNING("bad value");
     inlineEnd = inlineStart;
   }
 
   // Walk backwards through the floats until we either hit the front of
   // the list or we're above |blockStart|.
   bool haveFloats = false;
@@ -233,28 +233,28 @@ nsFloatManager::GetFlowArea(WritingMode 
         }
       }
     }
   }
 
   nscoord blockSize = (blockEnd == nscoord_MAX) ?
                        nscoord_MAX : (blockEnd - blockStart);
   return nsFlowAreaRect(aWM,
-                        inlineStart - offset.I(aWM), blockStart - offset.B(aWM),
+                        inlineStart - origin.I(aWM), blockStart - origin.B(aWM),
                         inlineEnd - inlineStart, blockSize, haveFloats);
 }
 
 nsresult
 nsFloatManager::AddFloat(nsIFrame* aFloatFrame, const LogicalRect& aMarginRect,
                          WritingMode aWM, nscoord aContainerWidth)
 {
   NS_ASSERTION(aMarginRect.ISize(aWM) >= 0, "negative inline size!");
   NS_ASSERTION(aMarginRect.BSize(aWM) >= 0, "negative block size!");
 
-  FloatInfo info(aFloatFrame, aWM, aMarginRect + mOffset);
+  FloatInfo info(aFloatFrame, aWM, aMarginRect + mOrigin);
 
   // Set mLeftBEnd and mRightBEnd.
   if (HasAnyFloats()) {
     FloatInfo &tail = mFloats[mFloats.Length() - 1];
     info.mLeftBEnd = tail.mLeftBEnd;
     info.mRightBEnd = tail.mRightBEnd;
   } else {
     info.mLeftBEnd = nscoord_MIN;
@@ -397,31 +397,31 @@ nsFloatManager::PushState(SavedState* aS
   // intentionally not saved or restored in PushState() and PopState(),
   // since that could lead to bugs where damage is missed/dropped when
   // we move from position A to B (during the intermediate incremental
   // reflow mentioned above) and then from B to C during the subsequent
   // reflow. In the typical case A and C will be the same, but not always.
   // Allowing mFloatDamage to accumulate the damage incurred during both
   // reflows ensures that nothing gets missed.
   aState->mWritingMode = mWritingMode;
-  aState->mOffset = mOffset;
+  aState->mOrigin = mOrigin;
   aState->mPushedLeftFloatPastBreak = mPushedLeftFloatPastBreak;
   aState->mPushedRightFloatPastBreak = mPushedRightFloatPastBreak;
   aState->mSplitLeftFloatAcrossBreak = mSplitLeftFloatAcrossBreak;
   aState->mSplitRightFloatAcrossBreak = mSplitRightFloatAcrossBreak;
   aState->mFloatInfoCount = mFloats.Length();
 }
 
 void
 nsFloatManager::PopState(SavedState* aState)
 {
   NS_PRECONDITION(aState, "No state to restore?");
 
   mWritingMode = aState->mWritingMode;
-  mOffset = aState->mOffset;
+  mOrigin = aState->mOrigin;
   mPushedLeftFloatPastBreak = aState->mPushedLeftFloatPastBreak;
   mPushedRightFloatPastBreak = aState->mPushedRightFloatPastBreak;
   mSplitLeftFloatAcrossBreak = aState->mSplitLeftFloatAcrossBreak;
   mSplitRightFloatAcrossBreak = aState->mSplitRightFloatAcrossBreak;
 
   NS_ASSERTION(aState->mFloatInfoCount <= mFloats.Length(),
                "somebody misused PushState/PopState");
   mFloats.TruncateLength(aState->mFloatInfoCount);
@@ -434,19 +434,19 @@ nsFloatManager::GetLowestFloatTop(Writin
   if (mPushedLeftFloatPastBreak || mPushedRightFloatPastBreak) {
     return nscoord_MAX;
   }
   if (!HasAnyFloats()) {
     return nscoord_MIN;
   }
   FloatInfo fi = mFloats[mFloats.Length() - 1];
   LogicalRect rect = fi.mRect.ConvertTo(aWM, fi.mWritingMode, aContainerWidth);
-  LogicalPoint offset = mOffset.ConvertTo(aWM, mWritingMode, 0);
+  LogicalPoint origin = mOrigin.ConvertTo(aWM, mWritingMode, aContainerWidth);
 
-  return rect.BStart(aWM) - offset.B(aWM);
+  return rect.BStart(aWM) - origin.B(aWM);
 }
 
 #ifdef DEBUG_FRAME_DUMP
 void
 DebugListFloatManager(const nsFloatManager *aFloatManager)
 {
   aFloatManager->List(stdout);
 }
@@ -478,18 +478,18 @@ nsFloatManager::ClearFloats(WritingMode 
 {
   if (!(aFlags & DONT_CLEAR_PUSHED_FLOATS) && ClearContinues(aBreakType)) {
     return nscoord_MAX;
   }
   if (!HasAnyFloats()) {
     return aBCoord;
   }
 
-  LogicalPoint offset = mOffset.ConvertTo(aWM, mWritingMode, 0);
-  nscoord blockEnd = aBCoord + offset.B(aWM);
+  LogicalPoint origin = mOrigin.ConvertTo(aWM, mWritingMode, aContainerWidth);
+  nscoord blockEnd = aBCoord + origin.B(aWM);
 
   const FloatInfo &tail = mFloats[mFloats.Length() - 1];
   switch (aBreakType) {
     case NS_STYLE_CLEAR_BOTH:
       blockEnd = std::max(blockEnd, tail.mLeftBEnd);
       blockEnd = std::max(blockEnd, tail.mRightBEnd);
       break;
     case NS_STYLE_CLEAR_LEFT:
@@ -500,17 +500,17 @@ nsFloatManager::ClearFloats(WritingMode 
       blockEnd = std::max(blockEnd, aWM.IsBidiLTR() ? tail.mRightBEnd
                                                     : tail.mLeftBEnd);
       break;
     default:
       // Do nothing
       break;
   }
 
-  blockEnd -= offset.B(aWM);
+  blockEnd -= origin.B(aWM);
 
   return blockEnd;
 }
 
 bool
 nsFloatManager::ClearContinues(uint8_t aBreakType) const
 {
   return ((mPushedLeftFloatPastBreak || mSplitLeftFloatAcrossBreak) &&
--- a/layout/generic/nsFloatManager.h
+++ b/layout/generic/nsFloatManager.h
@@ -83,75 +83,77 @@ public:
                              const mozilla::LogicalRect& aRegion,
                              nscoord aContainerWidth);
 
   // Structure that stores the current state of a frame manager for
   // Save/Restore purposes.
   struct SavedState {
     explicit SavedState(mozilla::WritingMode aWM)
       : mWritingMode(aWM)
-      , mOffset(aWM)
+      , mOrigin(aWM)
     {}
   private:
     uint32_t mFloatInfoCount;
     mozilla::WritingMode mWritingMode;
-    mozilla::LogicalPoint mOffset;
+    mozilla::LogicalPoint mOrigin;
     bool mPushedLeftFloatPastBreak;
     bool mPushedRightFloatPastBreak;
     bool mSplitLeftFloatAcrossBreak;
     bool mSplitRightFloatAcrossBreak;
 
     friend class nsFloatManager;
   };
 
   /**
-   * Translate the current offset by the specified (dICoord, dBCoord). This
+   * Translate the current origin by the specified (dICoord, dBCoord). This
    * creates a new local coordinate space relative to the current
    * coordinate space.
    * @returns previous writing mode
    */
   mozilla::WritingMode Translate(mozilla::WritingMode aWM,
-                                 mozilla::LogicalPoint aDOffset)
+                                 mozilla::LogicalPoint aDOrigin,
+                                 nscoord aContainerWidth)
   {
     mozilla::WritingMode oldWM = mWritingMode;
-    mOffset = mOffset.ConvertTo(aWM, oldWM, 0);
+    mOrigin = mOrigin.ConvertTo(aWM, oldWM, aContainerWidth);
     mWritingMode = aWM;
-    mOffset += aDOffset;
+    mOrigin += aDOrigin;
     return oldWM;
   }
 
   /*
-   * Set the translation offset to a specified value instead of
+   * Set the translation origin to a specified value instead of
    * translating by a delta.
    */
   void SetTranslation(mozilla::WritingMode aWM,
-                      mozilla::LogicalPoint aOffset)
+                      mozilla::LogicalPoint aOrigin)
   {
     mWritingMode = aWM;
-    mOffset = aOffset;
+    mOrigin = aOrigin;
   }
 
   void Untranslate(mozilla::WritingMode aWM,
-                   mozilla::LogicalPoint aDOffset)
+                   mozilla::LogicalPoint aDOrigin,
+                   nscoord aContainerWidth)
   {
-    mOffset -= aDOffset;
-    mOffset = mOffset.ConvertTo(aWM, mWritingMode, 0);
+    mOrigin -= aDOrigin;
+    mOrigin = mOrigin.ConvertTo(aWM, mWritingMode, aContainerWidth);
     mWritingMode = aWM;
   }
 
   /**
    * Returns the current translation from local coordinate space to
    * world coordinate space. This represents the accumulated calls to
    * Translate().
    */
   void GetTranslation(mozilla::WritingMode& aWM,
-                      mozilla::LogicalPoint& aOffset) const
+                      mozilla::LogicalPoint& aOrigin) const
   {
     aWM = mWritingMode;
-    aOffset = mOffset;
+    aOrigin = mOrigin;
   }
 
   /**
    * Get information about the area available to content that flows
    * around floats.  Two different types of space can be requested:
    *   BAND_FROM_POINT: returns the band containing block-dir coordinate
    *     |aBCoord| (though actually with the top truncated to begin at
    *     aBCoord), but up to at most |aBSize| (which may be nscoord_MAX).
@@ -250,25 +252,25 @@ public:
   bool HasFloatDamage() const
   {
     return !mFloatDamage.IsEmpty();
   }
 
   void IncludeInDamage(mozilla::WritingMode aWM,
                        nscoord aIntervalBegin, nscoord aIntervalEnd)
   {
-    mFloatDamage.IncludeInterval(aIntervalBegin + mOffset.B(aWM),
-                                 aIntervalEnd + mOffset.B(aWM));
+    mFloatDamage.IncludeInterval(aIntervalBegin + mOrigin.B(aWM),
+                                 aIntervalEnd + mOrigin.B(aWM));
   }
 
   bool IntersectsDamage(mozilla::WritingMode aWM,
                         nscoord aIntervalBegin, nscoord aIntervalEnd) const
   {
-    return mFloatDamage.Intersects(aIntervalBegin + mOffset.B(aWM),
-                                   aIntervalEnd + mOffset.B(aWM));
+    return mFloatDamage.Intersects(aIntervalBegin + mOrigin.B(aWM),
+                                   aIntervalEnd + mOrigin.B(aWM));
   }
 
   /**
    * Saves the current state of the float manager into aState.
    */
   void PushState(SavedState* aState);
 
   /**
@@ -313,17 +315,17 @@ public:
    * Checks if clear would pass into the floats' BFC's next-in-flow,
    * i.e. whether floats affecting this clear have continuations.
    */
   bool ClearContinues(uint8_t aBreakType) const;
 
   void AssertStateMatches(SavedState *aState) const
   {
     NS_ASSERTION(aState->mWritingMode == mWritingMode &&
-                 aState->mOffset == mOffset &&
+                 aState->mOrigin == mOrigin &&
                  aState->mPushedLeftFloatPastBreak ==
                    mPushedLeftFloatPastBreak &&
                  aState->mPushedRightFloatPastBreak ==
                    mPushedRightFloatPastBreak &&
                  aState->mSplitLeftFloatAcrossBreak ==
                    mSplitLeftFloatAcrossBreak &&
                  aState->mSplitRightFloatAcrossBreak ==
                    mSplitRightFloatAcrossBreak &&
@@ -352,17 +354,17 @@ private:
               const mozilla::LogicalRect& aRect);
 #ifdef NS_BUILD_REFCNT_LOGGING
     FloatInfo(const FloatInfo& aOther);
     ~FloatInfo();
 #endif
   };
 
   mozilla::WritingMode mWritingMode;
-  mozilla::LogicalPoint mOffset;  // translation from local to global
+  mozilla::LogicalPoint mOrigin;  // translation from local to global
                                   // coordinate space
 
   nsTArray<FloatInfo> mFloats;
   nsIntervalSet   mFloatDamage;
 
   // Did we try to place a float that could not fit at all and had to be
   // pushed to the next page/column?  If so, we can't place any more
   // floats in this page/column because of the rule that the top of a
--- a/layout/generic/nsLineLayout.cpp
+++ b/layout/generic/nsLineLayout.cpp
@@ -917,17 +917,17 @@ nsLineLayout::ReflowFrame(nsIFrame* aFra
 
   // Adjust spacemanager coordinate system for the frame.
   nsHTMLReflowMetrics metrics(lineWM);
 #ifdef DEBUG
   metrics.ISize(lineWM) = nscoord(0xdeadbeef);
   metrics.BSize(lineWM) = nscoord(0xdeadbeef);
 #endif
   LogicalPoint tPt = pfd->mBounds.Origin(lineWM);
-  WritingMode oldWM = mFloatManager->Translate(lineWM, tPt);
+  WritingMode oldWM = mFloatManager->Translate(lineWM, tPt, mContainerWidth);
 
   int32_t savedOptionalBreakOffset;
   gfxBreakPriority savedOptionalBreakPriority;
   nsIFrame* savedOptionalBreakFrame =
     GetLastOptionalBreakPosition(&savedOptionalBreakOffset,
                                  &savedOptionalBreakPriority);
 
   if (!isText) {
@@ -1004,17 +1004,17 @@ nsLineLayout::ReflowFrame(nsIFrame* aFra
         isEmpty = !pfd->mSpan->mHasNonemptyContent && pfd->mFrame->IsSelfEmpty();
       } else {
         isEmpty = pfd->mFrame->IsEmpty();
       }
     }
   }
   pfd->mIsEmpty = isEmpty;
 
-  mFloatManager->Untranslate(oldWM, tPt);
+  mFloatManager->Untranslate(oldWM, tPt, mContainerWidth);
 
   NS_ASSERTION(metrics.ISize(lineWM) >= 0, "bad inline size");
   NS_ASSERTION(metrics.BSize(lineWM) >= 0,"bad block size");
   if (metrics.ISize(lineWM) < 0) {
     metrics.ISize(lineWM) = 0;
   }
   if (metrics.BSize(lineWM) < 0) {
     metrics.BSize(lineWM) = 0;