Backout rev 547905a13380 (bug 1206418) since bug 1097464 is being backed out from Fx44. a=backout
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 14 Dec 2015 12:34:54 -0500
changeset 305801 60c3a5f91464623fc0ac0e960468e1ffeee8059d
parent 305800 59717b623c8f0694db5d327e11d716669ae37ef8
child 305802 1deef50d13971533e9f5212fa554a3d9aab56421
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1206418, 1097464
milestone44.0a2
Backout rev 547905a13380 (bug 1206418) since bug 1097464 is being backed out from Fx44. a=backout
gfx/layers/Layers.cpp
layout/base/nsDisplayList.cpp
layout/reftests/css-animations/animate-preserves3d-ref.html
layout/reftests/css-animations/animate-preserves3d.html
layout/reftests/css-animations/reftest.list
--- a/gfx/layers/Layers.cpp
+++ b/gfx/layers/Layers.cpp
@@ -769,18 +769,17 @@ Layer::MayResample()
 RenderTargetIntRect
 Layer::CalculateScissorRect(const RenderTargetIntRect& aCurrentScissorRect)
 {
   ContainerLayer* container = GetParent();
   ContainerLayer* containerChild = nullptr;
   NS_ASSERTION(GetParent(), "This can't be called on the root!");
 
   // Find the layer creating the 3D context.
-  while (container->Extend3DContext() &&
-         !container->UseIntermediateSurface()) {
+  while (container->Extend3DContext()) {
     containerChild = container;
     container = container->GetParent();
     MOZ_ASSERT(container);
   }
 
   // Find the nearest layer with a clip, or this layer.
   // ContainerState::SetupScrollingMetadata() may install a clip on
   // the layer.
@@ -1308,34 +1307,32 @@ ContainerLayer::HasMultipleChildren()
 /**
  * Collect all leaf descendants of the current 3D context.
  */
 void
 ContainerLayer::Collect3DContextLeaves(nsTArray<Layer*>& aToSort)
 {
   for (Layer* l = GetFirstChild(); l; l = l->GetNextSibling()) {
     ContainerLayer* container = l->AsContainerLayer();
-    if (container && container->Extend3DContext() &&
-        !container->UseIntermediateSurface()) {
+    if (container && container->Extend3DContext()) {
       container->Collect3DContextLeaves(aToSort);
     } else {
       aToSort.AppendElement(l);
     }
   }
 }
 
 void
 ContainerLayer::SortChildrenBy3DZOrder(nsTArray<Layer*>& aArray)
 {
   nsAutoTArray<Layer*, 10> toSort;
 
   for (Layer* l = GetFirstChild(); l; l = l->GetNextSibling()) {
     ContainerLayer* container = l->AsContainerLayer();
-    if (container && container->Extend3DContext() &&
-        !container->UseIntermediateSurface()) {
+    if (container && container->Extend3DContext()) {
       container->Collect3DContextLeaves(toSort);
     } else {
       if (toSort.Length() > 0) {
         SortLayersBy3DZOrder(toSort);
         aArray.AppendElements(Move(toSort));
         // XXX The move analysis gets confused here, because toSort gets moved
         // here, and then gets used again outside of the loop. To clarify that
         // we realize that the array is going to be empty to the move checker,
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -568,27 +568,19 @@ nsDisplayListBuilder::AddAnimationsAndTr
     if (parentStyleContext) {
       const nsStyleDisplay* disp = parentStyleContext->StyleDisplay();
       if (disp && disp->mChildPerspective.GetUnit() == eStyleUnit_Coord) {
         perspective = disp->mChildPerspective.GetCoordValue();
       }
     }
     nsPoint origin;
     if (aItem) {
-      // This branch is for display items to leverage the cache of
-      // nsDisplayListBuilder.
       origin = aItem->ToReferenceFrame();
     } else {
-      // This branch is running for restyling.
-      // Animations are animated at the coordination of the reference
-      // frame outside, not the given frame itself.  The given frame
-      // is also reference frame too, so the parent's reference frame
-      // are used.
-      nsIFrame* referenceFrame =
-        nsLayoutUtils::GetReferenceFrame(nsLayoutUtils::GetCrossDocParentFrame(aFrame));
+      nsIFrame* referenceFrame = nsLayoutUtils::GetReferenceFrame(aFrame);
       origin = aFrame->GetOffsetToCrossDoc(referenceFrame);
     }
 
     data = TransformData(origin, offsetToTransformOrigin,
                          offsetToPerspectiveOrigin, bounds, perspective,
                          devPixelsToAppUnits);
   } else if (aProperty == eCSSProperty_opacity) {
     data = null_t();
deleted file mode 100644
--- a/layout/reftests/css-animations/animate-preserves3d-ref.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<html>
-  <head>
-    <style type="text/css">
-      .pad {
-        display: block;
-        height: 20px;
-      }
-      .out {
-        display: block;
-        position: absolute;
-        transform-origin: 0 0;
-        width: 100px;
-        height: 50px;
-        overflow: hidden;
-        left: 108px;
-      }
-      .rect {
-        width: 100px;
-        height: 50px;
-        background-color: grey;
-      }
-    </style>
-  </head>
-  <body>
-    <div class="pad"></div>
-    <div class="out">
-      <div class="rect"></div>
-    </div>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/reftests/css-animations/animate-preserves3d.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<html>
-  <head>
-    <style type="text/css">
-      .pad {
-        display: block;
-        height: 20px;
-      }
-      .out {
-        display: block;
-        position: absolute;
-        transform-origin: 0 0;
-        width: 100px;
-        height: 50px;
-        overflow: hidden;
-      }
-      .rect {
-        width: 100px;
-        height: 50px;
-        background-color: grey;
-      }
-      
-      .ani {
-        animation: rot 200s linear infinite;
-        animation-timing-function: steps(2, start);
-        transform-origin: 50px 50px;
-      }
-      @keyframes rot {
-        to { transform: translate(200px, 0px); }
-      }
-    </style>
-  </head>
-  <body>
-    <div class="pad"></div>
-    <div class="out ani">
-      <div class="rect"></div>
-    </div>
-  </body>
-</html>
--- a/layout/reftests/css-animations/reftest.list
+++ b/layout/reftests/css-animations/reftest.list
@@ -1,6 +1,5 @@
 == screen-animations.html screen-animations-ref.html
 != screen-animations.html screen-animations-notref.html
 fails == print-no-animations.html print-no-animations-ref.html # reftest harness doesn't actually make pres context non-dynamic for reftest-print tests
 fails != print-no-animations.html print-no-animations-notref.html # reftest harness doesn't actually make pres context non-dynamic for reftest-print tests
 == animate-opacity.html animate-opacity-ref.html
-== animate-preserves3d.html animate-preserves3d-ref.html