Bug 1325193 - Stop processing KeyframeEffectReadOnly::UpdateProperties while composing the same effect's style. r=birtles
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Tue, 10 Jan 2017 09:49:05 +0900
changeset 458376 77638ee6f84daa8452f31ff2f0f88c4022c797e5
parent 458375 7822749b1b1427e3d357608653a9121b9a08b8b4
child 458377 43a0f30ae01825f3133312c769091a9f39af660a
push id40935
push userbmo:cam@mcc.id.au
push dateTue, 10 Jan 2017 07:11:37 +0000
reviewersbirtles
bugs1325193
milestone53.0a1
Bug 1325193 - Stop processing KeyframeEffectReadOnly::UpdateProperties while composing the same effect's style. r=birtles
dom/animation/KeyframeEffectReadOnly.cpp
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -269,16 +269,23 @@ SpecifiedKeyframeArraysAreEqual(const ns
 }
 #endif
 
 void
 KeyframeEffectReadOnly::UpdateProperties(nsStyleContext* aStyleContext)
 {
   MOZ_ASSERT(aStyleContext);
 
+  // Skip updating properties when we are composing style.
+  // FIXME: Bug 1324966. Drop this check once we have a function to get
+  // nsStyleContext without resolving animating style.
+  if (mIsComposingStyle) {
+    return;
+  }
+
   nsTArray<AnimationProperty> properties = BuildProperties(aStyleContext);
 
   if (mProperties == properties) {
     return;
   }
 
   // Preserve the state of the mIsRunningOnCompositor flag.
   nsCSSPropertyIDSet runningOnCompositorProperties;