[chromium] Support file drag out using DataTransferItemList::add(File)
authordcheng@chromium.org <dcheng@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2012 22:25:16 +0000 (22:25 +0000)
committerdcheng@chromium.org <dcheng@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2012 22:25:16 +0000 (22:25 +0000)
commit6bed21d6535a8d66a623e442e971ccb794fc1000
treeb2646b378e8b8de5f9375a2dc8245bab81d79ae1
parentb8e739f6b4025563cd494e967120f0c00ebbb68b
[chromium] Support file drag out using DataTransferItemList::add(File)
https://bugs.webkit.org/show_bug.cgi?id=81261

Reviewed by Tony Chang.

Source/WebCore:

Original patch by Varun Jain <varunjain@chromium.org>.
I've updated the original patch to remove 'downloadurl' handling since it's not tested, nor
is it necessary for File objects, since File objects correspond to a native filesystem path.

Test: fast/events/drag-dataTransferItemList-file-handling.html

* platform/chromium/DataTransferItemListChromium.cpp:
(WebCore::DataTransferItemListChromium::add):

Source/WebKit/chromium:

Original patch by Varun Jain <varunjain@chromium.org>.
I've updated the original patch to add some asserts for conditions we shouldn't encounter as
well as removing some redundant null checks.

* src/WebDragData.cpp:
(WebKit::WebDragData::items):

LayoutTests:

* fast/events/drag-dataTransferItemList-file-handling-expected.txt: Added.
* fast/events/drag-dataTransferItemList-file-handling.html: Added.
* platform/gtk/Skipped:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/drag-dataTransferItemList-file-handling-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/drag-dataTransferItemList-file-handling.html [new file with mode: 0644]
LayoutTests/platform/gtk/Skipped
LayoutTests/platform/mac/Skipped
LayoutTests/platform/qt/Skipped
LayoutTests/platform/win/Skipped
Source/WebCore/ChangeLog
Source/WebCore/platform/chromium/DataTransferItemListChromium.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebDragData.cpp