+2010-01-07 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Generate V8 bindings header declarations for named and indexed accessors.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
+ * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+ * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
+ * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
+ * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
+ * bindings/v8/custom/V8NodeListCustom.cpp:
+ * bindings/v8/custom/V8StorageCustom.cpp:
+ * bindings/v8/custom/V8StyleSheetListCustom.cpp:
+ * bindings/v8/custom/V8WebGLByteArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLFloatArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLIntArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLShortArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLUnsignedByteArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLUnsignedIntArrayCustom.cpp:
+ * bindings/v8/custom/V8WebGLUnsignedShortArrayCustom.cpp:
+
2010-01-07 Geoffrey Garen <ggaren@apple.com>
Better build fix: use 'this->structure()', since 'structure' is a
my $name = $function->signature->name;
my $attrExt = $function->signature->extendedAttributes;
+ # FIXME: We should only be generating callback declarations for functions labeled [Custom] or [V8Custom],
+ # but we can't do that due to some mislabeled functions in the idl's (https://bugs.webkit.org/show_bug.cgi?id=33066).
push(@headerContent, <<END);
static v8::Handle<v8::Value> ${name}Callback(const v8::Arguments&);
END
}
GenerateHeaderRuntimeEnablerDeclarations(@enabledAtRuntime);
+ GenerateHeaderNamedAndIndexedPropertyAccessors($dataNode);
GenerateHeaderCustomCall($dataNode);
if ($dataNode->extendedAttributes->{"CheckDomainSecurity"}) {
}
}
+my %indexerSpecialCases = (
+ "Storage" => 1,
+ "HTMLAppletElement" => 1,
+ "HTMLEmbedElement" => 1,
+ "HTMLObjectElement" => 1
+);
+
+sub GenerateHeaderNamedAndIndexedPropertyAccessors
+{
+ my $dataNode = shift;
+ my $interfaceName = $dataNode->name;
+ my $hasCustomIndexedGetter = $dataNode->extendedAttributes->{"HasIndexGetter"} || $dataNode->extendedAttributes->{"CustomGetOwnPropertySlot"};
+ my $hasCustomIndexedSetter = $dataNode->extendedAttributes->{"HasCustomIndexSetter"} && !$dataNode->extendedAttributes->{"HasNumericIndexGetter"};
+ my $hasCustomNamedGetter = $dataNode->extendedAttributes->{"HasNameGetter"} || $dataNode->extendedAttributes->{"HasOverridingNameGetter"} || $dataNode->extendedAttributes->{"CustomGetOwnPropertySlot"};
+ my $hasCustomNamedSetter = $dataNode->extendedAttributes->{"DelegatingPutFunction"};
+ my $hasCustomDeleters = $dataNode->extendedAttributes->{"CustomDeleteProperty"};
+ my $hasCustomEnumerator = $dataNode->extendedAttributes->{"CustomGetPropertyNames"};
+ if ($interfaceName eq "HTMLOptionsCollection") {
+ $interfaceName = "HTMLCollection";
+ $hasCustomIndexedGetter = 1;
+ $hasCustomNamedGetter = 1;
+ }
+ if ($interfaceName eq "DOMWindow") {
+ $hasCustomDeleterr = 0;
+ $hasEnumerator = 0;
+ }
+ if ($interfaceName eq "HTMLSelectElement") {
+ $hasCustomNamedGetter = 1;
+ }
+ my $isIndexerSpecialCase = exists $indexerSpecialCases{$interfaceName};
+
+ if ($hasCustomIndexedGetter || $isIndexerSpecialCase) {
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Value> indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info);
+END
+ }
+
+ if ($isIndexerSpecialCase || $hasCustomIndexedSetter) {
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Value> indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
+END
+ }
+ if ($hasCustomDeleters) {
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Boolean> indexedPropertyDeleter(uint32_t index, const v8::AccessorInfo& info);
+END
+ }
+ if ($hasCustomNamedGetter) {
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Value> namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info);
+END
+ }
+ if ($hasCustomNamedSetter) {
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Value> namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
+END
+ }
+ if ($hasCustomDeleters || $interfaceName eq "HTMLDocument") {
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Boolean> namedPropertyDeleter(v8::Local<v8::String> name, const v8::AccessorInfo& info);
+END
+ }
+ if ($hasCustomEnumerator) {
+ push(@headerContent, <<END);
+ static v8::Handle<v8::Array> namedPropertyEnumerator(const v8::AccessorInfo& info);
+END
+ }
+}
+
sub GenerateHeaderCustomCall
{
my $dataNode = shift;
END
}
-my %indexerSpecialCases = (
- "Storage" => 1,
- "HTMLAppletElement" => 1,
- "HTMLEmbedElement" => 1,
- "HTMLObjectElement" => 1
-);
-
sub GenerateImplementationIndexer
{
my $dataNode = shift;
$hasDeleter = 0;
}
- push(@implContent, " desc->${setOn}Template()->SetIndexedPropertyHandler(V8Custom::v8${interfaceName}IndexedPropertyGetter");
- push(@implContent, $hasCustomSetter ? ", V8Custom::v8${interfaceName}IndexedPropertySetter" : ", 0");
+ push(@implContent, " desc->${setOn}Template()->SetIndexedPropertyHandler(V8${interfaceName}::indexedPropertyGetter");
+ push(@implContent, $hasCustomSetter ? ", V8${interfaceName}::indexedPropertySetter" : ", 0");
push(@implContent, ", 0"); # IndexedPropertyQuery -- not being used at the moment.
- push(@implContent, $hasDeleter ? ", V8Custom::v8${interfaceName}IndexedPropertyDeleter" : ", 0");
+ push(@implContent, $hasDeleter ? ", V8${interfaceName}::indexedPropertyDeleter" : ", 0");
push(@implContent, ", nodeCollectionIndexedPropertyEnumerator<${interfaceName}>, v8::Integer::New(V8ClassIndex::NODE)") if $hasEnumerator;
push(@implContent, ");\n");
}
$hasEnumerator = 0;
}
- push(@implContent, " desc->${setOn}Template()->SetNamedPropertyHandler(V8Custom::v8${interfaceName}NamedPropertyGetter, ");
- push(@implContent, $hasSetter ? "V8Custom::v8${interfaceName}NamedPropertySetter, " : "0, ");
+ push(@implContent, " desc->${setOn}Template()->SetNamedPropertyHandler(V8${interfaceName}::namedPropertyGetter, ");
+ push(@implContent, $hasSetter ? "V8${interfaceName}::namedPropertySetter, " : "0, ");
push(@implContent, "0 ,"); # NamedPropertyQuery -- not being used at the moment.
- push(@implContent, $hasDeleter ? "V8Custom::v8${interfaceName}NamedPropertyDeleter, " : "0, ");
- push(@implContent, $hasEnumerator ? "V8Custom::v8${interfaceName}NamedPropertyEnumerator" : "0");
+ push(@implContent, $hasDeleter ? "V8${interfaceName}::namedPropertyDeleter, " : "0, ");
+ push(@implContent, $hasEnumerator ? "V8${interfaceName}::namedPropertyEnumerator" : "0");
push(@implContent, ");\n");
}
*/
#include "config.h"
-#include "CSSStyleDeclaration.h"
+#include "V8CSSStyleDeclaration.h"
#include "CSSParser.h"
+#include "CSSStyleDeclaration.h"
#include "CSSValue.h"
#include "CSSPrimitiveValue.h"
#include "EventTarget.h"
return propInfo;
}
-NAMED_PROPERTY_GETTER(CSSStyleDeclaration)
+v8::Handle<v8::Value> V8CSSStyleDeclaration::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.CSSStyleDeclaration.NamedPropertyGetter");
// First look for API defined attributes on the style declaration object.
return v8String(result);
}
-NAMED_PROPERTY_SETTER(CSSStyleDeclaration)
+v8::Handle<v8::Value> V8CSSStyleDeclaration::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.CSSStyleDeclaration.NamedPropertySetter");
CSSStyleDeclaration* imp =
#include "V8Index.h"
#include <v8.h>
-#define INDEXED_PROPERTY_GETTER(NAME) \
- v8::Handle<v8::Value> V8Custom::v8##NAME##IndexedPropertyGetter( \
- uint32_t index, const v8::AccessorInfo& info)
-
-#define INDEXED_PROPERTY_SETTER(NAME) \
- v8::Handle<v8::Value> V8Custom::v8##NAME##IndexedPropertySetter( \
- uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
-
-#define INDEXED_PROPERTY_DELETER(NAME) \
- v8::Handle<v8::Boolean> V8Custom::v8##NAME##IndexedPropertyDeleter( \
- uint32_t index, const v8::AccessorInfo& info)
-
-#define NAMED_PROPERTY_GETTER(NAME) \
- v8::Handle<v8::Value> V8Custom::v8##NAME##NamedPropertyGetter( \
- v8::Local<v8::String> name, const v8::AccessorInfo& info)
-
-#define NAMED_PROPERTY_SETTER(NAME) \
- v8::Handle<v8::Value> V8Custom::v8##NAME##NamedPropertySetter( \
- v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
-
-#define NAMED_PROPERTY_DELETER(NAME) \
- v8::Handle<v8::Boolean> V8Custom::v8##NAME##NamedPropertyDeleter( \
- v8::Local<v8::String> name, const v8::AccessorInfo& info)
-
namespace WebCore {
class V8Custom {
public:
static const int kWebSocketInternalFieldCount = kDefaultWrapperInternalFieldCount + 1;
#endif
-#define DECLARE_NAMED_PROPERTY_GETTER(NAME) \
- static v8::Handle<v8::Value> v8##NAME##NamedPropertyGetter( \
- v8::Local<v8::String> name, const v8::AccessorInfo& info)
-
-#define DECLARE_NAMED_PROPERTY_SETTER(NAME) \
- static v8::Handle<v8::Value> v8##NAME##NamedPropertySetter( \
- v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
-
-#define DECLARE_NAMED_PROPERTY_DELETER(NAME) \
- static v8::Handle<v8::Boolean> v8##NAME##NamedPropertyDeleter( \
- v8::Local<v8::String> name, const v8::AccessorInfo& info)
-
-#define USE_NAMED_PROPERTY_GETTER(NAME) V8Custom::v8##NAME##NamedPropertyGetter
-
-#define USE_NAMED_PROPERTY_SETTER(NAME) V8Custom::v8##NAME##NamedPropertySetter
-
-#define USE_NAMED_PROPERTY_DELETER(NAME) V8Custom::v8##NAME##NamedPropertyDeleter
-
-#define DECLARE_INDEXED_PROPERTY_GETTER(NAME) \
- static v8::Handle<v8::Value> v8##NAME##IndexedPropertyGetter( \
- uint32_t index, const v8::AccessorInfo& info)
-
-#define DECLARE_INDEXED_PROPERTY_SETTER(NAME) \
- static v8::Handle<v8::Value> v8##NAME##IndexedPropertySetter( \
- uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
-
-#define DECLARE_INDEXED_PROPERTY_DELETER(NAME) \
- static v8::Handle<v8::Boolean> v8##NAME##IndexedPropertyDeleter( \
- uint32_t index, const v8::AccessorInfo& info)
-
-#define USE_INDEXED_PROPERTY_GETTER(NAME) V8Custom::v8##NAME##IndexedPropertyGetter
-
-#define USE_INDEXED_PROPERTY_SETTER(NAME) V8Custom::v8##NAME##IndexedPropertySetter
-
-#define USE_INDEXED_PROPERTY_DELETER(NAME) V8Custom::v8##NAME##IndexedPropertyDeleter
-
#define DECLARE_CALLBACK(NAME) static v8::Handle<v8::Value> v8##NAME##Callback(const v8::Arguments& args)
-
#define USE_CALLBACK(NAME) V8Custom::v8##NAME##Callback
- DECLARE_NAMED_PROPERTY_GETTER(HTMLDocument);
- DECLARE_NAMED_PROPERTY_DELETER(HTMLDocument);
-
DECLARE_CALLBACK(DOMParserConstructor);
DECLARE_CALLBACK(HTMLAudioElementConstructor);
DECLARE_CALLBACK(HTMLImageElementConstructor);
DECLARE_CALLBACK(WebGLUnsignedShortArrayConstructor);
#endif
- DECLARE_NAMED_PROPERTY_GETTER(DOMWindow);
- DECLARE_INDEXED_PROPERTY_GETTER(DOMWindow);
-
- DECLARE_NAMED_PROPERTY_GETTER(HTMLFrameSetElement);
- DECLARE_NAMED_PROPERTY_GETTER(HTMLFormElement);
- DECLARE_NAMED_PROPERTY_GETTER(NodeList);
- DECLARE_NAMED_PROPERTY_GETTER(NamedNodeMap);
- DECLARE_NAMED_PROPERTY_GETTER(CSSStyleDeclaration);
- DECLARE_NAMED_PROPERTY_SETTER(CSSStyleDeclaration);
- DECLARE_NAMED_PROPERTY_GETTER(HTMLAppletElement);
- DECLARE_NAMED_PROPERTY_SETTER(HTMLAppletElement);
- DECLARE_NAMED_PROPERTY_GETTER(HTMLEmbedElement);
- DECLARE_NAMED_PROPERTY_SETTER(HTMLEmbedElement);
- DECLARE_NAMED_PROPERTY_GETTER(HTMLObjectElement);
- DECLARE_NAMED_PROPERTY_SETTER(HTMLObjectElement);
- DECLARE_INDEXED_PROPERTY_GETTER(HTMLAppletElement);
- DECLARE_INDEXED_PROPERTY_SETTER(HTMLAppletElement);
- DECLARE_INDEXED_PROPERTY_GETTER(HTMLEmbedElement);
- DECLARE_INDEXED_PROPERTY_SETTER(HTMLEmbedElement);
- DECLARE_INDEXED_PROPERTY_GETTER(HTMLObjectElement);
- DECLARE_INDEXED_PROPERTY_SETTER(HTMLObjectElement);
-
- DECLARE_NAMED_PROPERTY_GETTER(StyleSheetList);
- DECLARE_INDEXED_PROPERTY_GETTER(NamedNodeMap);
- DECLARE_INDEXED_PROPERTY_GETTER(HTMLFormElement);
- DECLARE_INDEXED_PROPERTY_GETTER(HTMLOptionsCollection);
- DECLARE_INDEXED_PROPERTY_SETTER(HTMLOptionsCollection);
- DECLARE_NAMED_PROPERTY_GETTER(HTMLSelectElement);
- DECLARE_INDEXED_PROPERTY_GETTER(HTMLSelectElement);
- DECLARE_INDEXED_PROPERTY_SETTER(HTMLSelectElement);
- DECLARE_NAMED_PROPERTY_GETTER(HTMLAllCollection);
- DECLARE_NAMED_PROPERTY_GETTER(HTMLCollection);
-
-#if ENABLE(3D_CANVAS)
- DECLARE_INDEXED_PROPERTY_GETTER(WebGLByteArray);
- DECLARE_INDEXED_PROPERTY_SETTER(WebGLByteArray);
-
- DECLARE_INDEXED_PROPERTY_GETTER(WebGLFloatArray);
- DECLARE_INDEXED_PROPERTY_SETTER(WebGLFloatArray);
-
- DECLARE_INDEXED_PROPERTY_GETTER(WebGLIntArray);
- DECLARE_INDEXED_PROPERTY_SETTER(WebGLIntArray);
-
- DECLARE_INDEXED_PROPERTY_GETTER(WebGLShortArray);
- DECLARE_INDEXED_PROPERTY_SETTER(WebGLShortArray);
-
- DECLARE_INDEXED_PROPERTY_GETTER(WebGLUnsignedByteArray);
- DECLARE_INDEXED_PROPERTY_SETTER(WebGLUnsignedByteArray);
-
- DECLARE_INDEXED_PROPERTY_GETTER(WebGLUnsignedIntArray);
- DECLARE_INDEXED_PROPERTY_SETTER(WebGLUnsignedIntArray);
-
- DECLARE_INDEXED_PROPERTY_GETTER(WebGLUnsignedShortArray);
- DECLARE_INDEXED_PROPERTY_SETTER(WebGLUnsignedShortArray);
-#endif
-
-#if ENABLE(DATAGRID)
- DECLARE_NAMED_PROPERTY_GETTER(DataGridColumnList);
-#endif
-
-#if ENABLE(DOM_STORAGE)
- DECLARE_INDEXED_PROPERTY_GETTER(Storage);
- DECLARE_INDEXED_PROPERTY_SETTER(Storage);
- DECLARE_INDEXED_PROPERTY_DELETER(Storage);
- DECLARE_NAMED_PROPERTY_GETTER(Storage);
- DECLARE_NAMED_PROPERTY_SETTER(Storage);
- DECLARE_NAMED_PROPERTY_DELETER(Storage);
- static v8::Handle<v8::Array> v8StorageNamedPropertyEnumerator(const v8::AccessorInfo& info);
-#endif
-
#if ENABLE(WORKERS)
DECLARE_CALLBACK(WorkerConstructor);
#endif
DECLARE_CALLBACK(WebSocketConstructor);
#endif
-#undef DECLARE_NAMED_PROPERTY_GETTER
-#undef DECLARE_NAMED_PROPERTY_SETTER
-#undef DECLARE_NAMED_PROPERTY_DELETER
-
-#undef DECLARE_INDEXED_PROPERTY_GETTER
-#undef DECLARE_INDEXED_PROPERTY_SETTER
-#undef DECLARE_INDEXED_PROPERTY_DELETER
-
#undef DECLARE_CALLBACK
};
}
-INDEXED_PROPERTY_GETTER(DOMWindow)
+v8::Handle<v8::Value> V8DOMWindow::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
{
INC_STATS("DOM.DOMWindow.IndexedPropertyGetter");
}
-NAMED_PROPERTY_GETTER(DOMWindow)
+v8::Handle<v8::Value> V8DOMWindow::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.DOMWindow.NamedPropertyGetter");
return V8DOMWrapper::convertNodeToV8Object(result.release());
}
-NAMED_PROPERTY_GETTER(HTMLAllCollection)
+v8::Handle<v8::Value> V8HTMLAllCollection::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLAllCollection.NamedPropertyGetter");
// Search the prototype chain first.
return V8DOMWrapper::convertNodeToV8Object(result.release());
}
-NAMED_PROPERTY_GETTER(HTMLCollection)
+v8::Handle<v8::Value> V8HTMLCollection::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLCollection.NamedPropertyGetter");
// Search the prototype chain first.
namespace WebCore {
-NAMED_PROPERTY_DELETER(HTMLDocument)
+v8::Handle<v8::Boolean> V8HTMLDocument::namedPropertyDeleter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
// Only handle document.all. Insert the marker object into the
// shadow internal field to signal that document.all is no longer
if (key != all)
return deletionNotHandledByInterceptor();
- ASSERT(info.Holder()->InternalFieldCount() == kHTMLDocumentInternalFieldCount);
- v8::Local<v8::Value> marker = info.Holder()->GetInternalField(kHTMLDocumentMarkerIndex);
- info.Holder()->SetInternalField(kHTMLDocumentShadowIndex, marker);
+ ASSERT(info.Holder()->InternalFieldCount() == V8Custom::kHTMLDocumentInternalFieldCount);
+ v8::Local<v8::Value> marker = info.Holder()->GetInternalField(V8Custom::kHTMLDocumentMarkerIndex);
+ info.Holder()->SetInternalField(V8Custom::kHTMLDocumentShadowIndex, marker);
return v8::True();
}
-NAMED_PROPERTY_GETTER(HTMLDocument)
+v8::Handle<v8::Value> V8HTMLDocument::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLDocument.NamedPropertyGetter");
AtomicString key = v8StringToAtomicWebCoreString(name);
// been temporarily shadowed and we return the value.
DEFINE_STATIC_LOCAL(const AtomicString, all, ("all"));
if (key == all) {
- ASSERT(info.Holder()->InternalFieldCount() == kHTMLDocumentInternalFieldCount);
- v8::Local<v8::Value> marker = info.Holder()->GetInternalField(kHTMLDocumentMarkerIndex);
- v8::Local<v8::Value> value = info.Holder()->GetInternalField(kHTMLDocumentShadowIndex);
+ ASSERT(info.Holder()->InternalFieldCount() == V8Custom::kHTMLDocumentInternalFieldCount);
+ v8::Local<v8::Value> marker = info.Holder()->GetInternalField(V8Custom::kHTMLDocumentMarkerIndex);
+ v8::Local<v8::Value> value = info.Holder()->GetInternalField(V8Custom::kHTMLDocumentShadowIndex);
if (marker != value)
return value;
}
namespace WebCore {
-INDEXED_PROPERTY_GETTER(HTMLFormElement)
+v8::Handle<v8::Value> V8HTMLFormElement::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLFormElement.IndexedPropertyGetter");
HTMLFormElement* form = V8DOMWrapper::convertDOMWrapperToNode<HTMLFormElement>(info.Holder());
return V8DOMWrapper::convertNodeToV8Object(formElement.release());
}
-
-NAMED_PROPERTY_GETTER(HTMLFormElement)
+v8::Handle<v8::Value> V8HTMLFormElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLFormElement.NamedPropertyGetter");
HTMLFormElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLFormElement>(info.Holder());
*/
#include "config.h"
-#include "HTMLFrameSetElement.h"
+#include "V8HTMLFrameSetElement.h"
#include "Document.h"
#include "Frame.h"
#include "HTMLCollection.h"
#include "HTMLFrameElement.h"
+#include "HTMLFrameSetElement.h"
#include "HTMLNames.h"
#include "Node.h"
namespace WebCore {
-NAMED_PROPERTY_GETTER(HTMLFrameSetElement)
+v8::Handle<v8::Value> V8HTMLFrameSetElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLFrameSetElement.NamedPropertyGetter");
HTMLFrameSetElement* imp = V8DOMWrapper::convertDOMWrapperToNode<HTMLFrameSetElement>(info.Holder());
V8Proxy::setDOMException(ec);
}
-INDEXED_PROPERTY_GETTER(HTMLOptionsCollection)
+v8::Handle<v8::Value> V8HTMLOptionsCollection::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLOptionsCollection.IndexedPropertyGetter");
HTMLOptionsCollection* collection = V8DOMWrapper::convertToNativeObject<HTMLOptionsCollection>(V8ClassIndex::HTMLOPTIONSCOLLECTION, info.Holder());
return V8DOMWrapper::convertNodeToV8Object(result.release());
}
-INDEXED_PROPERTY_SETTER(HTMLOptionsCollection)
+v8::Handle<v8::Value> V8HTMLOptionsCollection::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLOptionsCollection.IndexedPropertySetter");
HTMLOptionsCollection* collection = V8DOMWrapper::convertToNativeObject<HTMLOptionsCollection>(V8ClassIndex::HTMLOPTIONSCOLLECTION, info.Holder());
return npObjectSetNamedProperty(instance, name, value);
}
-NAMED_PROPERTY_GETTER(HTMLAppletElement)
+v8::Handle<v8::Value> V8HTMLAppletElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLAppletElement.NamedPropertyGetter");
return npObjectNamedGetter(name, info);
}
-NAMED_PROPERTY_GETTER(HTMLEmbedElement)
+v8::Handle<v8::Value> V8HTMLEmbedElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLEmbedElement.NamedPropertyGetter");
return npObjectNamedGetter(name, info);
}
-NAMED_PROPERTY_GETTER(HTMLObjectElement)
+v8::Handle<v8::Value> V8HTMLObjectElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLObjectElement.NamedPropertyGetter");
return npObjectNamedGetter(name, info);
}
-NAMED_PROPERTY_SETTER(HTMLAppletElement)
+v8::Handle<v8::Value> V8HTMLAppletElement::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLAppletElement.NamedPropertySetter");
return npObjectNamedSetter(name, value, info);
}
-NAMED_PROPERTY_SETTER(HTMLEmbedElement)
+v8::Handle<v8::Value> V8HTMLEmbedElement::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLEmbedElement.NamedPropertySetter");
return npObjectNamedSetter(name, value, info);
}
-NAMED_PROPERTY_SETTER(HTMLObjectElement)
+v8::Handle<v8::Value> V8HTMLObjectElement::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLObjectElement.NamedPropertySetter");
return npObjectNamedSetter(name, value, info);
return npObjectSetIndexedProperty(instance, index, value);
}
-INDEXED_PROPERTY_GETTER(HTMLAppletElement)
+v8::Handle<v8::Value> V8HTMLAppletElement::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLAppletElement.IndexedPropertyGetter");
return npObjectIndexedGetter(index, info);
}
-INDEXED_PROPERTY_GETTER(HTMLEmbedElement)
+v8::Handle<v8::Value> V8HTMLEmbedElement::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLEmbedElement.IndexedPropertyGetter");
return npObjectIndexedGetter(index, info);
}
-INDEXED_PROPERTY_GETTER(HTMLObjectElement)
+v8::Handle<v8::Value> V8HTMLObjectElement::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLObjectElement.IndexedPropertyGetter");
return npObjectIndexedGetter(index, info);
}
-INDEXED_PROPERTY_SETTER(HTMLAppletElement)
+v8::Handle<v8::Value> V8HTMLAppletElement::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLAppletElement.IndexedPropertySetter");
return npObjectIndexedSetter(index, value, info);
}
-INDEXED_PROPERTY_SETTER(HTMLEmbedElement)
+v8::Handle<v8::Value> V8HTMLEmbedElement::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLEmbedElement.IndexedPropertySetter");
return npObjectIndexedSetter(index, value, info);
}
-INDEXED_PROPERTY_SETTER(HTMLObjectElement)
+v8::Handle<v8::Value> V8HTMLObjectElement::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLObjectElement.IndexedPropertySetter");
return npObjectIndexedSetter(index, value, info);
namespace WebCore {
-NAMED_PROPERTY_GETTER(HTMLSelectElement)
+v8::Handle<v8::Value> V8HTMLSelectElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
- INC_STATS("DOM.HTMLSelectElement.NamedPropertySetter");
+ INC_STATS("DOM.HTMLSelectElement.NamedPropertyGetter");
HTMLSelectElement* select = V8DOMWrapper::convertDOMWrapperToNode<HTMLSelectElement>(info.Holder());
v8::Handle<v8::Value> value = info.Holder()->GetRealNamedPropertyInPrototypeChain(name);
return V8DOMWrapper::convertToV8Object(V8ClassIndex::NODELIST, list);
}
-INDEXED_PROPERTY_GETTER(HTMLSelectElement)
+v8::Handle<v8::Value> V8HTMLSelectElement::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
{
ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
ASSERT(V8DOMWrapper::domWrapperType(info.Holder()) == V8ClassIndex::NODE);
return V8DOMWrapper::convertNodeToV8Object(result.release());
}
-INDEXED_PROPERTY_SETTER(HTMLSelectElement)
+v8::Handle<v8::Value> V8HTMLSelectElement::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLSelectElement.IndexedPropertySetter");
HTMLSelectElement* select = V8DOMWrapper::convertDOMWrapperToNode<HTMLSelectElement>(info.Holder());
*/
#include "config.h"
-#include "NamedNodeMap.h"
+#include "V8NamedNodeMap.h"
+#include "NamedNodeMap.h"
#include "V8Binding.h"
#include "V8CustomBinding.h"
#include "V8Proxy.h"
namespace WebCore {
-INDEXED_PROPERTY_GETTER(NamedNodeMap)
+v8::Handle<v8::Value> V8NamedNodeMap::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
{
INC_STATS("DOM.NamedNodeMap.IndexedPropertyGetter");
NamedNodeMap* imp = V8DOMWrapper::convertToNativeObject<NamedNodeMap>(V8ClassIndex::NAMEDNODEMAP, info.Holder());
return V8DOMWrapper::convertNodeToV8Object(result.release());
}
-NAMED_PROPERTY_GETTER(NamedNodeMap)
+v8::Handle<v8::Value> V8NamedNodeMap::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.NamedNodeMap.NamedPropertyGetter");
// Search the prototype chain first.
namespace WebCore {
-NAMED_PROPERTY_GETTER(NodeList)
+v8::Handle<v8::Value> V8NodeList::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.NodeList.NamedPropertyGetter");
NodeList* list = V8DOMWrapper::convertToNativeObject<NodeList>(V8ClassIndex::NODELIST, info.Holder());
#include "config.h"
#if ENABLE(DOM_STORAGE)
+#include "V8Storage.h"
#include "Storage.h"
#include "V8Binding.h"
namespace WebCore {
// Get an array containing the names of indexed properties in a collection.
-v8::Handle<v8::Array> V8Custom::v8StorageNamedPropertyEnumerator(const v8::AccessorInfo& info)
+v8::Handle<v8::Array> V8Storage::namedPropertyEnumerator(const v8::AccessorInfo& info)
{
Storage* storage = V8DOMWrapper::convertToNativeObject<Storage>(V8ClassIndex::STORAGE, info.Holder());
unsigned int length = storage->length();
return notHandledByInterceptor();
}
-INDEXED_PROPERTY_GETTER(Storage)
+v8::Handle<v8::Value> V8Storage::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Storage.IndexedPropertyGetter");
v8::Local<v8::Integer> indexV8 = v8::Integer::New(index);
return storageGetter(indexV8->ToString(), info);
}
-NAMED_PROPERTY_GETTER(Storage)
+v8::Handle<v8::Value> V8Storage::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Storage.NamedPropertyGetter");
return storageGetter(name, info);
return v8Value;
}
-INDEXED_PROPERTY_SETTER(Storage)
+v8::Handle<v8::Value> V8Storage::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Storage.NamedPropertyGetter");
v8::Local<v8::Integer> indexV8 = v8::Integer::New(index);
return storageSetter(indexV8->ToString(), value, info);
}
-NAMED_PROPERTY_SETTER(Storage)
+v8::Handle<v8::Value> V8Storage::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Storage.NamedPropertySetter");
return storageSetter(name, value, info);
return deletionNotHandledByInterceptor();
}
-INDEXED_PROPERTY_DELETER(Storage)
+v8::Handle<v8::Boolean> V8Storage::indexedPropertyDeleter(uint32_t index, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Storage.IndexedPropertyDeleter");
v8::Local<v8::Integer> indexV8 = v8::Integer::New(index);
return storageDeleter(indexV8->ToString(), info);
}
-NAMED_PROPERTY_DELETER(Storage)
+v8::Handle<v8::Boolean> V8Storage::namedPropertyDeleter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.Storage.NamedPropertyDeleter");
return storageDeleter(name, info);
*/
#include "config.h"
+#include "V8StyleSheetList.h"
+
#include "HTMLStyleElement.h"
#include "StyleSheetList.h"
-
#include "V8Binding.h"
#include "V8CustomBinding.h"
#include "V8Proxy.h"
namespace WebCore {
-NAMED_PROPERTY_GETTER(StyleSheetList)
+v8::Handle<v8::Value> V8StyleSheetList::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.StyleSheetList.NamedPropertyGetter");
return constructWebGLArray<WebGLByteArray>(args, V8ClassIndex::ToInt(V8ClassIndex::WEBGLBYTEARRAY));
}
-// Get the specified value from the byte buffer and return it wrapped as a JavaScript Number object to V8. Accesses outside the valid byte buffer range return "undefined".
-INDEXED_PROPERTY_GETTER(WebGLByteArray)
-{
- INC_STATS("DOM.WebGLByteArray.IndexedPropertyGetter");
- WebGLByteArray* byteBuffer = V8DOMWrapper::convertToNativeObject<WebGLByteArray>(V8ClassIndex::WEBGLBYTEARRAY, info.Holder());
-
- if ((index < 0) || (index >= byteBuffer->length()))
- return v8::Undefined();
- signed char result;
- if (!byteBuffer->get(index, result))
- return v8::Undefined();
- return v8::Number::New(result);
-}
-
-// Set the specified value in the byte buffer. Accesses outside the valid byte buffer range are silently ignored.
-INDEXED_PROPERTY_SETTER(WebGLByteArray)
-{
- INC_STATS("DOM.WebGLByteArray.IndexedPropertySetter");
- WebGLByteArray* array = V8DOMWrapper::convertToNativeObject<WebGLByteArray>(V8ClassIndex::WEBGLBYTEARRAY, info.Holder());
-
- if ((index >= 0) && (index < array->length())) {
- if (!value->IsNumber())
- return throwError("Could not convert value argument to a number");
- array->set(index, value->NumberValue());
- }
- return value;
-}
-
v8::Handle<v8::Value> V8WebGLByteArray::getCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLByteArray.get()");
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;
-}
-
v8::Handle<v8::Value> V8WebGLFloatArray::getCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLFloatArray.get()");
return constructWebGLArray<WebGLIntArray>(args, V8ClassIndex::ToInt(V8ClassIndex::WEBGLINTARRAY));
}
-// Get the specified value from the integer array and return it wrapped as a JavaScript Number object to V8. Accesses outside the valid pixel buffer range return "undefined".
-INDEXED_PROPERTY_GETTER(WebGLIntArray)
-{
- INC_STATS("DOM.WebGLIntArray.IndexedPropertyGetter");
- WebGLIntArray* array = V8DOMWrapper::convertToNativeObject<WebGLIntArray>(V8ClassIndex::WEBGLINTARRAY, info.Holder());
-
- if ((index < 0) || (index >= array->length()))
- return v8::Undefined();
- int result;
- if (!array->get(index, result))
- return v8::Undefined();
- return v8::Number::New(result);
-}
-
-// Set the specified value in the integer array. Accesses outside the valid integer array range are silently ignored.
-INDEXED_PROPERTY_SETTER(WebGLIntArray)
-{
- INC_STATS("DOM.WebGLIntArray.IndexedPropertySetter");
- WebGLIntArray* array = V8DOMWrapper::convertToNativeObject<WebGLIntArray>(V8ClassIndex::WEBGLINTARRAY, info.Holder());
-
- if ((index >= 0) && (index < array->length())) {
- if (!value->IsNumber())
- return throwError("Could not convert value argument to a number");
- array->set(index, value->NumberValue());
- }
- return value;
-}
-
v8::Handle<v8::Value> V8WebGLIntArray::getCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLIntArray.get()");
return constructWebGLArray<WebGLShortArray>(args, V8ClassIndex::ToInt(V8ClassIndex::WEBGLSHORTARRAY));
}
-// 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(WebGLShortArray)
-{
- INC_STATS("DOM.WebGLShortArray.IndexedPropertyGetter");
- WebGLShortArray* array = V8DOMWrapper::convertToNativeObject<WebGLShortArray>(V8ClassIndex::WEBGLSHORTARRAY, info.Holder());
-
- if ((index < 0) || (index >= array->length()))
- return v8::Undefined();
- short 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(WebGLShortArray)
-{
- INC_STATS("DOM.WebGLShortArray.IndexedPropertySetter");
- WebGLShortArray* array = V8DOMWrapper::convertToNativeObject<WebGLShortArray>(V8ClassIndex::WEBGLSHORTARRAY, info.Holder());
-
- if ((index >= 0) && (index < array->length())) {
- if (!value->IsNumber())
- return throwError("Could not convert value argument to a number");
- array->set(index, value->NumberValue());
- }
- return value;
-}
-
v8::Handle<v8::Value> V8WebGLShortArray::getCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLShortArray.get()");
return constructWebGLArray<WebGLUnsignedByteArray>(args, V8ClassIndex::ToInt(V8ClassIndex::WEBGLUNSIGNEDBYTEARRAY));
}
-// 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(WebGLUnsignedByteArray)
-{
- INC_STATS("DOM.WebGLUnsignedByteArray.IndexedPropertyGetter");
- WebGLUnsignedByteArray* array = V8DOMWrapper::convertToNativeObject<WebGLUnsignedByteArray>(V8ClassIndex::WEBGLUNSIGNEDBYTEARRAY, info.Holder());
-
- if ((index < 0) || (index >= array->length()))
- return v8::Undefined();
- unsigned char 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(WebGLUnsignedByteArray)
-{
- INC_STATS("DOM.WebGLUnsignedByteArray.IndexedPropertySetter");
- WebGLUnsignedByteArray* array = V8DOMWrapper::convertToNativeObject<WebGLUnsignedByteArray>(V8ClassIndex::WEBGLUNSIGNEDBYTEARRAY, info.Holder());
-
- if ((index >= 0) && (index < array->length())) {
- if (!value->IsNumber())
- return throwError("Could not convert value argument to a number");
- array->set(index, value->NumberValue());
- }
- return value;
-}
-
v8::Handle<v8::Value> V8WebGLUnsignedByteArray::getCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLUnsignedByteArray.get()");
return constructWebGLArray<WebGLUnsignedIntArray>(args, V8ClassIndex::ToInt(V8ClassIndex::WEBGLUNSIGNEDINTARRAY));
}
-// Get the specified value from the integer array and return it wrapped as a JavaScript Number object to V8. Accesses outside the valid pixel buffer range return "undefined".
-INDEXED_PROPERTY_GETTER(WebGLUnsignedIntArray)
-{
- INC_STATS("DOM.WebGLUnsignedIntArray.IndexedPropertyGetter");
- WebGLUnsignedIntArray* array = V8DOMWrapper::convertToNativeObject<WebGLUnsignedIntArray>(V8ClassIndex::WEBGLUNSIGNEDINTARRAY, info.Holder());
-
- if ((index < 0) || (index >= array->length()))
- return v8::Undefined();
- unsigned int result;
- if (!array->get(index, result))
- return v8::Undefined();
- return v8::Number::New(result);
-}
-
-// Set the specified value in the integer array. Accesses outside the valid integer array range are silently ignored.
-INDEXED_PROPERTY_SETTER(WebGLUnsignedIntArray)
-{
- INC_STATS("DOM.WebGLUnsignedIntArray.IndexedPropertySetter");
- WebGLUnsignedIntArray* array = V8DOMWrapper::convertToNativeObject<WebGLUnsignedIntArray>(V8ClassIndex::WEBGLUNSIGNEDINTARRAY, info.Holder());
-
- if ((index >= 0) && (index < array->length())) {
- if (!value->IsNumber())
- return throwError("Could not convert value argument to a number");
- array->set(index, value->NumberValue());
- }
- return value;
-}
-
v8::Handle<v8::Value> V8WebGLUnsignedIntArray::getCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLUnsignedIntArray.get()");
return constructWebGLArray<WebGLUnsignedShortArray>(args, V8ClassIndex::ToInt(V8ClassIndex::WEBGLUNSIGNEDSHORTARRAY));
}
-// 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(WebGLUnsignedShortArray)
-{
- INC_STATS("DOM.WebGLUnsignedShortArray.IndexedPropertyGetter");
- WebGLUnsignedShortArray* array = V8DOMWrapper::convertToNativeObject<WebGLUnsignedShortArray>(V8ClassIndex::WEBGLUNSIGNEDSHORTARRAY, info.Holder());
-
- if ((index < 0) || (index >= array->length()))
- return v8::Undefined();
- unsigned short 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(WebGLUnsignedShortArray)
-{
- INC_STATS("DOM.WebGLUnsignedShortArray.IndexedPropertySetter");
- WebGLUnsignedShortArray* array = V8DOMWrapper::convertToNativeObject<WebGLUnsignedShortArray>(V8ClassIndex::WEBGLUNSIGNEDSHORTARRAY, info.Holder());
-
- if ((index >= 0) && (index < array->length())) {
- if (!value->IsNumber())
- return throwError("Could not convert value argument to a number");
- array->set(index, value->NumberValue());
- }
- return value;
-}
-
v8::Handle<v8::Value> V8WebGLUnsignedShortArray::getCallback(const v8::Arguments& args)
{
INC_STATS("DOM.WebGLUnsignedShortArray.get()");