Bug 1356179 - Part 1. Roundout clip region to make sure we have enough space for mask/clip-path painting.
MozReview-Commit-ID: 6hfOiCDq7ni
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -8524,19 +8524,21 @@ nsDisplayMask::PaintAsLayer(nsDisplayLis
mFrame, mVisibleRect,
borderArea, aBuilder,
aManager,
mHandleOpacity, flags);
// 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()));
+
+ Rect bounds =
+ NSRectToRect(mVisibleRect, mFrame->PresContext()->AppUnitsPerDevPixel());
+ bounds.RoundOut();
+ context->Clip(bounds);
ComputeMaskGeometry(params);
image::DrawResult result =
nsSVGIntegrationUtils::PaintMaskAndClipPath(params);
context->PopClip();