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

--HG--
extra : commitid : EAwkrjTK38j
extra : rebase_source : cfd8574444637eb284f11f9320530f386b3e52e4
This commit is contained in:
Markus Stange 2015-10-27 21:06:57 +01:00
parent 09bf18ccd8
commit 76845de322

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);
}