Skip to content
  • enrica@apple.com's avatar
    REGRESSION (WK2): Can't drag and drop a link or image from Safari to Desktop · c9cd1be8
    enrica@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=60819
    <rdar://problem/9370689>
    
    Reviewed by Darin Adler and Brian Weinstein.
    
    Source/WebCore: 
    
    To support drag-and-drop to the desktop and other windows applications,
    we need to support the fileDescriptor and fileContentZero clipboard formats.
    This patch adds the support for serializing these types across the process boundary.
    It also fixes a regression introduced by r70914, that was causing the content of the
    shortcut files to be corrupted. Using ascii() to convert from String to CString was
    causing '\n' and '\r' to be replaced with '?'.
            
    * platform/DragData.h:
    * platform/win/ClipboardUtilitiesWin.cpp:
    (WebCore::fileDescriptorFormat): Moved from ClipboardWin.cpp.
    (WebCore::fileContentFormatZero): Moved from ClipboardWin.cpp.
    (WebCore::getFileDescriptorData): Serialize FileDescriptor type.
    (WebCore::getFileContentData): Serialize FileContent type.
    (WebCore::setFileDescriptorData): Deserialize FileDescriptor type.
    (WebCore::setFileContentData): Deserialize FileContent type.
    (WebCore::setCFData): Added missing initialization of the tymed field
    that was causing the cfHDrop format not to be deserialized correctly. 
    * platform/win/ClipboardUtilitiesWin.h:
    * platform/win/ClipboardWin.cpp:
    (WebCore::createGlobalHDropContent): Changed ascii() to latin1().
    (WebCore::ClipboardWin::writeURL):
    * platform/win/DragDataWin.cpp:
    (WebCore::DragData::getDragFileDescriptorData):
    (WebCore::DragData::getDragFileContentData):
    
    Source/WebKit2: 
    
    To support drag-and-drop to the desktop and other windows applications,
    we need to support the fileDescriptor and fileContentZero clipboard formats.
    This patch adds the support for serializing these types across the process boundary.
    
    * Platform/CoreIPC/Arguments.h: Added support for messages with 10 arguments.
    (CoreIPC::Arguments10::Arguments10):
    (CoreIPC::Arguments10::encode):
    (CoreIPC::Arguments10::decode):
    (CoreIPC::In):
    (CoreIPC::Out):
    * Platform/CoreIPC/HandleMessage.h:
    (CoreIPC::callMemberFunction): Added support for memebers with 10 arguments.
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::startDragDrop):
    * UIProcess/WebPageProxy.h:
    * UIProcess/WebPageProxy.messages.in:
    * WebProcess/WebCoreSupport/win/WebDragClientWin.cpp:
    (WebKit::WebDragClient::startDrag):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    c9cd1be8