[webkit-dev] Blob.slice support

Jian Li jianli at chromium.org
Thu Mar 18 16:48:24 PDT 2010

The Blob.slice API (http://www.w3.org/TR/FileAPI/) has been added, under the
guard of ENABLE(BLOB_SLICE) flag. Currently it is only turned on for WebKit
mac platform because the file range reading capability is only implemented
on the mac platform. I will hook up all necessary changes to make chromium
platform work and check them in soon.

For all other platforms, you will need to implement the file range reading
support and enable the flag, if you want to make use of Blob.slice feature.



On Fri, Feb 19, 2010 at 5:24 PM, Jian Li <jianli at chromium.org> wrote:

> Hi,
> I am working on Blob.slice support as defined in the File API (
> http://www.w3.org/TR/FileAPI/). To make it work, we need to get the
> network embedder layer to add the capability to send the file range. I plan
> to add the following fields to class FormDataElement:
>     long long m_fileStart;
>     long long m_fileLength;
>     time_t m_fileModificationTime;
> The individual platform needs to support the followings:
> 1) Checking if the underlying file has been changed by
> comparing m_fileModificationTime against the modification time when the file
> is opened for read. If different, throw an error. This is per the discussion
> of how we are going to deal with the underlying file change for Blob (
> http://lists.w3.org/Archives/Public/public-webapps/2010JanMar/0371.html).
> 2) Sending the file range denoted by m_fileStart and m_fileLength.
> In addition, I am going to add ENABLE_BLOB_SLICE flag to control if
> Blob.slice API should be exposed or not. When a platform implements the
> necessary support to read the file range, ENABLE_BLOB_SLICE flag can then
> been turned on.
> I will make chromium platform and WebKit on mac platform to support the
> above requirements in order to get Blob.slice work. Please let me know if
> you have any questions.
> Thanks,
> Jian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20100318/d634472b/attachment.html>

More information about the webkit-dev mailing list