Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp |
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp |
index 4c2aa337f765e18065ee0ab92ce2a11dc7046bf0..266baa1a00c48b4f8aab03fb8e9124c762c500c4 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp |
@@ -45,15 +45,17 @@ |
namespace blink { |
-void LayoutSVGShape::adjustVisualRectForRasterEffects( |
+bool LayoutSVGShape::adjustVisualRectForRasterEffects( |
LayoutRect& visualRect) const { |
// Account for raster expansions due to SVG stroke hairline raster effects. |
- if (styleRef().svgStyle().hasVisibleStroke()) { |
- float pad = 0.5f; |
+ if (!visualRect.isEmpty() && styleRef().svgStyle().hasVisibleStroke()) { |
+ LayoutUnit pad(0.5f); |
if (styleRef().svgStyle().capStyle() != ButtCap) |
pad += 0.5f; |
- visualRect.inflate(LayoutUnit(pad)); |
+ visualRect.inflate(pad); |
+ return true; |
} |
+ return false; |
} |
LayoutSVGShape::LayoutSVGShape(SVGGeometryElement* node) |