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

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

Issue 220343002: Update touch-action hit-testing to match latest spec changes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 6 years, 9 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/RenderBlock.h » ('j') | no next file with comments »
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 4166b0be38990a81356a0b879a2e77093e72288c..04bb8931399a4f61d76e599e7afc361e0f730c36 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -3940,16 +3940,14 @@ TouchAction EventHandler::computeEffectiveTouchAction(const LayoutPoint& point)
if (!node)
return TouchActionAuto;
- // Start by permitting all actions, then walk the block level elements from
- // the target node up to the nearest scrollable ancestor and exclude any
- // prohibited actions. For now this is trivial, but when we add more types
- // of actions it'll get a little more complex.
+ // Start by permitting all actions, then walk the elements supporting
+ // touch-action from the target node up to the nearest scrollable ancestor
+ // and exclude any prohibited actions. For now this is trivial, but when we
Rick Byers 2014/04/04 01:22:28 nit: This "for now this is trivial" comment is old
+ // add more types of actions it'll get a little more complex.
TouchAction effectiveTouchAction = TouchActionAuto;
for (const Node* curNode = node; curNode; curNode = NodeRenderingTraversal::parent(curNode)) {
- // The spec says only block and SVG elements get touch-action.
- // FIXME(rbyers): Add correct support for SVG, crbug.com/247396.
if (RenderObject* renderer = curNode->renderer()) {
- if (renderer->isRenderBlockFlow()) {
+ if (renderer->visibleForTouchAction()) {
TouchAction action = renderer->style()->touchAction();
effectiveTouchAction = intersectTouchAction(action, effectiveTouchAction);
if (effectiveTouchAction == TouchActionNone)
« no previous file with comments | « no previous file | Source/core/rendering/RenderBlock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698