Skip to content
  • bashi@chromium.org's avatar
    [V8] Add Uint8ClampedArray support · 64b00e28
    bashi@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=76803
    
    Reviewed by Kenneth Russell.
    
    Source/JavaScriptCore:
    
    * wtf/ArrayBufferView.h:
    (WTF::ArrayBufferView::isUnsignedByteClampedArray): Added.
    * wtf/Uint8ClampedArray.h:
    (WTF::Uint8ClampedArray::isUnsignedByteClampedArray): Overridden to return true.
    
    Source/WebCore:
    
    No new tests. fast/js/script-tests/dfg-uint8clampedarray.js should pass on chromium port.
    
    * WebCore.gypi: Added required files.
    * bindings/scripts/CodeGeneratorV8.pm:
    (IsTypedArrayType): Added Uint8ClampedArray.
    * bindings/v8/SerializedScriptValue.cpp: Added the tag for Uint8ClampedArray.
    (WebCore::V8ObjectMap::Writer::writeArrayBufferView): Appends the tag when buffer is Uint8ClampedArray.
    (WebCore::V8ObjectMap::Reader::readArrayBufferView): Creates Uint8ClampedArray instance when the tag represents Uint8ClampedArray.
    * bindings/v8/custom/V8ArrayBufferViewCustomScript.js:
    * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp: Added.
    (WebCore::V8Uint8ClampedArray::constructorCallback):
    (WebCore::V8Uint8ClampedArray::setCallback):
    (WebCore::toV8):
    * page/Crypto.cpp: Added isUnsignedByteClampedArray() call to isIntegerArray().
    * page/DOMWindow.idl: Removed ifdefs.
    * workers/WorkerContext.idl: Added Uint8ArrayConstructor.
    
    LayoutTests:
    
    * platform/chromium/fast/canvas/webgl/array-unit-tests-expected.txt: Removed.
    * platform/chromium/test_expectations.txt: Removed fast/js/dfg-uint8clampedarray.html.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    64b00e28