Implement FileSystemDirectoryEntry.getDirectory()
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Sep 2017 21:31:49 +0000 (21:31 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Sep 2017 21:31:49 +0000 (21:31 +0000)
commitbf8fb11e7ec4408685769e27a6e8f95483c7c2cb
tree83ae35739e119971a9cc7b3e4910320c5c3bc0cf
parent002e08fe25895ddd08397c566efc0ec8a8bd6d6b
Implement FileSystemDirectoryEntry.getDirectory()
https://bugs.webkit.org/show_bug.cgi?id=176168
<rdar://problem/34187787>

Reviewed by Darin Adler.

Source/WebCore:

Implement FileSystemDirectoryEntry.getDirectory() as per:
- https://wicg.github.io/entries-api/#dom-filesystemdirectoryentry-getdirectory

Test: editing/pasteboard/datatransfer-items-drop-getDirectory.html

* Modules/entriesapi/DOMFileSystem.cpp:
(WebCore::isValidVirtualPath):
(WebCore::resolveRelativeVirtualPath):
(WebCore::DOMFileSystem::getEntry):
* Modules/entriesapi/DOMFileSystem.h:
* Modules/entriesapi/FileSystemDirectoryEntry.cpp:
(WebCore::FileSystemDirectoryEntry::getEntry):
(WebCore::FileSystemDirectoryEntry::getFile):
(WebCore::FileSystemDirectoryEntry::getDirectory):
* Modules/entriesapi/FileSystemDirectoryEntry.h:

LayoutTests:

Add layout test coverage.

* editing/pasteboard/datatransfer-items-drop-getDirectory-expected.txt: Added.
* editing/pasteboard/datatransfer-items-drop-getDirectory.html: Added.
* platform/wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@221540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/datatransfer-items-drop-getDirectory-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/datatransfer-items-drop-getDirectory.html [new file with mode: 0644]
LayoutTests/platform/wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp
Source/WebCore/Modules/entriesapi/DOMFileSystem.h
Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.cpp
Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.h