Bug 93706

Summary: Support creating File object from FileSystem URL for files in FileSystem API
Product: WebKit Reporter: Kinuko Yasuda <kinuko>
Component: WebCore Misc.Assignee: Kinuko Yasuda <kinuko>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, danw, dglazkov, ericbidelman, fishd, gustavo, jamesr, mifenton, mrobinson, philn, rakuco, tkent+wkapi, webkit.review.bot, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
wip
none
Patch
none
Patch fishd: review+, fishd: commit-queue-

Description Kinuko Yasuda 2012-08-10 03:09:21 PDT
Support creating File object from FileSystem URL for files in FileSystem API.

Current File code assumes the existence of local file (i.e. needs a platform local file path to work appropriately) but for FileSystem files it may not be always the case.
Some implementation may want to use in-memory filesystem to realize sandboxed filesystem, or the filesystem may exist in a remote server so that there may not be the local platform file.

We should support File object creation not only from file path but from FileSystem URL, and should make File object keep the information, so that the platform-specific code can handle file requests more appropriately.
Comment 1 Kinuko Yasuda 2012-08-10 03:26:12 PDT
Created attachment 157698 [details]
wip
Comment 2 WebKit Review Bot 2012-08-10 03:29:31 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 3 Early Warning System Bot 2012-08-10 03:40:15 PDT
Comment on attachment 157698 [details]
wip

Attachment 157698 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/13459920
Comment 4 Early Warning System Bot 2012-08-10 03:48:21 PDT
Comment on attachment 157698 [details]
wip

Attachment 157698 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/13477157
Comment 5 Build Bot 2012-08-10 03:49:06 PDT
Comment on attachment 157698 [details]
wip

Attachment 157698 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/13470547
Comment 6 Gyuyoung Kim 2012-08-10 03:57:26 PDT
Comment on attachment 157698 [details]
wip

Attachment 157698 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/13463662
Comment 7 Kinuko Yasuda 2012-08-10 06:03:32 PDT
Created attachment 157722 [details]
Patch
Comment 8 Build Bot 2012-08-10 06:25:35 PDT
Comment on attachment 157722 [details]
Patch

Attachment 157722 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/13477196
Comment 9 Kinuko Yasuda 2012-08-10 06:31:51 PDT
Created attachment 157729 [details]
Patch
Comment 10 Darin Fisher (:fishd, Google) 2012-08-10 09:43:40 PDT
Comment on attachment 157729 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=157729&action=review

> Source/Platform/chromium/public/WebBlobData.h:53
> +        WebURL url; // For Blob or URL.

nit: "For TypeBlob or TypeURL." just to make it really clear.

> Source/Platform/chromium/public/WebHTTPBody.h:57
> +        WebURL url; // For Blob or URL type.

nit: "For TypeBlob or TypeURL." just to make it really clear.

> Source/WebCore/platform/chromium/support/WebHTTPBody.cpp:157
> +    ASSERT(KURL(blobURL).protocol() == "blob");

nit: use KURL's protocolIs method.
Comment 11 Kinuko Yasuda 2012-08-12 23:21:57 PDT
Committed r125391: <http://trac.webkit.org/changeset/125391>