| Index: content/browser/renderer_host/render_view_host_impl.cc
|
| diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
| index 4672bccd6fc703e014b5b2d022763a8adba569f0..5a6b8ca5b06804d4cb26945df6f5b5648cb340eb 100644
|
| --- a/content/browser/renderer_host/render_view_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_view_host_impl.cc
|
| @@ -692,9 +692,11 @@ void RenderViewHostImpl::DragTargetDragEnter(
|
| .append(register_name));
|
| }
|
|
|
| - Send(new DragMsg_TargetDragEnter(GetRoutingID(), filtered_data, client_pt,
|
| - screen_pt, operations_allowed,
|
| - key_modifiers));
|
| + const gfx::Point client_pt_in_viewport = ConvertDIPToViewport(client_pt);
|
| +
|
| + Send(new DragMsg_TargetDragEnter(GetRoutingID(), filtered_data,
|
| + client_pt_in_viewport, screen_pt,
|
| + operations_allowed, key_modifiers));
|
| }
|
|
|
| void RenderViewHostImpl::DragTargetDragOver(
|
| @@ -702,8 +704,10 @@ void RenderViewHostImpl::DragTargetDragOver(
|
| const gfx::Point& screen_pt,
|
| WebDragOperationsMask operations_allowed,
|
| int key_modifiers) {
|
| - Send(new DragMsg_TargetDragOver(GetRoutingID(), client_pt, screen_pt,
|
| - operations_allowed, key_modifiers));
|
| + const gfx::Point client_pt_in_viewport = ConvertDIPToViewport(client_pt);
|
| + Send(new DragMsg_TargetDragOver(GetRoutingID(), client_pt_in_viewport,
|
| + screen_pt, operations_allowed,
|
| + key_modifiers));
|
| }
|
|
|
| void RenderViewHostImpl::DragTargetDragLeave() {
|
| @@ -714,17 +718,18 @@ void RenderViewHostImpl::DragTargetDrop(
|
| const gfx::Point& client_pt,
|
| const gfx::Point& screen_pt,
|
| int key_modifiers) {
|
| - Send(new DragMsg_TargetDrop(GetRoutingID(), client_pt, screen_pt,
|
| + const gfx::Point client_pt_in_viewport = ConvertDIPToViewport(client_pt);
|
| + Send(new DragMsg_TargetDrop(GetRoutingID(), client_pt_in_viewport, screen_pt,
|
| key_modifiers));
|
| }
|
|
|
| void RenderViewHostImpl::DragSourceEndedAt(
|
| int client_x, int client_y, int screen_x, int screen_y,
|
| WebDragOperation operation) {
|
| - Send(new DragMsg_SourceEnded(GetRoutingID(),
|
| - gfx::Point(client_x, client_y),
|
| - gfx::Point(screen_x, screen_y),
|
| - operation));
|
| + const gfx::Point client_pt_in_viewport =
|
| + ConvertDIPToViewport(gfx::Point(client_x, client_y));
|
| + Send(new DragMsg_SourceEnded(GetRoutingID(), client_pt_in_viewport,
|
| + gfx::Point(screen_x, screen_y), operation));
|
| }
|
|
|
| void RenderViewHostImpl::DragSourceSystemDragEnded() {
|
| @@ -1393,4 +1398,9 @@ void RenderViewHostImpl::RenderViewReady() {
|
| delegate_->RenderViewReady(this);
|
| }
|
|
|
| +gfx::Point RenderViewHostImpl::ConvertDIPToViewport(const gfx::Point& point) {
|
| + float scale = GetWidget()->GetView()->current_device_scale_factor();
|
| + return gfx::Point(point.x() * scale, point.y() * scale);
|
| +}
|
| +
|
| } // namespace content
|
|
|