OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1924 void RenderViewImpl::setKeyboardFocusURL(const WebURL& url) { | 1924 void RenderViewImpl::setKeyboardFocusURL(const WebURL& url) { |
1925 focus_url_ = GURL(url); | 1925 focus_url_ = GURL(url); |
1926 UpdateTargetURL(focus_url_, mouse_over_url_); | 1926 UpdateTargetURL(focus_url_, mouse_over_url_); |
1927 } | 1927 } |
1928 | 1928 |
1929 void RenderViewImpl::startDragging(WebLocalFrame* frame, | 1929 void RenderViewImpl::startDragging(WebLocalFrame* frame, |
1930 const WebDragData& data, | 1930 const WebDragData& data, |
1931 WebDragOperationsMask mask, | 1931 WebDragOperationsMask mask, |
1932 const WebImage& image, | 1932 const WebImage& image, |
1933 const WebPoint& webImageOffset) { | 1933 const WebPoint& webImageOffset) { |
| 1934 blink::WebRect offset_in_window(webImageOffset.x, webImageOffset.y, 0, 0); |
| 1935 convertViewportToWindow(&offset_in_window); |
1934 DropData drop_data(DropDataBuilder::Build(data)); | 1936 DropData drop_data(DropDataBuilder::Build(data)); |
1935 drop_data.referrer_policy = frame->document().referrerPolicy(); | 1937 drop_data.referrer_policy = frame->document().referrerPolicy(); |
1936 gfx::Vector2d imageOffset(webImageOffset.x, webImageOffset.y); | 1938 gfx::Vector2d imageOffset(offset_in_window.x, offset_in_window.y); |
1937 Send(new DragHostMsg_StartDragging(routing_id(), drop_data, mask, | 1939 Send(new DragHostMsg_StartDragging(routing_id(), drop_data, mask, |
1938 image.getSkBitmap(), imageOffset, | 1940 image.getSkBitmap(), imageOffset, |
1939 possible_drag_event_info_)); | 1941 possible_drag_event_info_)); |
1940 } | 1942 } |
1941 | 1943 |
1942 bool RenderViewImpl::acceptsLoadDrops() { | 1944 bool RenderViewImpl::acceptsLoadDrops() { |
1943 return renderer_preferences_.can_accept_load_drops; | 1945 return renderer_preferences_.can_accept_load_drops; |
1944 } | 1946 } |
1945 | 1947 |
1946 void RenderViewImpl::focusNext() { | 1948 void RenderViewImpl::focusNext() { |
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3480 if (IsUseZoomForDSFEnabled()) { | 3482 if (IsUseZoomForDSFEnabled()) { |
3481 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3483 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
3482 } else { | 3484 } else { |
3483 webview()->setDeviceScaleFactor(device_scale_factor_); | 3485 webview()->setDeviceScaleFactor(device_scale_factor_); |
3484 } | 3486 } |
3485 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3487 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
3486 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3488 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
3487 } | 3489 } |
3488 | 3490 |
3489 } // namespace content | 3491 } // namespace content |
OLD | NEW |