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 @@ + + +
+ + + +