Bug 1297899 - Part 7: Move PostRestyleEventForLazyConstruction up to RestyleManager. r=bholley
authorCameron McCormack <cam@mcc.id.au>
Mon, 13 Feb 2017 11:21:33 +0800
changeset 342886 fd140aa9a1f6b3be7f9f4d78c7d10c7a66de4833
parent 342885 5b3ce8ae4965a80a8f09c2ac3848cd95af443a36
child 342887 767da488b5dde6d29c6317045b63dbd95b41083f
push id37399
push usercmccormack@mozilla.com
push dateWed, 15 Feb 2017 07:27:42 +0000
treeherderautoland@6504c3bc8435 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1297899
milestone54.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 1297899 - Part 7: Move PostRestyleEventForLazyConstruction up to RestyleManager. r=bholley MozReview-Commit-ID: 8M5wgCJp6PT
layout/base/GeckoRestyleManager.h
layout/base/RestyleManager.h
layout/base/RestyleManagerInlines.h
layout/base/ServoRestyleManager.cpp
--- a/layout/base/GeckoRestyleManager.h
+++ b/layout/base/GeckoRestyleManager.h
@@ -320,21 +320,16 @@ public:
    *                        descendants.
    * @param aRestyleHintData: Additional data to go with aRestyleHint.
    */
   void PostRestyleEvent(Element* aElement,
                         nsRestyleHint aRestyleHint,
                         nsChangeHint aMinChangeHint,
                         const RestyleHintData* aRestyleHintData = nullptr);
 
-  void PostRestyleEventForLazyConstruction()
-  {
-    PostRestyleEventInternal(true);
-  }
-
 public:
   /**
    * Asynchronously clear style data from the root frame downwards and ensure
    * it will all be rebuilt. This is safe to call anytime; it will schedule
    * a restyle and take effect next time style changes are flushed.
    * This method is used to recompute the style data when some change happens
    * outside of any style rules, like a color preference change or a change
    * in a system font size, or to fix things up when an optimization in the
--- a/layout/base/RestyleManager.h
+++ b/layout/base/RestyleManager.h
@@ -135,22 +135,23 @@ public:
   /**
    * Return the current AnimationsWithDestroyedFrame struct, or null if we're
    * not currently in a restyling operation.
    */
   AnimationsWithDestroyedFrame* GetAnimationsWithDestroyedFrame() {
     return mAnimationsWithDestroyedFrame;
   }
 
+  void PostRestyleEventForLazyConstruction() { PostRestyleEventInternal(true); }
+
   MOZ_DECL_STYLO_METHODS(GeckoRestyleManager, ServoRestyleManager)
 
   inline void PostRestyleEvent(dom::Element* aElement,
                                nsRestyleHint aRestyleHint,
                                nsChangeHint aMinChangeHint);
-  inline void PostRestyleEventForLazyConstruction();
   inline void RebuildAllStyleData(nsChangeHint aExtraHint,
                                   nsRestyleHint aRestyleHint);
   inline void PostRebuildAllStyleDataEvent(nsChangeHint aExtraHint,
                                            nsRestyleHint aRestyleHint);
   inline void ProcessPendingRestyles();
   inline void ContentInserted(nsINode* aContainer,
                               nsIContent* aChild);
   inline void ContentAppended(nsIContent* aContainer,
--- a/layout/base/RestyleManagerInlines.h
+++ b/layout/base/RestyleManagerInlines.h
@@ -20,22 +20,16 @@ void
 RestyleManager::PostRestyleEvent(dom::Element* aElement,
                                  nsRestyleHint aRestyleHint,
                                  nsChangeHint aMinChangeHint)
 {
   MOZ_STYLO_FORWARD(PostRestyleEvent, (aElement, aRestyleHint, aMinChangeHint));
 }
 
 void
-RestyleManager::PostRestyleEventForLazyConstruction()
-{
-  MOZ_STYLO_FORWARD(PostRestyleEventForLazyConstruction, ());
-}
-
-void
 RestyleManager::RebuildAllStyleData(nsChangeHint aExtraHint,
                                     nsRestyleHint aRestyleHint)
 {
   MOZ_STYLO_FORWARD(RebuildAllStyleData, (aExtraHint, aRestyleHint));
 }
 
 void
 RestyleManager::PostRebuildAllStyleDataEvent(nsChangeHint aExtraHint,
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -80,22 +80,16 @@ ServoRestyleManager::PostRestyleEvent(El
   if (aRestyleHint || aMinChangeHint) {
     Servo_NoteExplicitHints(aElement, aRestyleHint, aMinChangeHint);
   }
 
   PostRestyleEventInternal(false);
 }
 
 void
-ServoRestyleManager::PostRestyleEventForLazyConstruction()
-{
-  PostRestyleEventInternal(true);
-}
-
-void
 ServoRestyleManager::RebuildAllStyleData(nsChangeHint aExtraHint,
                                          nsRestyleHint aRestyleHint)
 {
   // TODO(emilio, bz): We probably need to do some actual restyling here too.
   NS_WARNING("stylo: ServoRestyleManager::RebuildAllStyleData is incomplete");
   StyleSet()->RebuildData();
 }