Skip to content
  • commit-queue@webkit.org's avatar
    FileAPI: Blob should support ArrayBufferView instead of ArrayBuffer for Constructor Parameters · 0f033c34
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=88294
    
    Patch by Li Yin <li.yin@intel.com> on 2012-06-07
    Reviewed by Jian Li.
    
    Source/WebCore:
    
    From Spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
    Currently we add the support for ArrayBufferView, while still keeping ArrayBuffer for
    backward compatibility. We will remove it in the near future.
    
    Test: fast/files/blob-constructor.html
    
    * bindings/js/JSBlobCustom.cpp:
    (WebCore::JSBlobConstructor::constructJSBlob):
    * bindings/v8/custom/V8BlobCustom.cpp:
    (WebCore::V8Blob::constructorCallback):
    * fileapi/WebKitBlobBuilder.cpp:
    (WebCore::WebKitBlobBuilder::append):
    (WebCore):
    * fileapi/WebKitBlobBuilder.h:
    (WebCore):
    (WebKitBlobBuilder):
    * fileapi/WebKitBlobBuilder.idl: Add support for ArrayBufferView in append method
    
    LayoutTests:
    
    Support ArrayBufferView in Blob constructing function.
    
    * fast/files/blob-constructor-expected.txt:
    * fast/files/file-reader-fffd-expected.txt:
    * fast/files/file-reader-fffd.html:
    * fast/files/script-tests/blob-constructor.js:
    * http/tests/websocket/tests/hybi/bufferedAmount-after-close-in-busy.html:
    * http/tests/websocket/tests/hybi/bufferedAmount-after-close.html:
    * http/tests/websocket/tests/hybi/send-blob.html:
    * http/tests/websocket/tests/hybi/workers/resources/send-blob.js:
    (createBlobContainingAllDistinctBytes):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    0f033c34