Bug 1297899 - Part 7: Move PostRestyleEventForLazyConstruction up to RestyleManager. r?bholley
MozReview-Commit-ID: 8M5wgCJp6PT
--- 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();
}