diff --git a/layout/reftests/svg/svg-integration/clip-path/reftest.list b/layout/reftests/svg/svg-integration/clip-path/reftest.list index 367ce311ff1d..94c13c2b4766 100644 --- a/layout/reftests/svg/svg-integration/clip-path/reftest.list +++ b/layout/reftests/svg/svg-integration/clip-path/reftest.list @@ -14,7 +14,7 @@ == clip-path-polygon-010.html clip-path-stripes-001-ref.html == clip-path-polygon-011.html clip-path-stripes-001-ref.html == clip-path-polygon-012.html clip-path-stripes-001-ref.html -fuzzy(0-1,0-20) fails-if(!gtkWidget) == clip-path-polygon-013.html clip-path-stripes-003-ref.html +fuzzy(0-1,0-20) == clip-path-polygon-013.html clip-path-stripes-003-ref.html fuzzy-if(!useDrawSnapshot,35-70,699-800) == clip-path-circle-001.html clip-path-circle-001-ref.html fuzzy-if(!useDrawSnapshot,35-70,699-800) == clip-path-circle-002.html clip-path-circle-001-ref.html diff --git a/layout/svg/SVGIntegrationUtils.cpp b/layout/svg/SVGIntegrationUtils.cpp index 276c622ee16f..5d2e78af3f84 100644 --- a/layout/svg/SVGIntegrationUtils.cpp +++ b/layout/svg/SVGIntegrationUtils.cpp @@ -758,16 +758,19 @@ bool SVGIntegrationUtils::PaintMask(const PaintFramesParams& aParams, MoveContextOriginToUserSpace(firstFrame, aParams); basicShapeSR.SetContext(&ctx); - CSSClipPathInstance::ApplyBasicShapeOrPathClip( - ctx, frame, SVGUtils::GetCSSPxToDevPxMatrix(frame)); + gfxMatrix mat = SVGUtils::GetCSSPxToDevPxMatrix(frame); if (!maskUsage.shouldGenerateMaskLayer) { // Only have basic-shape clip-path effect. Fill clipped region by // opaque white. ctx.SetDeviceColor(DeviceColor::MaskOpaqueWhite()); + RefPtr path = CSSClipPathInstance::CreateClipPathForFrame( + ctx.GetDrawTarget(), frame, mat); + ctx.SetPath(path); ctx.Fill(); return true; } + CSSClipPathInstance::ApplyBasicShapeOrPathClip(ctx, frame, mat); } // Paint mask onto ctx. diff --git a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-geometryBox-2.html.ini b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-geometryBox-2.html.ini deleted file mode 100644 index 7b223a75164f..000000000000 --- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-geometryBox-2.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[clip-path-geometryBox-2.html] - expected: FAIL