FileSystemEntry API should ignore hidden files
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Sep 2017 22:53:59 +0000 (22:53 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Sep 2017 22:53:59 +0000 (22:53 +0000)
commit5b74f0685bf2f7e95fd8625d1940c7c06f9b3863
tree911875d78dc12f95b547b542d03a8e6bde9bdfda
parentd8189741f66044a192af3f36adbb234a0e2eef63
FileSystemEntry API should ignore hidden files
https://bugs.webkit.org/show_bug.cgi?id=176292
<rdar://problem/34257666>

Reviewed by Andreas Kling.

Source/WebCore:

FileSystemEntry API should ignore hidden files as the user likely does not mean
to expose those when drag'n dropping a folder.

Test: editing/pasteboard/enties-api/datatransfer-items-drop-hidden-file.html

* Modules/entriesapi/DOMFileSystem.cpp:
(WebCore::listDirectoryWithMetadata):
(WebCore::validatePathIsExpectedType):
(WebCore::fileType):
(WebCore::DOMFileSystem::getEntry):

LayoutTests:

Add layout test coverage.

* editing/pasteboard/enties-api/datatransfer-items-drop-getAsEntry-expected.txt:
* editing/pasteboard/enties-api/datatransfer-items-drop-getAsEntry.html:
* editing/pasteboard/enties-api/datatransfer-items-drop-hidden-file-expected.txt: Added.
* editing/pasteboard/enties-api/datatransfer-items-drop-hidden-file.html: Added.
* fast/forms/file/entries-api/resources/testFiles/.hidden.txt: Added.
* fast/forms/file/entries-api/resources/testFiles/.hidden/hidden.txt: Added.
* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/enties-api/datatransfer-items-drop-getAsEntry-expected.txt
LayoutTests/editing/pasteboard/enties-api/datatransfer-items-drop-getAsEntry.html
LayoutTests/editing/pasteboard/enties-api/datatransfer-items-drop-hidden-file-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/enties-api/datatransfer-items-drop-hidden-file.html [new file with mode: 0644]
LayoutTests/fast/forms/file/entries-api/resources/testFiles/.hidden.txt [new file with mode: 0644]
LayoutTests/fast/forms/file/entries-api/resources/testFiles/.hidden/hidden.txt [new file with mode: 0644]
LayoutTests/platform/win/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp