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

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

Issue 137123009: Add hittest mode for Touch-action which ignore inline elements and svg elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated review comments Created 6 years, 10 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.h
diff --git a/Source/core/rendering/svg/RenderSVGRoot.h b/Source/core/rendering/svg/RenderSVGRoot.h
index d5490440eba8e9bc88751f746555d47185206d5d..4c2665d120f832228e19ad5cb0e4b1488caad205 100644
--- a/Source/core/rendering/svg/RenderSVGRoot.h
+++ b/Source/core/rendering/svg/RenderSVGRoot.h
@@ -57,6 +57,12 @@ public:
virtual bool hasRelativeIntrinsicLogicalWidth() const OVERRIDE;
virtual bool hasRelativeLogicalHeight() const OVERRIDE;
+ virtual bool visibleToHitTestRequest(const HitTestRequest& request) const
+ {
+ if (request.touchAction())
+ return style()->visibility() == VISIBLE && style()->pointerEvents() != PE_NONE && !isInert();
+ return RenderObject::visibleToHitTestRequest(request);
+ }
// localToBorderBoxTransform maps local SVG viewport coordinates to local CSS box coordinates.
const AffineTransform& localToBorderBoxTransform() const { return m_localToBorderBoxTransform; }

Powered by Google App Engine
This is Rietveld 408576698