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
--- 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.
//