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 @@ + + + + + + +
+
+
+ diff --git a/layout/reftests/transform-3d/overflow-hidden-1a.html b/layout/reftests/transform-3d/overflow-hidden-1a.html new file mode 100644 index 00000000000..f78592e8db0 --- /dev/null +++ b/layout/reftests/transform-3d/overflow-hidden-1a.html @@ -0,0 +1,27 @@ + + + + + + +
+
+
+ diff --git a/layout/reftests/transform-3d/reftest.list b/layout/reftests/transform-3d/reftest.list index 7ae22556a43..e7b8d1ad3dd 100644 --- a/layout/reftests/transform-3d/reftest.list +++ b/layout/reftests/transform-3d/reftest.list @@ -41,3 +41,4 @@ fails == preserve3d-1a.html preserve3d-1-ref.html == sorting-3a.html green-rect.html # Different, but equivalent (for the given transform) transform origins == rotatex-transformorigin-1a.html rotatex-transformorigin-1-ref.html +== overflow-hidden-1a.html overflow-hidden-1-ref.html