diff options
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_view_mac.mm | 6 | ||||
-rw-r--r-- | webkit/api/src/mac/WebInputEventFactory.mm | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm index 192a082..bfcb94b 100644 --- a/chrome/browser/tab_contents/tab_contents_view_mac.mm +++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm @@ -185,10 +185,11 @@ void TabContentsViewMac::StartDragging(const WebDropData& drop_data) { // Tell the view to start a drag using |cocoa_view_| as the drag source. The // source will get notified when the drag completes (success or failure) so - // it can tell the render view host the drag is done. Windows does this with - // a nested event loop, we get called back. + // it can tell the render view host the drag is done. The drag invokes a + // nested event loop, but we need to continue processing events. NSPoint mousePoint = [currentEvent locationInWindow]; mousePoint = [cocoa_view_ convertPoint:mousePoint fromView:nil]; + MessageLoop::current()->SetNestableTasksAllowed(true); [cocoa_view_ dragImage:dragImage at:mousePoint offset:NSZeroSize @@ -196,6 +197,7 @@ void TabContentsViewMac::StartDragging(const WebDropData& drop_data) { pasteboard:pasteboard source:cocoa_view_ slideBack:YES]; + MessageLoop::current()->SetNestableTasksAllowed(false); } void TabContentsViewMac::OnContentsDestroy() { diff --git a/webkit/api/src/mac/WebInputEventFactory.mm b/webkit/api/src/mac/WebInputEventFactory.mm index 33378c9..262903c 100644 --- a/webkit/api/src/mac/WebInputEventFactory.mm +++ b/webkit/api/src/mac/WebInputEventFactory.mm @@ -967,7 +967,7 @@ WebMouseEvent WebInputEventFactory::mouseEvent(NSEvent* event, NSView* view) NSPoint location = [NSEvent mouseLocation]; // global coordinates result.globalX = location.x; - result.globalY = location.y; + result.globalY = [[[view window] screen] frame].size.height - location.y; NSPoint windowLocal = [event locationInWindow]; location = [view convertPoint:windowLocal fromView:nil]; |