diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 4b0c016d679..e3c57d44a73 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -1683,6 +1683,14 @@ WrapPreserve3DListInternal(nsIFrame* aFrame, nsDisplayListBuilder *aBuilder, nsD if (!aTemp->IsEmpty()) { aOutput->AppendToTop(new (aBuilder) nsDisplayTransform(aBuilder, aFrame, aTemp, aIndex++)); } + // Override item's clipping with our current clip state (if any). Since we're + // bubbling up a preserve-3d transformed child to a preserve-3d parent, + // we can be sure the child doesn't have clip state of its own. + NS_ASSERTION(!item->GetClip().HasClip(), "Unexpected clip on item"); + const DisplayItemClip* clip = aBuilder->ClipState().GetCurrentCombinedClip(aBuilder); + if (clip) { + item->SetClip(aBuilder, *clip); + } aOutput->AppendToTop(item); break; } diff --git a/layout/reftests/bugs/906199-1-ref.html b/layout/reftests/bugs/906199-1-ref.html new file mode 100644 index 00000000000..c494dce827d --- /dev/null +++ b/layout/reftests/bugs/906199-1-ref.html @@ -0,0 +1,32 @@ + + + + + + +
+
+
+
+
+ + + diff --git a/layout/reftests/bugs/906199-1.html b/layout/reftests/bugs/906199-1.html new file mode 100644 index 00000000000..98f4548a790 --- /dev/null +++ b/layout/reftests/bugs/906199-1.html @@ -0,0 +1,33 @@ + + + + + + +
+
+
+
+
+ + + diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 7cf9e9b396a..c6f25a93eb3 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -1772,3 +1772,4 @@ test-pref(layout.css.flexbox.enabled,true) == 849407-1.html 849407-1-ref.html == 883987-1f.html 883987-1-ref.html == 890495-1.html 890495-1-ref.html == 894931-1.html 894931-1-ref.html +== 906199-1.html 906199-1-ref.html