Bug 1376248 - Part 1: Use an nsAutoAnimationMutationBatch when updating animations for an element in stylo. r=birtles draft
authorCameron McCormack <cam@mcc.id.au>
Mon, 24 Jul 2017 16:02:53 +0800
changeset 614877 01300f1bb757bf470dfa06b6375cb6dc2012bffb
parent 614015 5928d905c0bc0b28f5488b236444c7d7991cf8d4
child 614878 639c017795fdac58d40f8502aa449f75442bb69c
push id70162
push userbmo:cam@mcc.id.au
push dateTue, 25 Jul 2017 05:09:44 +0000
reviewersbirtles
bugs1376248
milestone56.0a1
Bug 1376248 - Part 1: Use an nsAutoAnimationMutationBatch when updating animations for an element in stylo. r=birtles MozReview-Commit-ID: 2ft7qn9iVLB
layout/style/ServoBindings.cpp
--- 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);
   }