Skip to content
  • dcheng@chromium.org's avatar
    Don't always select images during an image drag. · 87e62f7f
    dcheng@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=62998
    
    Reviewed by Tony Chang.
    
    Source/WebCore:
    
    Only select an image being dragged if it is contenteditable.
    
    Test: fast/events/drag-selects-image.html
    
    * dom/Node.cpp:
    (WebCore::Node::isContentRichlyEditable):
    * dom/Node.h:
    * page/DragController.cpp:
    (WebCore::prepareClipboardForImageDrag):
    
    LayoutTests:
    
    * fast/events/drag-selects-image-expected.txt: Added.
    * fast/events/drag-selects-image.html: Added.
    * platform/chromium-win/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt:
    * platform/chromium-win/editing/selection/drag-to-contenteditable-iframe-expected.txt:
    * platform/chromium/test_expectations.txt:
    * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt:
    * platform/mac/editing/selection/drag-to-contenteditable-iframe-expected.txt:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    87e62f7f