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

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

Issue 45733010: Add pointer-events="bounding-box" for svg content. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: make assert more specific Created 7 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
« no previous file with comments | « Source/core/rendering/svg/RenderSVGImage.cpp ('k') | Source/core/rendering/svg/RenderSVGText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGShape.cpp
diff --git a/Source/core/rendering/svg/RenderSVGShape.cpp b/Source/core/rendering/svg/RenderSVGShape.cpp
index 9ea30e9b8251772c787fbd98e7ea5169fc5be4ac..04298f7e49d8d64694ea67ec3e81445086a2af21 100644
--- a/Source/core/rendering/svg/RenderSVGShape.cpp
+++ b/Source/core/rendering/svg/RenderSVGShape.cpp
@@ -338,7 +338,8 @@ bool RenderSVGShape::nodeAtFloatPointInternal(const HitTestRequest& request, con
WindRule fillRule = svgStyle->fillRule();
if (request.svgClipContent())
fillRule = svgStyle->clipRule();
- if ((hitRules.canHitStroke && (svgStyle->hasStroke() || !hitRules.requireStroke) && strokeContains(localPoint, hitRules.requireStroke))
+ if ((hitRules.canHitBoundingBox && objectBoundingBox().contains(localPoint))
+ || (hitRules.canHitStroke && (svgStyle->hasStroke() || !hitRules.requireStroke) && strokeContains(localPoint, hitRules.requireStroke))
|| (hitRules.canHitFill && (svgStyle->hasFill() || !hitRules.requireFill) && fillContains(localPoint, hitRules.requireFill, fillRule)))
return true;
}
« no previous file with comments | « Source/core/rendering/svg/RenderSVGImage.cpp ('k') | Source/core/rendering/svg/RenderSVGText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698