Bug 1169440 patch 7 - Pass parameter determined from style hint to FrameNeedsReflow. r=dholbert
authorL. David Baron <dbaron@dbaron.org>
Sat, 20 Jun 2015 21:54:15 -0700
changeset 249920 f90880e6841a8bc54d48fa99347bacd60ea1949c
parent 249919 a7c6c582c96f23f250259be16ebd01ac34357d46
child 249921 5f942c1cd0d005f3ded3fa265eb15afa4859f063
push id28940
push usercbook@mozilla.com
push dateMon, 22 Jun 2015 12:03:34 +0000
treeherdermozilla-central@be81b8d6fae9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1169440
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1169440 patch 7 - Pass parameter determined from style hint to FrameNeedsReflow. r=dholbert
layout/base/RestyleManager.cpp
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -570,18 +570,26 @@ RestyleManager::StyleChangeReflow(nsIFra
     dirtyBits = NS_FRAME_HAS_DIRTY_CHILDREN;
   }
 
   // If we're not going to clear any intrinsic sizes on the frames, and
   // there are no dirty bits to set, then there's nothing to do.
   if (dirtyType == nsIPresShell::eResize && !dirtyBits)
     return;
 
+  nsIPresShell::ReflowRootHandling rootHandling;
+  if (aHint & nsChangeHint_ReflowChangesSizeOrPosition) {
+    rootHandling = nsIPresShell::ePositionOrSizeChange;
+  } else {
+    rootHandling = nsIPresShell::eNoPositionOrSizeChange;
+  }
+
   do {
-    mPresContext->PresShell()->FrameNeedsReflow(aFrame, dirtyType, dirtyBits);
+    mPresContext->PresShell()->FrameNeedsReflow(aFrame, dirtyType, dirtyBits,
+                                                rootHandling);
     aFrame = nsLayoutUtils::GetNextContinuationOrIBSplitSibling(aFrame);
   } while (aFrame);
 }
 
 void
 RestyleManager::AddSubtreeToOverflowTracker(nsIFrame* aFrame) 
 {
   mOverflowChangedTracker.AddFrame(