Implement DataView interface from Typed Array specification
authorjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Nov 2010 03:34:21 +0000 (03:34 +0000)
committerjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Nov 2010 03:34:21 +0000 (03:34 +0000)
commit8d465ee75df66cf9c7aeb1e890e092202ef3bd6a
treef41c98e90d789f62572720595fdaf42b6882c3cf
parent8bff0010972d3e239b3fc104be65b9b8d68dac52
Implement DataView interface from Typed Array specification
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: https://svn.webkit.org/repository/webkit/trunk@72718 268f45cc-cd09-0410-ab3c-d52691b4dbfc
34 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgl/data-view-test-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/webgl/data-view-test.html [new file with mode: 0755]
LayoutTests/fast/dom/Window/script-tests/window-property-descriptors.js
LayoutTests/fast/dom/Window/window-properties.html
LayoutTests/fast/dom/script-tests/prototype-inheritance-2.js
LayoutTests/fast/dom/script-tests/prototype-inheritance.js
LayoutTests/fast/js/script-tests/global-constructors.js
WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/GNUmakefile.am
WebCore/WebCore.gypi
WebCore/WebCore.pri
WebCore/WebCore.pro
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/generic/RuntimeEnabledFeatures.h
WebCore/bindings/js/JSArrayBufferViewHelper.h
WebCore/bindings/js/JSDOMWindowCustom.cpp
WebCore/bindings/js/JSDataViewCustom.cpp [new file with mode: 0644]
WebCore/bindings/js/JSFloat32ArrayCustom.cpp
WebCore/bindings/js/JSInt16ArrayCustom.cpp
WebCore/bindings/js/JSInt32ArrayCustom.cpp
WebCore/bindings/js/JSInt8ArrayCustom.cpp
WebCore/bindings/js/JSUint16ArrayCustom.cpp
WebCore/bindings/js/JSUint32ArrayCustom.cpp
WebCore/bindings/js/JSUint8ArrayCustom.cpp
WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.h
WebCore/bindings/v8/custom/V8DataViewCustom.cpp [new file with mode: 0755]
WebCore/html/canvas/ArrayBufferView.h
WebCore/html/canvas/DataView.cpp [new file with mode: 0755]
WebCore/html/canvas/DataView.h [new file with mode: 0755]
WebCore/html/canvas/DataView.idl [new file with mode: 0755]
WebCore/page/DOMWindow.idl