Bug 865702. Don't move the frame in FinishReflowChild if we were told not to. r=roc a=lsblakk
authorTimothy Nikkel <tnikkel@gmail.com>
Thu, 23 May 2013 00:37:05 -0500
changeset 142734 5489f5b16dc8396d635edf4ca5d7398017135b28
parent 142733 65bae28afb45677fc2a0f4ea35e57ffdedbc8bb1
child 142735 7c08df3249f93408cc5c9097522b0a0d8f5b3f5d
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, lsblakk
bugs865702
milestone23.0a2
Bug 865702. Don't move the frame in FinishReflowChild if we were told not to. r=roc a=lsblakk
layout/generic/nsContainerFrame.cpp
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -1044,19 +1044,22 @@ nsContainerFrame::FinishReflowChild(nsIF
                                     nsPresContext*             aPresContext,
                                     const nsHTMLReflowState*   aReflowState,
                                     const nsHTMLReflowMetrics& aDesiredSize,
                                     nscoord                    aX,
                                     nscoord                    aY,
                                     uint32_t                   aFlags)
 {
   nsPoint curOrigin = aKidFrame->GetPosition();
-  nsRect  bounds(aX, aY, aDesiredSize.width, aDesiredSize.height);
 
-  aKidFrame->SetRect(bounds);
+  if (NS_FRAME_NO_MOVE_FRAME != (aFlags & NS_FRAME_NO_MOVE_FRAME)) {
+    aKidFrame->SetRect(nsRect(aX, aY, aDesiredSize.width, aDesiredSize.height));
+  } else {
+    aKidFrame->SetSize(nsSize(aDesiredSize.width, aDesiredSize.height));
+  }
 
   if (aKidFrame->HasView()) {
     nsView* view = aKidFrame->GetView();
     // Make sure the frame's view is properly sized and positioned and has
     // things like opacity correct
     SyncFrameViewAfterReflow(aPresContext, aKidFrame, view,
                              aDesiredSize.VisualOverflow(), aFlags);
   }