Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(588)

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp

Issue 2455703003: [SPInvalidation] Call LayoutObject::adjustVisualRectForRasterEffects from PaintInvalidator (Closed)
Patch Set: - Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h ('k') | third_party/WebKit/Source/core/paint/PaintInvalidator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698