diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index a3eadf257b2..1c6cc9321f9 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -2538,8 +2538,9 @@ nsDisplayTransform::GetResultingTransformMatrix(const nsIFrame* aFrame, } const nsStyleDisplay* parentDisp = nsnull; - if (aFrame->GetParent()) { - parentDisp = aFrame->GetParent()->GetStyleDisplay(); + nsStyleContext* parentStyleContext = aFrame->GetStyleContext()->GetParent(); + if (parentStyleContext) { + parentDisp = parentStyleContext->GetStyleDisplay(); } if (nsLayoutUtils::Are3DTransformsEnabled() && parentDisp && parentDisp->mChildPerspective.GetUnit() == eStyleUnit_Coord && diff --git a/layout/reftests/transform-3d/overflow-hidden-1-ref.html b/layout/reftests/transform-3d/overflow-hidden-1-ref.html new file mode 100644 index 00000000000..f78592e8db0 --- /dev/null +++ b/layout/reftests/transform-3d/overflow-hidden-1-ref.html @@ -0,0 +1,27 @@ + +
+ + + + +