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

Unified Diff: content/renderer/render_widget.cc

Issue 298953005: [DevTools] Don't send multiple mouse move acks when paused in debugger. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 6d69198747eb5cc87c571a6550c9579cdc1c581d..d057bc133b83a720d3ffd61dea521632851858fc 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1082,7 +1082,8 @@ void RenderWidget::OnHandleInputEvent(const blink::WebInputEvent* input_event,
Send(response.release());
}
}
- ignore_ack_for_mouse_move_from_debugger_ = false;
+ if (input_event->type == WebInputEvent::MouseMove)
+ ignore_ack_for_mouse_move_from_debugger_ = false;
#if defined(OS_ANDROID)
// Allow the IME to be shown when the focus changes as a consequence
@@ -1520,10 +1521,14 @@ bool RenderWidget::ShouldHandleImeEvent() {
bool RenderWidget::SendAckForMouseMoveFromDebugger() {
if (handling_event_type_ == WebInputEvent::MouseMove) {
- InputHostMsg_HandleInputEvent_ACK_Params ack;
- ack.type = handling_event_type_;
- ack.state = INPUT_EVENT_ACK_STATE_CONSUMED;
- Send(new InputHostMsg_HandleInputEvent_ACK(routing_id_, ack));
+ // If we pause multiple times during a single mouse move event, we should
+ // only send ACK once.
+ if (!ignore_ack_for_mouse_move_from_debugger_) {
+ InputHostMsg_HandleInputEvent_ACK_Params ack;
+ ack.type = handling_event_type_;
+ ack.state = INPUT_EVENT_ACK_STATE_CONSUMED;
+ Send(new InputHostMsg_HandleInputEvent_ACK(routing_id_, ack));
+ }
return true;
}
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698