[webkit-dev] Adding File/DirectoryEntry access support for drag-and-drop (if ENABLE(FILE_SYSTEM))
Kinuko Yasuda
kinuko at chromium.org
Tue Jun 5 23:47:44 PDT 2012
Hi WebKit-dev folks,
Last year I proposed [1] adding support to access dropped/selected
files/directories
via {File,Directory}Entry defined in FileSystem API [2] for better
directory drag-
and-drop support. The proposal got positive feedbacks in general and
I would like to land the changes that expose the feature to experiment this.
[1] Proposal thread on whatwg:
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-November/033814.html
[2] File API: Directories and System http://www.w3.org/TR/file-system-api/
To be more specific, I am adding following two APIs:
1) DataTransferItem.getAsEntry() (.webkitGetAsEntry()) for giving access
to Entry's for dropped files/directories via native HTML5 DnD, and
2) HTMLInputElement.entries (.webkitEntries) for <input type=file> tag.
They are enabled if and only if FILE_SYSTEM flag is enabled.
Most changes are / will be placed under WebCore/Modules/filesystem
or in platform-specific code, though some changes (< 100 lines) need to be
made in the common code.
Umbrella bug: https://bugs.webkit.org/show_bug.cgi?id=76809
Any comments are welcome.
For some more context:
Currently WebKit supports directory drag-and-drop via <input> using
'webkitdirectory' experimental attribute (iff DIRECTORY_UPLOAD is
enabled),
but it requires a full recursive directory traversal in advance to find
all the
subdirs/files, which could slow down responsiveness and could cause
bad user experience.
We (and some of people who supported the idea on whatwg) think
DirectoryEntry's asynchronous API has a big advantage in such situation
and would like to experiment it.
Thanks,
Kinuko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120606/564dff36/attachment.html>
More information about the webkit-dev
mailing list