Bug 911889. Part 7: A single change to CSS 'transform' should not be treated as animation. r=dbaron
☠☠ backed out by 93bce3f109dc ☠ ☠
authorRobert O'Callahan <robert@ocallahan.org>
Wed, 04 Sep 2013 23:47:25 +1200
changeset 153016 989403e34775fbd3258022856609ce019c7ca464
parent 153015 24662d1aed8ffd89ee5b5442052eab1cfe69428a
child 153017 a6878c4ee086c844e6b86bb7c2b69a2881c8bc13
push id25566
push userryanvm@gmail.com
push dateFri, 01 Nov 2013 18:40:05 +0000
treeherdermozilla-central@5bb07c1ae9f5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs911889
milestone28.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 911889. Part 7: A single change to CSS 'transform' should not be treated as animation. r=dbaron
layout/base/ActiveLayerTracker.cpp
--- a/layout/base/ActiveLayerTracker.cpp
+++ b/layout/base/ActiveLayerTracker.cpp
@@ -157,21 +157,17 @@ ActiveLayerTracker::NotifyInlineStyleRul
   NotifyAnimated(aFrame, aProperty);
 }
 
 /* static */ bool
 ActiveLayerTracker::IsStyleAnimated(nsIFrame* aFrame, nsCSSProperty aProperty)
 {
   LayerActivity* layerActivity = GetLayerActivity(aFrame);
   if (layerActivity) {
-    // XXX should we really treat a single change to transform as animation?
-    uint8_t minStyleChangesToBeConsideredAnimation =
-        aProperty == eCSSProperty_opacity ? 2 : 1;
-    if (layerActivity->RestyleCountForProperty(aProperty) >=
-        minStyleChangesToBeConsideredAnimation) {
+    if (layerActivity->RestyleCountForProperty(aProperty) >= 2) {
       return true;
     }
   }
   if (aProperty == eCSSProperty_transform && aFrame->Preserves3D()) {
     return IsStyleAnimated(aFrame->GetParent(), aProperty);
   }
   return false;
 }