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

Unified Diff: content/browser/renderer_host/input/input_router_impl.cc

Issue 2724743004: Reset the touch-action on the touch gesture end sequence. (Closed)
Patch Set: Add test case Created 3 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 | content/browser/renderer_host/input/input_router_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/input_router_impl.cc
diff --git a/content/browser/renderer_host/input/input_router_impl.cc b/content/browser/renderer_host/input/input_router_impl.cc
index 2de801a711b83c6995ac7ff79ee225a1b7d755d6..3d418d7d382382bf970f77edbead5d692e8b3c32 100644
--- a/content/browser/renderer_host/input/input_router_impl.cc
+++ b/content/browser/renderer_host/input/input_router_impl.cc
@@ -211,15 +211,6 @@ void InputRouterImpl::SendMouseEventImmediately(
void InputRouterImpl::SendTouchEventImmediately(
const TouchEventWithLatencyInfo& touch_event) {
- if (WebTouchEventTraits::IsTouchSequenceStart(touch_event.event)) {
- touch_action_filter_.ResetTouchAction();
- // Note that if the previous touch-action was TOUCH_ACTION_NONE, enabling
- // the timeout here will not take effect until the *following* touch
- // sequence. This is a desirable side-effect, giving the renderer a chance
- // to send a touch-action response without racing against the ack timeout.
- UpdateTouchAckTimeoutEnabled();
- }
-
FilterAndSendWebInputEvent(touch_event.event, touch_event.latency);
}
@@ -284,6 +275,12 @@ void InputRouterImpl::OnTouchEventAck(const TouchEventWithLatencyInfo& event,
UpdateTouchAckTimeoutEnabled();
}
ack_handler_->OnTouchEventAck(event, ack_result);
+
+ // Reset the touch action at the end of a touch-action sequence.
+ if (WebTouchEventTraits::IsTouchSequenceEnd(event.event)) {
+ touch_action_filter_.ResetTouchAction();
+ UpdateTouchAckTimeoutEnabled();
+ }
}
void InputRouterImpl::OnFilteringTouchEvent(
« no previous file with comments | « no previous file | content/browser/renderer_host/input/input_router_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698