WebCore: dataTransfer.types() should not return Files if file list is empty in the...
authorjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Sep 2009 18:02:11 +0000 (18:02 +0000)
committerjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Sep 2009 18:02:11 +0000 (18:02 +0000)
commit4ab1f339cf4357094d313426bbe0d6760b74f408
treef13e4c52747015375df4895205368131d18d0937
parentc8c3c69c6ef482a9682b34bd6698db04258235b6
WebCore: dataTransfer.types() should not return Files if file list is empty in the clipboard.
https://bugs.webkit.org/show_bug.cgi?id=28891

Reviewed by David Levin.

We change the behavior to handle the empty file list in order to match the spec.

Tested by clipboard-file-access.html.

* platform/mac/ClipboardMac.mm:
(WebCore::addHTMLClipboardTypesForCocoaType):
(WebCore::ClipboardMac::types):

LayoutTests: dataTransfer.types() should not return Files if file list is empty in the clipboard.
https://bugs.webkit.org/show_bug.cgi?id=28891

Reviewed by David Levin.

Update the test script and expected result to reflect the behavior change.

* http/tests/security/clipboard/clipboard-file-access-expected.txt:
* http/tests/security/clipboard/resources/clipboard-file-access.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@48169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/security/clipboard/clipboard-file-access-expected.txt
LayoutTests/http/tests/security/clipboard/resources/clipboard-file-access.js
WebCore/ChangeLog
WebCore/platform/mac/ClipboardMac.mm