Skip to content
  • jianli@chromium.org's avatar
    Implement DataView interface from Typed Array specification · 3cbb559a
    jianli@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=46541
    
    Reviewed by Kenneth Russell.
    
    WebCore:
    
    Test: fast/canvas/webgl/data-view-test.html
    
    * CMakeLists.txt:
    * DerivedSources.make:
    * GNUmakefile.am:
    * WebCore.gypi:
    * WebCore.pri:
    * WebCore.pro:
    * WebCore.xcodeproj/project.pbxproj:
    * bindings/generic/RuntimeEnabledFeatures.h:
    (WebCore::RuntimeEnabledFeatures::dataViewEnabled):
    * bindings/js/JSArrayBufferViewHelper.h:
    (WebCore::constructArrayBufferViewWithArrayBufferArgument):
    (WebCore::constructArrayBufferView):
    * bindings/js/JSDOMWindowCustom.cpp:
    (WebCore::JSDOMWindow::dataView):
    * bindings/js/JSDataViewCustom.cpp: Added.
    * bindings/js/JSFloat32ArrayCustom.cpp:
    (WebCore::JSFloat32ArrayConstructor::constructJSFloat32Array):
    * bindings/js/JSInt16ArrayCustom.cpp:
    (WebCore::JSInt16ArrayConstructor::constructJSInt16Array):
    * bindings/js/JSInt32ArrayCustom.cpp:
    (WebCore::JSInt32ArrayConstructor::constructJSInt32Array):
    * bindings/js/JSInt8ArrayCustom.cpp:
    (WebCore::JSInt8ArrayConstructor::constructJSInt8Array):
    * bindings/js/JSUint16ArrayCustom.cpp:
    (WebCore::JSUint16ArrayConstructor::constructJSUint16Array):
    * bindings/js/JSUint32ArrayCustom.cpp:
    (WebCore::JSUint32ArrayConstructor::constructJSUint32Array):
    * bindings/js/JSUint8ArrayCustom.cpp:
    (WebCore::JSUint8ArrayConstructor::constructJSUint8Array):
    * bindings/v8/custom/V8ArrayBufferViewCustom.h:
    (WebCore::constructWebGLArrayWithArrayBufferArgument):
    (WebCore::constructWebGLArray):
    * bindings/v8/custom/V8DataViewCustom.cpp: Added.
    * html/canvas/ArrayBufferView.h:
    (WebCore::ArrayBufferView::isDataView):
    * html/canvas/DataView.cpp: Added.
    * html/canvas/DataView.h: Added.
    * html/canvas/DataView.idl: Added.
    * page/DOMWindow.idl:
    
    LayoutTests:
    
    Add a new test for testing DataView interface. Also update some tests
    to exclude DataView property from being tested because it is not
    exposed to all platforms.
    
    * fast/canvas/webgl/data-view-test-expected.txt: Added.
    * fast/canvas/webgl/data-view-test.html: Added.
    * fast/dom/Window/script-tests/window-property-descriptors.js:
    * fast/dom/Window/window-properties.html:
    * fast/dom/script-tests/prototype-inheritance-2.js:
    (constructorNamesForWindow):
    * fast/dom/script-tests/prototype-inheritance.js:
    * fast/js/script-tests/global-constructors.js:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72718 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    3cbb559a