Bug 1217168 - Respect layer clip rects during plugin visibility computation. r=jimm

This commit is contained in:
Markus Stange 2015-10-27 21:06:57 +01:00
parent c38bf4f8c7
commit bba86c58b0

View File

@ -1053,6 +1053,12 @@ Layer::GetVisibleRegionRelativeToRootLayer(nsIntRegion& aResult,
nsIntRegion siblingVisibleRegion(sibling->GetEffectiveVisibleRegion());
// Translate the siblings region to |layer|'s origin.
siblingVisibleRegion.MoveBy(-siblingOffset.x, -siblingOffset.y);
// Apply the sibling's clip.
// Layer clip rects are not affected by the layer's transform.
Maybe<ParentLayerIntRect> clipRect = sibling->GetEffectiveClipRect();
if (clipRect) {
siblingVisibleRegion.AndWith(ParentLayerIntRect::ToUntyped(*clipRect));
}
// Subtract the sibling visible region from the visible region of |this|.
aResult.SubOut(siblingVisibleRegion);
}