Index: content/browser/web_contents/web_contents_view_mac.mm |
diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm |
index b69a62e04fe2f019cd713b3fbce3897d8537eb63..5efa7135cc85fe1be5413d507a56527e5e43a13c 100644 |
--- a/content/browser/web_contents/web_contents_view_mac.mm |
+++ b/content/browser/web_contents/web_contents_view_mac.mm |
@@ -174,7 +174,7 @@ void WebContentsViewMac::StartDragging( |
const WebDropData& drop_data, |
WebDragOperationsMask allowed_operations, |
const gfx::ImageSkia& image, |
- const gfx::Point& image_offset) { |
+ const gfx::Vector2d& image_offset) { |
// By allowing nested tasks, the code below also allows Close(), |
// which would deallocate |this|. The same problem can occur while |
// processing -sendEvent:, so Close() is deferred in that case. |
@@ -186,7 +186,8 @@ void WebContentsViewMac::StartDragging( |
// processing events. |
MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current()); |
NSDragOperation mask = static_cast<NSDragOperation>(allowed_operations); |
- NSPoint offset = NSPointFromCGPoint(image_offset.ToCGPoint()); |
+ gfx::Point image_point = gfx::PointAtOffsetFromOrigin(image_offset); |
Peter Kasting
2012/10/30 01:14:14
Nit: Inline
|
+ NSPoint offset = NSPointFromCGPoint(image_point.ToCGPoint()); |
[cocoa_view_ startDragWithDropData:drop_data |
dragOperationMask:mask |
image:gfx::NSImageFromImageSkia(image) |