Bug 1304922 - Part 9: Early return from FindAnimationsForCompositor() if we have neither transitions and animations level effect for a given property. r?birtles draft
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Mon, 03 Oct 2016 18:47:15 +0900
changeset 420107 d2b4fd0666a8df2e1985134f2f234c1402303abd
parent 420106 45ac45bd81c326681b0bae66c7893974ef78989f
child 420108 a5f8f411333abcf721168266f7a0c6349262852a
push id31094
push userbmo:hiikezoe@mozilla-japan.org
push dateMon, 03 Oct 2016 10:02:30 +0000
reviewersbirtles
bugs1304922
milestone52.0a1
Bug 1304922 - Part 9: Early return from FindAnimationsForCompositor() if we have neither transitions and animations level effect for a given property. r?birtles MozReview-Commit-ID: 9IAtKD0tIwc
dom/animation/EffectCompositor.cpp
--- a/dom/animation/EffectCompositor.cpp
+++ b/dom/animation/EffectCompositor.cpp
@@ -68,16 +68,27 @@ FindAnimationsForCompositor(const nsIFra
   MOZ_ASSERT(!aMatches || aMatches->IsEmpty(),
              "Matches array, if provided, should be empty");
 
   EffectSet* effects = EffectSet::GetEffectSet(aFrame);
   if (!effects || effects->IsEmpty()) {
     return false;
   }
 
+  // If the property is overridden by important rules and there is a property
+  // for animations level, it means that there are animations overridden by
+  // important rules and maybe be transitions suppressed by the animations,
+  // that means we have no animations for the compositor.
+  if (effects->PropertiesWithImportantRules()
+        .HasProperty(aProperty) &&
+      effects->PropertiesForAnimationsLevel()
+        .HasProperty(aProperty)) {
+    return false;
+  }
+
   if (aFrame->RefusedAsyncAnimation()) {
     return false;
   }
 
   // The animation cascade will almost always be up-to-date by this point
   // but there are some cases such as when we are restoring the refresh driver
   // from test control after seeking where it might not be the case.
   //