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>
Wed, 05 Oct 2016 14:53:58 +0900
changeset 421034 b11c0e6479bfa90700343655306d2f48805e7fea
parent 421033 5a81fd0dd57c6d2165c2cfae6a371d4d924a05a5
child 421035 2e3149305df019ce32b91854686a15690b8daba4
push id31361
push userbmo:hiikezoe@mozilla-japan.org
push dateWed, 05 Oct 2016 06:56:42 +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: 8BZkKA2Jcs1
dom/animation/EffectCompositor.cpp
--- a/dom/animation/EffectCompositor.cpp
+++ b/dom/animation/EffectCompositor.cpp
@@ -69,16 +69,24 @@ 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 will be added to the animations level of the cascade but
+  // there is an !important rule for that property in the cascade then the
+  // animation will not be applied since the !important rule overrides it.
+  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.
   //