diff --git a/layout/base/ServoRestyleManager.cpp b/layout/base/ServoRestyleManager.cpp index 7b9b20813101..27052c26a890 100644 --- a/layout/base/ServoRestyleManager.cpp +++ b/layout/base/ServoRestyleManager.cpp @@ -74,21 +74,9 @@ void ServoRestyleManager::RebuildAllStyleData(nsChangeHint aExtraHint, nsRestyleHint aRestyleHint) { - StyleSet()->RebuildData(); - - mHaveNonAnimationRestyles = true; - - // NOTE(emilio): GeckoRestlyeManager does a sync style flush, which seems - // not to be needed in my testing. - // - // If it is, we can just do a content flush and call ProcessPendingRestyles. - if (Element* root = mPresContext->Document()->GetRootElement()) { - PostRestyleEvent(root, aRestyleHint, aExtraHint); - } - - // TODO(emilio, bz): Extensions can add/remove stylesheets that can affect - // non-inheriting anon boxes. It's not clear if we want to support that, but - // if we do, we need to re-selector-match them here. + // NOTE(emilio): GeckoRestlyeManager does a sync style flush, which seems not + // to be needed in my testing. + PostRebuildAllStyleDataEvent(aExtraHint, aRestyleHint); } void @@ -100,6 +88,10 @@ ServoRestyleManager::PostRebuildAllStyleDataEvent(nsChangeHint aExtraHint, if (Element* root = mPresContext->Document()->GetRootElement()) { PostRestyleEvent(root, aRestyleHint, aExtraHint); } + + // TODO(emilio, bz): Extensions can add/remove stylesheets that can affect + // non-inheriting anon boxes. It's not clear if we want to support that, but + // if we do, we need to re-selector-match them here. } /* static */ void diff --git a/layout/style/ServoStyleSet.h b/layout/style/ServoStyleSet.h index 0aff4522d351..047caf4d6d0f 100644 --- a/layout/style/ServoStyleSet.h +++ b/layout/style/ServoStyleSet.h @@ -283,12 +283,6 @@ public: void AssertTreeIsClean() {} #endif - /** - * Rebuild the style data. This will force a stylesheet flush, and also - * recompute the default computed styles. - */ - void RebuildData(); - /** * Clears the style data, both style sheet data and cached non-inheriting * style contexts, and marks the stylist as needing an unconditional full @@ -384,6 +378,12 @@ private: CSSPseudoElementType aPseudoType, LazyComputeBehavior aMayCompute); + /** + * Rebuild the style data. This will force a stylesheet flush, and also + * recompute the default computed styles. + */ + void RebuildData(); + /** * Gets the pending snapshots to handle from the restyle manager. */