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

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

Issue 444223005: [SVG2] Svg elements that overflow the viewport should also be hitdetected. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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: Source/core/rendering/svg/RenderSVGRoot.cpp
diff --git a/Source/core/rendering/svg/RenderSVGRoot.cpp b/Source/core/rendering/svg/RenderSVGRoot.cpp
index 6d554622faaed5e156de2f4ac828c7b9af446eee..3c40646b53b83bcc8923294b1f88bb64eb7ec505 100644
--- a/Source/core/rendering/svg/RenderSVGRoot.cpp
+++ b/Source/core/rendering/svg/RenderSVGRoot.cpp
@@ -424,7 +424,7 @@ bool RenderSVGRoot::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
// Only test SVG content if the point is in our content box.
pdr. 2014/08/07 22:51:47 Can you update this comment too?
// FIXME: This should be an intersection when rect-based hit tests are supported by nodeAtFloatPoint.
- if (contentBoxRect().contains(pointInBorderBox)) {
+ if (contentBoxRect().contains(pointInBorderBox) || (!shouldApplyViewportClip() && visualOverflowRect().contains(pointInBorderBox))) {
const AffineTransform& localToParentTransform = this->localToParentTransform();
if (localToParentTransform.isInvertible()) {
FloatPoint localPoint = localToParentTransform.inverse().mapPoint(FloatPoint(pointInParent));

Powered by Google App Engine
This is Rietveld 408576698