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

Unified Diff: content/browser/web_contents/web_contents_view_mac.mm

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RenderText fixup Created 8 years, 2 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: 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 b619774ef0536fa303e7e1f00ceff91fa4a9d104..342a0517f0da599442bfc95ad15845324284aaaa 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());
+ NSPoint offset = NSPointFromCGPoint(
+ gfx::PointAtOffsetFromOrigin(image_offset).ToCGPoint());
[cocoa_view_ startDragWithDropData:drop_data
dragOperationMask:mask
image:gfx::NSImageFromImageSkia(image)

Powered by Google App Engine
This is Rietveld 408576698