Backed out changeset 61a168afa436 (bug 1387059) for unexpectedly passing web-platform-reftest /css/css-transforms-2/transform3d-sorting-001.html. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 25 Aug 2017 10:05:22 +0200
changeset 376736 bb7ce98c2f4ad9630c90be4ba96f80a58bbe2718
parent 376735 5807c147fcdefcfd7f1ed517245eedac5a38c420
child 376737 ff7f36a9dd90f6aaa0901e0c642565fcfcec91a5
push id94152
push userarchaeopteryx@coole-files.de
push dateFri, 25 Aug 2017 08:05:43 +0000
treeherdermozilla-inbound@bb7ce98c2f4a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1387059
milestone57.0a1
backs out61a168afa4368486fbeab563a21188d3ce57aa85
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
Backed out changeset 61a168afa436 (bug 1387059) for unexpectedly passing web-platform-reftest /css/css-transforms-2/transform3d-sorting-001.html. r=backout
dom/tests/mochitest/general/mochitest.ini
dom/tests/mochitest/general/test_pointerPreserves3DPerspective.html
layout/generic/nsIFrame.h
layout/painting/nsDisplayList.cpp
--- a/dom/tests/mochitest/general/mochitest.ini
+++ b/dom/tests/mochitest/general/mochitest.ini
@@ -111,17 +111,16 @@ support-files = test_offsets.js
 [test_outerHTML.xhtml]
 [test_paste_selection.html]
 [test_performance_now.html]
 [test_performance_timeline.html]
 [test_picture_apng.html]
 [test_picture_mutations.html]
 [test_pointerPreserves3D.html]
 [test_pointerPreserves3DClip.html]
-[test_pointerPreserves3DPerspective.html]
 [test_resource_timing.html]
 [test_resource_timing_cross_origin.html]
 [test_resource_timing_frameset.html]
 [test_selectevents.html]
 skip-if = toolkit == 'android' # bug 1230232 - Mouse doesn't select in the same way
 [test_showModalDialog_removed.html]
 [test_storagePermissionsAccept.html]
 [test_storagePermissionsLimitForeign.html]
deleted file mode 100644
--- a/dom/tests/mochitest/general/test_pointerPreserves3DPerspective.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test for pointer events with preserve-3d</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<div>
-  <div>
-    <div style="perspective: 100px; transform-style:preserve-3d; transform: translateX(100px)">
-      <div style="display:inline">
-        <div id="color" style="transform-style:flat; transform: translateX(-100px); display: block; background-color: blue; width: 200px; height: 200px;"></div>
-      </div>
-    </div>
-  </div>
-</div>
-<script class="testbody" type="text/javascript">
-function runTest() {
-    var target = document.elementFromPoint(200, 200);
-    ok(target == document.getElementById("color"), "Find the right target.");
-    var target = document.elementFromPoint(16, 16);
-    ok(target == document.getElementById("color"), "Find the right target.");
-}
-
-runTest();
-</script>
-</body>
-</html>
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -860,17 +860,17 @@ public:
    * out-of-flow frames.
    */
   inline nsContainerFrame* GetInFlowParent();
 
   /**
    * Gets the primary frame of the Content's flattened tree
    * parent, if one exists.
    */
-  nsIFrame* GetFlattenedTreeParentPrimaryFrame() const;
+  inline nsIFrame* GetFlattenedTreeParentPrimaryFrame() const;
 
   /**
    * Return the placeholder for this frame (which must be out-of-flow).
    * @note this will only return non-null if |this| is the first-in-flow
    * although we don't assert that here for legacy reasons.
    */
   inline nsPlaceholderFrame* GetPlaceholderFrame() const {
     MOZ_ASSERT(HasAnyStateBits(NS_FRAME_OUT_OF_FLOW));
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -2503,17 +2503,17 @@ void nsDisplayList::HitTest(nsDisplayLis
 
     bool snap;
     nsRect r = item->GetBounds(aBuilder, &snap).Intersect(aRect);
     auto itemType = item->GetType();
     bool same3DContext =
       (itemType == DisplayItemType::TYPE_TRANSFORM &&
        static_cast<nsDisplayTransform*>(item)->IsParticipating3DContext()) ||
       (itemType == DisplayItemType::TYPE_PERSPECTIVE &&
-       static_cast<nsDisplayPerspective*>(item)->TransformFrame()->Extend3DContext());
+       item->Frame()->Extend3DContext());
     if (same3DContext &&
         (itemType != DisplayItemType::TYPE_TRANSFORM ||
          !static_cast<nsDisplayTransform*>(item)->IsLeafOf3DContext())) {
       if (!item->GetClip().MayIntersect(aRect)) {
         continue;
       }
       AutoTArray<nsIFrame*, 1> neverUsed;
       // Start gethering leaves of the 3D rendering context, and
@@ -7524,21 +7524,21 @@ nsDisplayTransform::GetResultingTransfor
     if (ComputePerspectiveMatrix(frame, aAppUnitsPerPixel, perspectiveMatrix)) {
       result *= perspectiveMatrix;
     }
   }
 
   if ((aFlags & INCLUDE_PRESERVE3D_ANCESTORS) &&
       frame && frame->Combines3DTransformWithAncestors()) {
     // Include the transform set on our parent
-    nsIFrame* parentFrame = frame->GetFlattenedTreeParentPrimaryFrame();
-    NS_ASSERTION(parentFrame && parentFrame->IsTransformed() &&
-                 parentFrame->Extend3DContext(),
+    NS_ASSERTION(frame->GetParent() &&
+                 frame->GetParent()->IsTransformed() &&
+                 frame->GetParent()->Extend3DContext(),
                  "Preserve3D mismatch!");
-    FrameTransformProperties props(parentFrame,
+    FrameTransformProperties props(frame->GetParent(),
                                    aAppUnitsPerPixel,
                                    nullptr);
 
     uint32_t flags = aFlags & (INCLUDE_PRESERVE3D_ANCESTORS|INCLUDE_PERSPECTIVE);
 
     // If this frame isn't transformed (but we exist for backface-visibility),
     // then we're not a reference frame so no offset to origin will be added.
     // Otherwise we need to manually translate into our parent's coordinate
@@ -7773,17 +7773,17 @@ nsDisplayTransform::GetAccumulatedPreser
     if (!IsLeafOf3DContext()) {
       mTransformPreserves3D = GetTransform();
       return mTransformPreserves3D;
     }
 
     const nsIFrame* establisher; // Establisher of the 3D rendering context.
     for (establisher = mFrame;
          establisher && establisher->Combines3DTransformWithAncestors();
-         establisher = establisher->GetFlattenedTreeParentPrimaryFrame()) {
+         establisher = nsLayoutUtils::GetCrossDocParentFrame(establisher)) {
     }
     const nsIFrame* establisherReference =
       aBuilder->FindReferenceFrameFor(nsLayoutUtils::GetCrossDocParentFrame(establisher));
 
     nsPoint offset = establisher->GetOffsetToCrossDoc(establisherReference);
     float scale = mFrame->PresContext()->AppUnitsPerDevPixel();
     uint32_t flags = INCLUDE_PRESERVE3D_ANCESTORS|INCLUDE_PERSPECTIVE|OFFSET_BY_ORIGIN;
     mTransformPreserves3D =