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
--- 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);