diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp index af6cd909c95c..75a01ffef37d 100644 --- a/gfx/layers/Layers.cpp +++ b/gfx/layers/Layers.cpp @@ -467,8 +467,10 @@ ContainerLayer::DefaultComputeEffectiveTransforms(const gfx3DMatrix& aTransformT /* We can't (easily) forward our transform to children with a non-empty clip * rect since it would need to be adjusted for the transform. See * the calculations performed by CalculateScissorRect above. + * Nor for a child with a mask layer. */ - if (clipRect && !clipRect->IsEmpty() && !child->GetVisibleRegion().IsEmpty()) { + if ((clipRect && !clipRect->IsEmpty() && !child->GetVisibleRegion().IsEmpty()) || + child->GetMaskLayer()) { useIntermediateSurface = true; break; }