Bug 1415963 - Take into account stroke (not just fill) when calculating the contribution of an SVG element to a clip rect for a clip path. r=mstange a=gchang
authorBotond Ballo <botond@mozilla.com>
Mon, 13 Nov 2017 19:35:51 -0500
changeset 444840 520fd735565ef440e6c63effcb78b922257f09c3
parent 444839 847de4bb6c76a6cd54d3993c232cfac247e87cff
child 444841 93b43c6d7ab4c0457930b8aa9b337a330e066aaf
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange, gchang
bugs1415963
milestone58.0
Bug 1415963 - Take into account stroke (not just fill) when calculating the contribution of an SVG element to a clip rect for a clip path. r=mstange a=gchang MozReview-Commit-ID: 7ZwwOH0ErRN
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -2617,17 +2617,18 @@ ComputeClipForMaskItem(nsDisplayListBuil
   if (maskUsage.shouldApplyBasicShape) {
     Rect result = nsCSSClipPathInstance::GetBoundingRectForBasicShapeClip(
         aMaskedFrame, svgReset->mClipPath);
     combinedClip = Some(ThebesRect(result));
   } else if (maskUsage.shouldApplyClipPath) {
     gfxRect result = nsSVGUtils::GetBBox(aMaskedFrame,
         nsSVGUtils::eBBoxIncludeClipped |
         nsSVGUtils::eBBoxIncludeFill |
-        nsSVGUtils::eBBoxIncludeMarkers);
+        nsSVGUtils::eBBoxIncludeMarkers |
+        nsSVGUtils::eBBoxIncludeStroke);
     combinedClip = Some(cssToDevMatrix.TransformBounds(result));
   } else {
     // The code for this case is adapted from ComputeMaskGeometry().
 
     nsRect borderArea(toReferenceFrame, aMaskedFrame->GetSize());
     borderArea -= offsetToUserSpace;
 
     // Use an infinite dirty rect to pass into nsCSSRendering::