| Index: Source/core/page/EventHandler.cpp
|
| diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
|
| index 0bc19a21a3ae478648db1867035abbfdf6b072c4..0e316867dde4e9d182bb7dcadd68c0dd87713ab5 100644
|
| --- a/Source/core/page/EventHandler.cpp
|
| +++ b/Source/core/page/EventHandler.cpp
|
| @@ -3448,7 +3448,7 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
|
| // See http://crbug.com/345372.
|
| m_targetForTouchID.set(point.id(), node);
|
|
|
| - TouchAction effectiveTouchAction = computeEffectiveTouchAction(pagePoint);
|
| + TouchAction effectiveTouchAction = computeEffectiveTouchAction(*node);
|
| if (effectiveTouchAction != TouchActionAuto)
|
| m_frame->page()->chrome().client().setTouchAction(effectiveTouchAction);
|
| }
|
| @@ -3622,25 +3622,20 @@ TouchAction EventHandler::intersectTouchAction(TouchAction action1, TouchAction
|
| return action1 & action2;
|
| }
|
|
|
| -TouchAction EventHandler::computeEffectiveTouchAction(const LayoutPoint& point)
|
| +TouchAction EventHandler::computeEffectiveTouchAction(const Node& node)
|
| {
|
| // Optimization to minimize risk of this new feature (behavior should be identical
|
| // since there's no way to get non-default touch-action values).
|
| if (!RuntimeEnabledFeatures::cssTouchActionEnabled())
|
| return TouchActionAuto;
|
|
|
| - HitTestResult taResult = hitTestResultAtPoint(point, HitTestRequest::TouchEvent | HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::TouchAction);
|
| - Node* node = taResult.innerNode();
|
| - if (!node)
|
| - return TouchActionAuto;
|
| -
|
| // 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.
|
| TouchAction effectiveTouchAction = TouchActionAuto;
|
| - for (const Node* curNode = node; curNode; curNode = NodeRenderingTraversal::parent(curNode)) {
|
| + for (const Node* curNode = &node; curNode; curNode = NodeRenderingTraversal::parent(curNode)) {
|
| if (RenderObject* renderer = curNode->renderer()) {
|
| - if (renderer->visibleForTouchAction()) {
|
| + if (renderer->supportsTouchAction()) {
|
| TouchAction action = renderer->style()->touchAction();
|
| effectiveTouchAction = intersectTouchAction(action, effectiveTouchAction);
|
| if (effectiveTouchAction == TouchActionNone)
|
|
|