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

Unified Diff: Source/core/rendering/svg/RenderSVGEllipse.cpp

Issue 745383007: Fix an issue where hit detection could fail on rect and ellipse shapes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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: Source/core/rendering/svg/RenderSVGEllipse.cpp
diff --git a/Source/core/rendering/svg/RenderSVGEllipse.cpp b/Source/core/rendering/svg/RenderSVGEllipse.cpp
index 47ad9b9822549fd0d983ba4cdde7284bd636a0d0..1d415499032d3531baa297d96661a76131f631a4 100644
--- a/Source/core/rendering/svg/RenderSVGEllipse.cpp
+++ b/Source/core/rendering/svg/RenderSVGEllipse.cpp
@@ -60,8 +60,9 @@ void RenderSVGEllipse::updateShapeFromElement()
return;
if (!m_radii.isEmpty()) {
- // Fallback to RenderSVGShape if shape has a non-scaling stroke.
- if (hasNonScalingStroke()) {
+ // Fallback to RenderSVGShape and path-based hit detection if the ellipse
+ // has a non-scaling or non-smooth stroke.
+ if (hasNonScalingStroke() || !hasSmoothStroke()) {
Erik Dahlström (inactive) 2014/12/03 15:16:35 Ellipses/circles shouldn't need to care about stro
RenderSVGShape::updateShapeFromElement();
m_usePathFallback = true;
return;

Powered by Google App Engine
This is Rietveld 408576698