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

Unified Diff: Source/core/page/EventHandler.cpp

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
« no previous file with comments | « no previous file | Source/core/rendering/HitTestRequest.h » ('j') | Source/core/rendering/HitTestRequest.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index 1a1b6d5f8102b02fcd7fdb6584124f711878e974..7bfa4813a99731415b3889c1c7e187642cde26fb 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -3674,9 +3674,13 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
touchTarget = node;
// FIXME(rbyers): Should really be doing a second hit test that ignores inline elements - crbug.com/319479.
Rick Byers 2014/02/17 14:44:24 Oh, and you can remove this FIXME now of course.
gnana 2014/02/24 18:59:50 Done.
- TouchAction effectiveTouchAction = computeEffectiveTouchAction(*node);
- if (effectiveTouchAction != TouchActionAuto)
- m_frame->page()->chrome().client().setTouchAction(effectiveTouchAction);
+ HitTestResult taResult = hitTestResultAtPoint(pagePoint, hitType | HitTestRequest::TouchAction);
Rick Byers 2014/02/17 14:43:52 It's probably worth moving the hit test into compu
gnana 2014/02/24 18:59:50 Done.
+ Node* taNode = taResult.innerNode();
+ if (taNode == node) {
Rick Byers 2014/02/17 14:43:52 You'll need to do this even when the hit test retu
gnana 2014/02/24 18:59:50 Done.
+ TouchAction effectiveTouchAction = computeEffectiveTouchAction(*taNode);
+ if (effectiveTouchAction != TouchActionAuto)
+ m_frame->page()->chrome().client().setTouchAction(effectiveTouchAction);
+ }
} else if (pointState == PlatformTouchPoint::TouchReleased || pointState == PlatformTouchPoint::TouchCancelled) {
// The target should be the original target for this touch, so get it from the hashmap. As it's a release or cancel
« no previous file with comments | « no previous file | Source/core/rendering/HitTestRequest.h » ('j') | Source/core/rendering/HitTestRequest.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698