Add support for input.webkitEntries
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Sep 2017 23:28:54 +0000 (23:28 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Sep 2017 23:28:54 +0000 (23:28 +0000)
commit2fae88b29edebb8ad7676eb64a6fb0f8d9bd43a5
treed261b6414cd1431b306f819e602d90a479f2fe0d
parent9d181556ad942b049c2f11a6160ba87ab6ccb28b
Add support for input.webkitEntries
https://bugs.webkit.org/show_bug.cgi?id=176257
<rdar://problem/34218671>

Reviewed by Andreas Kling.

Source/WebCore:

Add support for input.webkitEntries as per:
- https://wicg.github.io/entries-api/#html-forms

Our behavior matches Chrome and Firefox, rather than the specification. This means
that webkitEntries is only populated if the webkitdirectory flag is unset.

Tests: fast/forms/file/entries-api/drag-folder-webkitEntries.html
       fast/forms/file/entries-api/webkitdirectory-drag-folder-webkitEntries.html

* CMakeLists.txt:
* DerivedSources.make:
* Modules/entriesapi/HTMLInputElementEntriesAPI.cpp: Added.
(WebCore::HTMLInputElementEntriesAPI::webkitEntries):
* Modules/entriesapi/HTMLInputElementEntriesAPI.h: Added.
* Modules/entriesapi/HTMLInputElementEntriesAPI.idl: Added.
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/generate-bindings.pl:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::jsTestInterfaceReflectAttributeGetter):
(WebCore::jsTestInterfaceReflectAttribute):
(WebCore::setJSTestInterfaceReflectAttributeSetter):
(WebCore::setJSTestInterfaceReflectAttribute):
* bindings/scripts/test/TestSupplemental.idl:
* html/HTMLInputElement.idl:

LayoutTests:

Add layout test coverage.

* fast/forms/file/entries-api/drag-folder-webkitEntries-expected.txt: Added.
* fast/forms/file/entries-api/drag-folder-webkitEntries.html: Added.
* fast/forms/file/entries-api/webkitdirectory-drag-folder-webkitEntries-expected.txt: Added.
* fast/forms/file/entries-api/webkitdirectory-drag-folder-webkitEntries.html: Added.
* http/wpt/entries-api/interfaces-expected.txt:
* platform/wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/forms/file/entries-api/drag-folder-webkitEntries-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/file/entries-api/drag-folder-webkitEntries.html [new file with mode: 0644]
LayoutTests/fast/forms/file/entries-api/webkitdirectory-drag-folder-webkitEntries-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/file/entries-api/webkitdirectory-drag-folder-webkitEntries.html [new file with mode: 0644]
LayoutTests/http/wpt/entries-api/interfaces-expected.txt
LayoutTests/platform/wk2/TestExpectations
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/entriesapi/HTMLInputElementEntriesAPI.cpp [new file with mode: 0644]
Source/WebCore/Modules/entriesapi/HTMLInputElementEntriesAPI.h [new file with mode: 0644]
Source/WebCore/Modules/entriesapi/HTMLInputElementEntriesAPI.idl [new file with mode: 0644]
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/scripts/generate-bindings.pl
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
Source/WebCore/bindings/scripts/test/TestSupplemental.idl
Source/WebCore/html/HTMLInputElement.idl