[chromium] event.dataTransfer.types should not return "Text" or "URL"
authordcheng@chromium.org <dcheng@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2012 23:48:23 +0000 (23:48 +0000)
committerdcheng@chromium.org <dcheng@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2012 23:48:23 +0000 (23:48 +0000)
commitbda59e240fb8dec043a80716992a3431ed6c00e6
tree846f2e62f33189b0894ef9ecf151a573fecc796c
parent81f9c015e8254c77ede9e9ee1852ba503425552f
[chromium] event.dataTransfer.types should not return "Text" or "URL"
https://bugs.webkit.org/show_bug.cgi?id=76218

Source/WebCore:

Per the spec, "Text" and "URL" are special values handled for IE compatibility reasons in
dataTransfer.setData() and dataTransfer.getData(). These values should not be exposed
elsewhere.

Reviewed by Tony Chang.

Test: fast/events/dropzone-005.html

* platform/chromium/ChromiumDataObject.cpp:
(WebCore::ChromiumDataObject::types):
(WebCore::ChromiumDataObject::getData):
* platform/chromium/DragDataChromium.cpp:
(WebCore::DragData::containsURL):
(WebCore::DragData::asURL):
(WebCore::DragData::canSmartReplace):

LayoutTests:

Reviewed by Tony Chang.

* editing/pasteboard/dataTransfer-setData-getData-expected.txt:
* fast/events/dropzone-002.html:
* fast/events/dropzone-005-expected.txt: Added.
* fast/events/dropzone-005.html: Modified from LayoutTests/fast/events/dropzone-002.html.
* platform/efl/Skipped:
* platform/gtk/Skipped:
* platform/mac-wk2/Skipped:
* platform/qt/Skipped:
* platform/win-wk2/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/dataTransfer-setData-getData-expected.txt
LayoutTests/fast/events/dropzone-002.html
LayoutTests/fast/events/dropzone-005-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/dropzone-005.html [new file with mode: 0644]
LayoutTests/platform/efl/Skipped
LayoutTests/platform/gtk/Skipped
LayoutTests/platform/mac-wk2/Skipped
LayoutTests/platform/qt/Skipped
LayoutTests/platform/win-wk2/Skipped
Source/WebCore/ChangeLog
Source/WebCore/platform/chromium/ChromiumDataObject.cpp
Source/WebCore/platform/chromium/DragDataChromium.cpp