Bug 1299715 - Part 3. Clip the target context by visible region of nsDisplayMask. r=mstange

MozReview-Commit-ID: HuqQBdY2M0O

--HG--
extra : rebase_source : c387c0b7745add2bb6bca185d2e7d91734d3e716
This commit is contained in:
cku 2016-10-07 11:47:45 +08:00
parent 2a0c6d5e7c
commit bedd15c17a

View File

@ -6938,9 +6938,18 @@ nsDisplayMask::PaintAsLayer(nsDisplayListBuilder* aBuilder,
aManager, aManager,
mHandleOpacity); mHandleOpacity);
// Clip the drawing target by mVisibleRect, which contains the visible
// region of the target frame and its out-of-flow and inflow descendants.
gfxContext* context = aCtx->ThebesContext();
context->Clip(NSRectToSnappedRect(mVisibleRect,
mFrame->PresContext()->AppUnitsPerDevPixel(),
*aCtx->GetDrawTarget()));
image::DrawResult result = image::DrawResult result =
nsSVGIntegrationUtils::PaintMaskAndClipPath(params); nsSVGIntegrationUtils::PaintMaskAndClipPath(params);
context->PopClip();
nsDisplaySVGEffectsGeometry::UpdateDrawResult(this, result); nsDisplaySVGEffectsGeometry::UpdateDrawResult(this, result);
} }