summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/v8/custom/V8WebGLFloatArrayCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/v8/custom/V8WebGLFloatArrayCustom.cpp')
-rw-r--r--WebCore/bindings/v8/custom/V8WebGLFloatArrayCustom.cpp31
1 files changed, 3 insertions, 28 deletions
diff --git a/WebCore/bindings/v8/custom/V8WebGLFloatArrayCustom.cpp b/WebCore/bindings/v8/custom/V8WebGLFloatArrayCustom.cpp
index 6e56760..4d4b0e2 100644
--- a/WebCore/bindings/v8/custom/V8WebGLFloatArrayCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WebGLFloatArrayCustom.cpp
@@ -44,45 +44,20 @@
namespace WebCore {
-CALLBACK_FUNC_DECL(WebGLFloatArrayConstructor)
+v8::Handle<v8::Value> V8WebGLFloatArray::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLFloatArray.Contructor");
return constructWebGLArray<WebGLFloatArray>(args, V8ClassIndex::ToInt(V8ClassIndex::WEBGLFLOATARRAY));
}
-// Get the specified value from the array and return it wrapped as a JavaScript Number object to V8. Accesses outside the valid array range return "undefined".
-INDEXED_PROPERTY_GETTER(WebGLFloatArray)
-{
- INC_STATS("DOM.WebGLFloatArray.IndexedPropertyGetter");
- WebGLFloatArray* array = V8DOMWrapper::convertToNativeObject<WebGLFloatArray>(V8ClassIndex::WEBGLFLOATARRAY, info.Holder());
-
- if ((index < 0) || (index >= array->length()))
- return v8::Undefined();
- float result;
- if (!array->get(index, result))
- return v8::Undefined();
- return v8::Number::New(result);
-}
-
-// Set the specified value in the array. Accesses outside the valid array range are silently ignored.
-INDEXED_PROPERTY_SETTER(WebGLFloatArray)
-{
- INC_STATS("DOM.WebGLFloatArray.IndexedPropertySetter");
- WebGLFloatArray* array = V8DOMWrapper::convertToNativeObject<WebGLFloatArray>(V8ClassIndex::WEBGLFLOATARRAY, info.Holder());
-
- if ((index >= 0) && (index < array->length()))
- array->set(index, value->NumberValue());
- return value;
-}
-
-CALLBACK_FUNC_DECL(WebGLFloatArrayGet)
+v8::Handle<v8::Value> V8WebGLFloatArray::getCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLFloatArray.get()");
return getWebGLArrayElement<WebGLFloatArray, float>(args, V8ClassIndex::WEBGLFLOATARRAY);
}
-CALLBACK_FUNC_DECL(WebGLFloatArraySet)
+v8::Handle<v8::Value> V8WebGLFloatArray::setCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLFloatArray.set()");
return setWebGLArray<WebGLFloatArray, V8WebGLFloatArray>(args, V8ClassIndex::WEBGLFLOATARRAY);