Log when we can't use async animations due to pseudos, no bug, r=cjones
authorDavid Zbarsky <dzbarsky@gmail.com>
Fri, 24 Aug 2012 15:08:18 -0400
changeset 105363 0291edeff9fbbf9b030c18f4e356183be2358e05
parent 105362 1c44596f22cfafe720cded7ea16099c332c9555e
child 105364 63d6c36e40b8cae2185a5fc90f2a074dcbc3a9ae
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewerscjones
milestone17.0a1
Log when we can't use async animations due to pseudos, no bug, r=cjones
layout/style/nsAnimationManager.cpp
layout/style/nsTransitionManager.cpp
--- a/layout/style/nsAnimationManager.cpp
+++ b/layout/style/nsAnimationManager.cpp
@@ -295,16 +295,19 @@ ElementAnimations::HasAnimationOfPropert
   }
   return false;
 }
 
 bool
 ElementAnimations::CanPerformOnCompositorThread() const
 {
   if (mElementProperty != nsGkAtoms::animationsProperty) {
+    if (nsLayoutUtils::IsAnimationLoggingEnabled()) {
+      printf_stderr("Gecko bug: Async animation of pseudoelements not supported.  See bug 771367\n");
+    }
     return false;
   }
   bool hasGeometricProperty = false;
   nsIFrame* frame = mElement->GetPrimaryFrame();
   TimeStamp now = frame->PresContext()->RefreshDriver()->MostRecentRefresh();
 
   for (uint32_t animIdx = mAnimations.Length(); animIdx-- != 0; ) {
     const ElementAnimation& anim = mAnimations[animIdx];
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -123,16 +123,19 @@ ElementTransitions::HasTransitionOfPrope
   }
   return false;
 }
 
 bool
 ElementTransitions::CanPerformOnCompositorThread() const
 {
   if (mElementProperty != nsGkAtoms::transitionsProperty) {
+    if (nsLayoutUtils::IsAnimationLoggingEnabled()) {
+      printf_stderr("Gecko bug: Async animation of pseudoelements not supported.  See bug 771367\n");
+    }
     return false;
   }
   bool hasGeometricProperty = false;
   nsIFrame* frame = mElement->GetPrimaryFrame();
   TimeStamp now = frame->PresContext()->RefreshDriver()->MostRecentRefresh();
 
   for (uint32_t i = 0, i_end = mPropertyTransitions.Length(); i < i_end; ++i) {
     const ElementPropertyTransition& pt = mPropertyTransitions[i];