Bug 1468124 - Use GetInFlowParent instead of GetParent to find the root node of the preserve-3d. r?miko draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Thu, 14 Jun 2018 09:37:59 +0900
changeset 807290 6b86b11505659da277f474c143eab58df16dc71a
parent 807289 4d54e5ecffc6bb961778701e3862051c0bde7f04
push id113070
push userhikezoe@mozilla.com
push dateThu, 14 Jun 2018 00:39:00 +0000
reviewersmiko
bugs1468124
milestone62.0a1
Bug 1468124 - Use GetInFlowParent instead of GetParent to find the root node of the preserve-3d. r?miko I don't have any test cases for this, but theoritically we should use GetInFlowParent just like we do in nsDisplayTransform::GetAccumulatedPreserved3DTransform. MozReview-Commit-ID: 9cFijsorwZP
layout/painting/RetainedDisplayListBuilder.cpp
--- a/layout/painting/RetainedDisplayListBuilder.cpp
+++ b/layout/painting/RetainedDisplayListBuilder.cpp
@@ -679,17 +679,17 @@ HandlePreserve3D(nsIFrame* aFrame,
   // have singular transforms (despite still being visible when combined
   // with their ancestors). If we're at one, jump up to the root of the
   // preserve-3d context and use the whole overflow area.
   const nsIFrame* root3DContextFrame = aFrame;
   bool foundInAncestorTree = true;
   while (aFrame->Extend3DContext() ||
          aFrame->Combines3DTransformWithAncestors()) {
     root3DContextFrame = aFrame;
-    aFrame = aFrame->GetParent();
+    aFrame = aFrame->GetInFlowParent();
     if (aFrame == aStopAtFrame) {
       foundInAncestorTree = false;
     }
   }
   if (root3DContextFrame != aFrame) {
     aOverflow = root3DContextFrame->GetVisualOverflowRectRelativeToParent();
     CRR_LOG("HandlePreserve3D() Updated overflow rect to: %d %d %d %d\n",
              aOverflow.x, aOverflow.y, aOverflow.width, aOverflow.height);