diff options
author | Steve Block <steveblock@google.com> | 2009-11-05 09:23:40 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2009-11-10 22:41:12 +0000 |
commit | cac0f67c402d107cdb10971b95719e2ff9c7c76b (patch) | |
tree | d182c7f87211c6f201a5f038e332336493ebdbe7 /WebKit/win/WebCoreSupport/WebDragClient.cpp | |
parent | 4b2ef0f288e7c6c4602f621b7a0e9feed304b70e (diff) | |
download | external_webkit-cac0f67c402d107cdb10971b95719e2ff9c7c76b.zip external_webkit-cac0f67c402d107cdb10971b95719e2ff9c7c76b.tar.gz external_webkit-cac0f67c402d107cdb10971b95719e2ff9c7c76b.tar.bz2 |
Merge webkit.org at r50258 : Initial merge by git.
Change-Id: I1a9e1dc4ed654b69174ad52a4f031a07240f37b0
Diffstat (limited to 'WebKit/win/WebCoreSupport/WebDragClient.cpp')
-rw-r--r-- | WebKit/win/WebCoreSupport/WebDragClient.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/WebKit/win/WebCoreSupport/WebDragClient.cpp b/WebKit/win/WebCoreSupport/WebDragClient.cpp index 840fca1..8451bd6 100644 --- a/WebKit/win/WebCoreSupport/WebDragClient.cpp +++ b/WebKit/win/WebCoreSupport/WebDragClient.cpp @@ -172,16 +172,27 @@ void WebDragClient::startDrag(DragImageRef image, const IntPoint& imageOrigin, c } DWORD okEffect = draggingSourceOperationMaskToDragCursors(m_webView->page()->dragController()->sourceDragOperation()); - DWORD effect; + DWORD effect = DROPEFFECT_NONE; COMPtr<IWebUIDelegate> ui; + HRESULT hr = E_NOTIMPL; if (SUCCEEDED(m_webView->uiDelegate(&ui))) { COMPtr<IWebUIDelegatePrivate> uiPrivate; if (SUCCEEDED(ui->QueryInterface(IID_IWebUIDelegatePrivate, (void**)&uiPrivate))) - if (SUCCEEDED(uiPrivate->doDragDrop(m_webView, dataObject.get(), source.get(), okEffect, &effect))) - return; + hr = uiPrivate->doDragDrop(m_webView, dataObject.get(), source.get(), okEffect, &effect); } - - DoDragDrop(dataObject.get(), source.get(), okEffect, &effect); + if (hr == E_NOTIMPL) + hr = DoDragDrop(dataObject.get(), source.get(), okEffect, &effect); + + DragOperation operation = DragOperationNone; + if (hr == DRAGDROP_S_DROP) { + if (effect & DROPEFFECT_COPY) + operation = DragOperationCopy; + else if (effect & DROPEFFECT_LINK) + operation = DragOperationLink; + else if (effect & DROPEFFECT_MOVE) + operation = DragOperationMove; + } + frame->eventHandler()->dragSourceEndedAt(generateMouseEvent(m_webView, false), operation); } } |