Bug 1376248 - Part 1: Use an nsAutoAnimationMutationBatch when updating animations for an element in stylo. r=birtles
MozReview-Commit-ID: 2ft7qn9iVLB
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -659,16 +659,18 @@ Gecko_UpdateAnimations(RawGeckoElementBo
return;
}
nsPresContext* presContext = nsContentUtils::GetContextForContent(aElement);
if (!presContext || !presContext->IsDynamic()) {
return;
}
+ nsAutoAnimationMutationBatch mb(aElement->OwnerDoc());
+
CSSPseudoElementType pseudoType =
GetPseudoTypeFromElementForAnimation(aElement);
if (aTasks & UpdateAnimationsTasks::CSSAnimations) {
presContext->AnimationManager()->
UpdateAnimations(const_cast<dom::Element*>(aElement), pseudoType,
aComputedData);
}