Skip to content
  • enrica@apple.com's avatar
    REGRESSION: Drag & Drop Gmail Attachments doesn't work. · b82803ec
    enrica@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=57909
    <rdar://problem/9103220>
    
    Reviewed by Darin Adler.
    
    Source/WebCore: 
    
    In WebKit2 we cannot rely on the value returned by platformData() that
    on Mac returns an NSDraggingInfo object. This is available only in the UI
    process. Therefore we should use m_pasteboard instead.
    We cannot change what platformData() returns on Mac, since there are
    delegate methods that receive a NSDraggingInfo object (only in WebKit).
            
    * platform/DragData.h:
    (WebCore::DragData::pasteboard): Added.
    * platform/mac/ClipboardMac.mm:
    (WebCore::Clipboard::create): Changed to use pasteboard() instead of platformData().
    * platform/mac/DragDataMac.mm:
    (WebCore::DragData::asColor): Replaced references to m_platformData with m_pasteboard.
    (WebCore::DragData::asURL): Same as above.
    
    Source/WebKit2: 
    
    Added _hitTest method to support drag and drop when the drag types cannot be matched.
    This is the case for elements that do not place content
    in the drag pasteboard automatically when the drag start (i.e. dragging a DIV element).
                   
    * UIProcess/API/mac/WKView.mm:
    (-[WKView _hitTest:dragTypes:]): Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b82803ec