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

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

Issue 188833004: [Android] Properly disable the touch ack timeout during a touch sequence (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@input_log_verbose
Patch Set: Cleanup 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
Index: content/browser/renderer_host/input/touch_event_queue.cc
diff --git a/content/browser/renderer_host/input/touch_event_queue.cc b/content/browser/renderer_host/input/touch_event_queue.cc
index 14118d0e0c0d9f22d5d14afbf2450433a9315481..fb6cfcdfb7ab4a65964f9886f3042a436b03f4ee 100644
--- a/content/browser/renderer_host/input/touch_event_queue.cc
+++ b/content/browser/renderer_host/input/touch_event_queue.cc
@@ -508,9 +508,14 @@ bool TouchEventQueue::IsPendingAckTouchStart() const {
void TouchEventQueue::SetAckTimeoutEnabled(bool enabled,
size_t ack_timeout_delay_ms) {
if (!enabled) {
- // Avoid resetting |timeout_handler_|, as an outstanding timeout may
- // be active and must be completed for ack handling consistency.
ack_timeout_enabled_ = false;
+ if (touch_filtering_state_ == FORWARD_TOUCHES_UNTIL_TIMEOUT)
+ touch_filtering_state_ = FORWARD_ALL_TOUCHES;
+ // Only reset the |timeout_handler_| if the timer is running and has not yet
+ // timed out. This ensures that an already timed out sequence is properly
+ // flushed by the handler.
+ if (timeout_handler_ && timeout_handler_->IsTimeoutTimerRunning())
+ timeout_handler_->Reset();
return;
}

Powered by Google App Engine
This is Rietveld 408576698