Correctly set dragLeave and dragEnd coords for OOPIF drag and drop
Currently dragLeave events triggered from the browser process always
have (0, 0) set as coordinates, which is incorrect when the mouse
cursor has not left the page. This patch sets the correct coordinates
when the cursor moves between frames of different processes.
Also, dragEnd event coordinates were not being correctly transformed
before being passed to the target RenderWidgetHost. This patch
applies the transform to move the coordinates into the correct
coordinate space for the frame that receives the dragEnd.
BUG=669695
Review-Url: https://codereview.chromium.org/2655463015
Cr-Commit-Position: refs/heads/master@{#448797}
diff --git a/components/test_runner/event_sender.cc b/components/test_runner/event_sender.cc
index 74b95d2..4be39cd 100644
--- a/components/test_runner/event_sender.cc
+++ b/components/test_runner/event_sender.cc
@@ -2671,7 +2671,8 @@
mainFrameWidget()->dragTargetDrop(current_drag_data_, client_point,
screen_point, event->modifiers());
} else {
- mainFrameWidget()->dragTargetDragLeave();
+ mainFrameWidget()->dragTargetDragLeave(blink::WebPoint(),
+ blink::WebPoint());
}
current_drag_data_.reset();
mainFrameWidget()->dragSourceEndedAt(client_point, screen_point,