Bug 857817 - Make AreLayerMarkedActive aware of preserve-3d transformed frames. r=roc
authorMatt Woodrow <mwoodrow@mozilla.com>
Mon, 15 Apr 2013 18:55:29 +1200
changeset 135528 8aeb4de5f4708be3f46e1b9342188475661ae2d8
parent 135527 b10100b29f1939cf705ea3f995d077c4b104ebaa
child 135529 457ff5b67290524866ad1d23d4f7166c9246fcca
push id3752
push userlsblakk@mozilla.com
push dateMon, 13 May 2013 17:21:10 +0000
treeherdermozilla-aurora@1580544aef0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs857817
milestone23.0a1
Bug 857817 - Make AreLayerMarkedActive aware of preserve-3d transformed frames. r=roc
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -4578,17 +4578,24 @@ nsIFrame::AreLayersMarkedActive()
   return Properties().Get(LayerActivityProperty()) != nullptr;
 }
 
 bool
 nsIFrame::AreLayersMarkedActive(nsChangeHint aChangeHint)
 {
   LayerActivity* layerActivity =
     static_cast<LayerActivity*>(Properties().Get(LayerActivityProperty()));
-  return layerActivity && (layerActivity->mChangeHint & aChangeHint);
+  if (layerActivity && (layerActivity->mChangeHint & aChangeHint)) {
+    return true;
+  }
+  if (aChangeHint & nsChangeHint_UpdateTransformLayer &&
+      Preserves3D()) {
+    return GetParent()->AreLayersMarkedActive(nsChangeHint_UpdateTransformLayer);
+  }
+  return false;
 }
 
 /* static */ void
 nsFrame::ShutdownLayerActivityTimer()
 {
   delete gLayerActivityTracker;
   gLayerActivityTracker = nullptr;
 }