-
enrica@apple.com authored
Source/WebCore: WebKit2: drag and drop support on Windows. https://bugs.webkit.org/show_bug.cgi?id=52775 <rdar://problem/8514409> * loader/EmptyClients.h: Removed createDragImageFromLink. * page/DragClient.h: Ditto. * page/DragController.cpp: (WebCore::DragController::startDrag): changed call to createDragImageFromLink. * platform/DragImage.h: * platform/mac/DragImageMac.mm: (WebCore::createDragImageForLink): Moved from DragClient. * platform/win/ClipboardUtilitiesWin.cpp: Added a series of functions to de-serialize the drag data from the map into an IDataObject. (WebCore::getWebLocData): (WebCore::texthtmlFormat): (WebCore::createGlobalData): (WebCore::getFullCFHTML): (WebCore::urlWFormat): (WebCore::urlFormat): (WebCore::filenameWFormat): (WebCore::filenameFormat): (WebCore::htmlFormat): (WebCore::smartPasteFormat): (WebCore::getURL): (WebCore::getPlainText): (WebCore::getTextHTML): (WebCore::ClipboardDataItem::ClipboardDataItem): (WebCore::getStringData): (WebCore::getUtf8Data): (WebCore::getCFData): (WebCore::setUCharData): (WebCore::setCharData): (WebCore::setCFData): (WebCore::getClipboardMap): (WebCore::getClipboardData): (WebCore::setClipboardData): * platform/win/ClipboardUtilitiesWin.h: * platform/win/DragImageWin.cpp: Moved createDragImageForLink from DragClient to a platform specific file in WebCore. It makes a lot more sense here, since the drag image is always created in WebCore for all the other content types except for links. (WebCore::dragLabelFont): (WebCore::createDragImageForLink): * platform/win/WCDataObject.cpp: Added new way to construct a WCDataObject from a DragDataMap. (WebCore::WCDataObject::createInstance): (WebCore::WCDataObject::clearData): * platform/win/WCDataObject.h: Source/WebKit/chromium: WebKit2: drag and drop support on Windows. https://bugs.webkit.org/show_bug.cgi?id=52775 Removed createDragImageForLink from DragClient. * src/DragClientImpl.cpp: * src/DragClientImpl.h: Source/WebKit/efl: WebKit2: drag and drop support on Windows. https://bugs.webkit.org/show_bug.cgi?id=52775 Removed createDragImageForLink from DragClient. * WebCoreSupport/DragClientEfl.cpp: * WebCoreSupport/DragClientEfl.h: Source/WebKit/gtk: WebKit2: drag and drop support on Windows. https://bugs.webkit.org/show_bug.cgi?id=52775 Removed createDragImageForLink from DragClient. * WebCoreSupport/DragClientGtk.cpp: * WebCoreSupport/DragClientGtk.h: Source/WebKit/haiku: WebKit2: drag and drop support on Windows. https://bugs.webkit.org/show_bug.cgi?id=52775 Removed createDragImageForLink from DragClient. * WebCoreSupport/DragClientHaiku.cpp: * WebCoreSupport/DragClientHaiku.h: Source/WebKit/mac: WebKit2: drag and drop support on Windows. https://bugs.webkit.org/show_bug.cgi?id=52775 Removed createDragImageForLink from DragClient. * WebCoreSupport/WebDragClient.h: * WebCoreSupport/WebDragClient.mm: (WebDragClient::startDrag): Source/WebKit/qt: WebKit2: drag and drop support on Windows. https://bugs.webkit.org/show_bug.cgi?id=52775 Removed createDragImageForLink from DragClient. * WebCoreSupport/DragClientQt.cpp: * WebCoreSupport/DragClientQt.h: Source/WebKit/win: WebKit2: drag and drop support on Windows. https://bugs.webkit.org/show_bug.cgi?id=52775 Removed createDragImageForLink from DragClient. * WebCoreSupport/WebDragClient.cpp: (WebDragClient::startDrag): * WebCoreSupport/WebDragClient.h: Source/WebKit/wince: WebKit2: drag and drop support on Windows. https://bugs.webkit.org/show_bug.cgi?id=52775 Removed createDragImageForLink from DragClient. * WebCoreSupport/DragClientWinCE.cpp: * WebCoreSupport/DragClientWinCE.h: Source/WebKit/wx: WebKit2: drag and drop support on Windows. https://bugs.webkit.org/show_bug.cgi?id=52775 Removed createDragImageForLink from DragClient. * WebKitSupport/DragClientWx.cpp: * WebKitSupport/DragClientWx.h: Source/WebKit2: WebKit2: drag and drop support on Windows. https://bugs.webkit.org/show_bug.cgi?id=52775 <rdar://problem/8514409> This patch contains the remaining work to support a WebKit window as drag source on Windows. I've added the code to generate the image for dragging a link as well as the steps necessary to package the HBITMAP into a SharedMemory object and send it over to the UI process where DoDragDrop is performed. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setDragImage): (WebKit::WebPageProxy::startDragDrop): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebDragClient.cpp: (WebKit::WebDragClient::startDrag): Made startDrag for platforms other than Windows and Mac. * WebProcess/WebCoreSupport/WebDragClient.h: * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::WebDragClient::startDrag): * WebProcess/WebCoreSupport/win/WebDragClientWin.cpp: Added. (WebKit::draggingSourceOperationMaskToDragCursors): (WebKit::WebDragClient::startDrag): * WebProcess/WebCoreSupport/win/WebDragSource.cpp: Added. This object implements the IDropSource interface. (WebDragSource::createInstance): (WebDragSource::WebDragSource): (WebDragSource::QueryInterface): (WebDragSource::AddRef): (WebDragSource::Release): (WebDragSource::QueryContinueDrag): (WebDragSource::GiveFeedback): * WebProcess/WebCoreSupport/win/WebDragSource.h: Added. * win/WebKit2.vcproj: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
3492e98b