Bug 1344619 - Part 7: Drop EffectCompositor::ClearElementsToRestyle. r?birtles
MozReview-Commit-ID: DlTj2OR0wI0
--- a/dom/animation/EffectCompositor.cpp
+++ b/dom/animation/EffectCompositor.cpp
@@ -492,26 +492,16 @@ EffectCompositor::GetServoAnimationRule(
}
MOZ_ASSERT(effectSet == EffectSet::GetEffectSet(aElement, aPseudoType),
"EffectSet should not change while composing style");
return animRule.mServo;
}
-void
-EffectCompositor::ClearElementsToRestyle()
-{
- MOZ_ASSERT(NS_IsMainThread());
- const auto iterEnd = mElementsToRestyle.end();
- for (auto iter = mElementsToRestyle.begin(); iter != iterEnd; ++iter) {
- iter->Clear();
- }
-}
-
/* static */ dom::Element*
EffectCompositor::GetElementToRestyle(dom::Element* aElement,
CSSPseudoElementType aPseudoType)
{
if (aPseudoType == CSSPseudoElementType::NotPseudo) {
return aElement;
}
--- a/dom/animation/EffectCompositor.h
+++ b/dom/animation/EffectCompositor.h
@@ -154,24 +154,16 @@ public:
// Get animation rule for stylo. This is an equivalent of GetAnimationRule
// and will be called from servo side. We need to be careful while doing any
// modification because it may case some thread-safe issues.
ServoAnimationRule* GetServoAnimationRule(const dom::Element* aElement,
CSSPseudoElementType aPseudoType,
CascadeLevel aCascadeLevel);
- // Clear mElementsToRestyle hashtable. Unlike GetAnimationRule,
- // in GetServoAnimationRule, we don't remove the entry of the composed
- // animation, so we can prevent the thread-safe issues of dom::Element.
- // Therefore, we need to call Clear mElementsToRestyle until we go back to
- // Gecko side.
- // FIXME: we shouldn't clear the animations on the compositor.
- void ClearElementsToRestyle();
-
bool HasPendingStyleUpdates() const;
bool HasThrottledStyleUpdates() const;
// Tell the restyle tracker about all the animated styles that have
// pending updates so that it can update the animation rule for these
// elements.
void AddStyleUpdatesTo(RestyleTracker& aTracker);
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -378,18 +378,16 @@ ServoRestyleManager::ProcessPendingResty
PresContext()->RefreshDriver()->MostRecentRefresh();
// Perform the Servo traversal, and the post-traversal if required. We do this
// in a loop because certain rare paths in the frame constructor (like
// uninstalling XBL bindings) can trigger additional style validations.
mInStyleRefresh = true;
while (styleSet->StyleDocument()) {
- PresContext()->EffectCompositor()->ClearElementsToRestyle();
-
// Recreate style contexts, and queue up change hints (which also handle
// lazy frame construction).
nsStyleChangeList currentChanges(StyleBackendType::Servo);
DocumentStyleRootIterator iter(doc);
while (Element* root = iter.GetNextStyleRoot()) {
ProcessPostTraversal(root, nullptr, styleSet, currentChanges);
}