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

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

Issue 44983003: Events ignoring ack disposition receive synthetic acks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test for single synchronous ack. Created 7 years, 1 month 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/immediate_input_router.cc
diff --git a/content/browser/renderer_host/input/immediate_input_router.cc b/content/browser/renderer_host/input/immediate_input_router.cc
index 444678fda27412acab88c21914cdf0a8ff814935..1cb371f8b5fdb25263d4c183d75cce44e0ec0c1b 100644
--- a/content/browser/renderer_host/input/immediate_input_router.cc
+++ b/content/browser/renderer_host/input/immediate_input_router.cc
@@ -339,6 +339,14 @@ void ImmediateInputRouter::OfferToHandlers(const WebInputEvent& input_event,
return;
OfferToRenderer(input_event, latency_info, is_keyboard_shortcut);
+
+ // If we don't care about the ack disposition, send the ack immediately.
+ if (WebInputEventTraits::IgnoresAckDisposition(input_event.type)) {
+ ProcessInputEventAck(input_event.type,
+ INPUT_EVENT_ACK_STATE_IGNORED,
+ latency_info,
+ IGNORING_DISPOSITION);
+ }
}
bool ImmediateInputRouter::OfferToOverscrollController(
@@ -424,6 +432,10 @@ void ImmediateInputRouter::OnInputEventAck(
client_->DecrementInFlightEventCount();
+ // A synthetic ack will already have been sent for this event.
+ if (WebInputEventTraits::IgnoresAckDisposition(event_type))
+ return;
+
ProcessInputEventAck(event_type, ack_result, latency_info, RENDERER);
// WARNING: |this| may be deleted at this point.

Powered by Google App Engine
This is Rietveld 408576698