Bug 876626 - Make CanAnimateProperty correclty respect the CanAnimate_AllowPartial flag. r=dzbarsky
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 18 Jun 2013 20:03:20 +1200
changeset 146936 ad0fa6692a65eef51e8e6ac7c40bd6a0f445e006
parent 146935 a2662face321193f133ebc4b29352622720ed298
child 146937 6adf3351d77d33d08dbd0aa60b87b88d187fb0c1
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdzbarsky
bugs876626
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 876626 - Make CanAnimateProperty correclty respect the CanAnimate_AllowPartial flag. r=dzbarsky
layout/style/AnimationCommon.cpp
--- a/layout/style/AnimationCommon.cpp
+++ b/layout/style/AnimationCommon.cpp
@@ -299,17 +299,20 @@ CommonElementAnimationData::CanAnimatePr
     }
   }
   bool enabled = nsLayoutUtils::AreAsyncAnimationsEnabled();
   if (!enabled && shouldLog) {
     nsCString message;
     message.AppendLiteral("Performance warning: Async animations are disabled");
     LogAsyncAnimationFailure(message);
   }
-  return enabled && (aFlags & CanAnimate_AllowPartial);
+  bool propertyAllowed = (aProperty == eCSSProperty_transform) ||
+                         (aProperty == eCSSProperty_opacity) ||
+                         (aFlags & CanAnimate_AllowPartial);
+  return enabled && propertyAllowed;
 }
 
 /* static */ void
 CommonElementAnimationData::LogAsyncAnimationFailure(nsCString& aMessage,
                                                      const nsIContent* aContent)
 {
   if (aContent) {
     aMessage.AppendLiteral(" [");