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

Unified Diff: components/test_runner/event_sender.cc

Issue 1728353002: Have EventSender mouseups unwind better on cancellation during dragover. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: components/test_runner/event_sender.cc
diff --git a/components/test_runner/event_sender.cc b/components/test_runner/event_sender.cc
index 6e1df4fc4cf424e54e8569157891d64303d8d459..31867c91d971bdffbee91640d9c82dac8d67b957 100644
--- a/components/test_runner/event_sender.cc
+++ b/components/test_runner/event_sender.cc
@@ -2594,13 +2594,17 @@ void EventSender::DoMouseUp(const WebMouseEvent& e) {
WebPoint client_point(e.x, e.y);
WebPoint screen_point(e.globalX, e.globalY);
- FinishDragAndDrop(
- e,
- view_->dragTargetDragOver(
- client_point,
- screen_point,
- current_drag_effects_allowed_,
- e.modifiers));
+ blink::WebDragOperation drag_effect = view_->dragTargetDragOver(
+ client_point,
+ screen_point,
+ current_drag_effects_allowed_,
+ e.modifiers);
+
+ // Bail if dragover caused cancellation.
+ if (current_drag_data_.isNull())
+ return;
+
+ FinishDragAndDrop(e, drag_effect);
}
void EventSender::DoMouseMove(const WebMouseEvent& e) {

Powered by Google App Engine
This is Rietveld 408576698