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

Unified Diff: content/shell/renderer/test_runner/event_sender.cc

Issue 839073004: Ignore left-button eventSender.mouseDown() uses while dragging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/shell/renderer/test_runner/event_sender.cc
diff --git a/content/shell/renderer/test_runner/event_sender.cc b/content/shell/renderer/test_runner/event_sender.cc
index b22fe7291c6bcc4be1a8a99aaeffa86cc188e650..fa8685ba5776a051ec4a6fe8a3020276374aa0f5 100644
--- a/content/shell/renderer/test_runner/event_sender.cc
+++ b/content/shell/renderer/test_runner/event_sender.cc
@@ -1189,6 +1189,11 @@ void EventSender::MouseDown(int button_number, int modifiers) {
WebMouseEvent::Button button_type =
GetButtonTypeFromButtonNumber(button_number);
+ // Ignore invalid uses of mouseDown() while drag is in progress.
+ if (button_type == WebMouseEvent::ButtonLeft &&
+ !current_drag_data_.isNull())
+ return;
+
UpdateClickCountForButton(button_type);
pressed_button_ = button_type;
« 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