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) |