2010-01-07 Nate Chapin <japhet@chromium.org>
authorjaphet@chromium.org <japhet@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jan 2010 22:55:01 +0000 (22:55 +0000)
committerjaphet@chromium.org <japhet@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jan 2010 22:55:01 +0000 (22:55 +0000)
        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:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52952 268f45cc-cd09-0410-ab3c-d52691b4dbfc

24 files changed:
WebCore/ChangeLog
WebCore/bindings/scripts/CodeGeneratorV8.pm
WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp
WebCore/bindings/v8/custom/V8CustomBinding.h
WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
WebCore/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp
WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp
WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
WebCore/bindings/v8/custom/V8HTMLFormElementCustom.cpp
WebCore/bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp
WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
WebCore/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp
WebCore/bindings/v8/custom/V8HTMLSelectElementCustom.cpp
WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp
WebCore/bindings/v8/custom/V8NodeListCustom.cpp
WebCore/bindings/v8/custom/V8StorageCustom.cpp
WebCore/bindings/v8/custom/V8StyleSheetListCustom.cpp
WebCore/bindings/v8/custom/V8WebGLByteArrayCustom.cpp
WebCore/bindings/v8/custom/V8WebGLFloatArrayCustom.cpp
WebCore/bindings/v8/custom/V8WebGLIntArrayCustom.cpp
WebCore/bindings/v8/custom/V8WebGLShortArrayCustom.cpp
WebCore/bindings/v8/custom/V8WebGLUnsignedByteArrayCustom.cpp
WebCore/bindings/v8/custom/V8WebGLUnsignedIntArrayCustom.cpp
WebCore/bindings/v8/custom/V8WebGLUnsignedShortArrayCustom.cpp

index 696d3119c3c0975fb69d607c872f7e10e0b858db..bd1b48098def03fd161b75b0edf04084762f164f 100644 (file)
@@ -1,3 +1,33 @@
+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
index 76e8b2f92a5d0d77f40a22b1cf05f50ae3c80b40..6d0f5bf441c0c98060bc08713d9661d02d1e7b92 100644 (file)
@@ -287,6 +287,8 @@ END
         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
@@ -316,6 +318,7 @@ END
     }
 
     GenerateHeaderRuntimeEnablerDeclarations(@enabledAtRuntime);
+    GenerateHeaderNamedAndIndexedPropertyAccessors($dataNode);
     GenerateHeaderCustomCall($dataNode);
     
     if ($dataNode->extendedAttributes->{"CheckDomainSecurity"}) {
@@ -360,6 +363,75 @@ END
     }
 }
 
+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;
@@ -1201,13 +1273,6 @@ sub GenerateSingleBatchedAttribute
 END
 }
 
-my %indexerSpecialCases = (
-    "Storage" => 1,
-    "HTMLAppletElement" => 1,
-    "HTMLEmbedElement" => 1,
-    "HTMLObjectElement" => 1
-);
-
 sub GenerateImplementationIndexer
 {
     my $dataNode = shift;
@@ -1285,10 +1350,10 @@ END
         $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");
 }
@@ -1338,11 +1403,11 @@ END
         $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");
 }
 
index 6bd0035ab6e269955e80ebe0643d0fb2ae606837..74ff02ff099f740eb83a159663ad917ead4aed22 100644 (file)
  */
 
 #include "config.h"
-#include "CSSStyleDeclaration.h"
+#include "V8CSSStyleDeclaration.h"
 
 #include "CSSParser.h"
+#include "CSSStyleDeclaration.h"
 #include "CSSValue.h"
 #include "CSSPrimitiveValue.h"
 #include "EventTarget.h"
@@ -152,7 +153,7 @@ static CSSPropertyInfo* cssPropertyInfo(v8::Handle<v8::String>v8PropertyName)
     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.
@@ -191,7 +192,7 @@ NAMED_PROPERTY_GETTER(CSSStyleDeclaration)
     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 =
index aafe1ea701a9fc6d1eaa53e6cf671acc7569579a..bb685c6bba674ef857e17eea057cdd3577a14228 100644 (file)
 #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:
@@ -152,49 +128,9 @@ namespace WebCore {
         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);
@@ -218,76 +154,6 @@ namespace WebCore {
         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
@@ -300,14 +166,6 @@ namespace WebCore {
         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
     };
 
index 12d9f72bb37917c75ac09999f382ae5f1880c0d7..9b7ef519871b1c7fd696ac80f6ea442e0521d19e 100644 (file)
@@ -764,7 +764,7 @@ v8::Handle<v8::Value> V8DOMWindow::openCallback(const v8::Arguments& args)
 }
 
 
-INDEXED_PROPERTY_GETTER(DOMWindow)
+v8::Handle<v8::Value> V8DOMWindow::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.DOMWindow.IndexedPropertyGetter");
 
@@ -784,7 +784,7 @@ INDEXED_PROPERTY_GETTER(DOMWindow)
 }
 
 
-NAMED_PROPERTY_GETTER(DOMWindow)
+v8::Handle<v8::Value> V8DOMWindow::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.DOMWindow.NamedPropertyGetter");
 
index 6e43e777101952252209cc24e8740d23a50d2c61..e274b7b0df3c3a281156b4a49fbb2b92eeeda66f 100644 (file)
@@ -71,7 +71,7 @@ static v8::Handle<v8::Value> getItem(HTMLAllCollection* collection, v8::Handle<v
     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.
index 517344ce336ff35dd6ec97e30ba2920569c84873..f2a436720d719712a8f2b805d6006168aaa2812d 100644 (file)
@@ -70,7 +70,7 @@ static v8::Handle<v8::Value> getItem(HTMLCollection* collection, v8::Handle<v8::
     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.
index 5efbcf475a49577e3d26ea23828ff6eb8041dce8..ea59ad78975871b062e8fc70916ce890988cbbe1 100644 (file)
@@ -47,7 +47,7 @@
 
 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
@@ -57,13 +57,13 @@ NAMED_PROPERTY_DELETER(HTMLDocument)
     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);
@@ -73,9 +73,9 @@ NAMED_PROPERTY_GETTER(HTMLDocument)
     // 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;
     }
index 5c741fe408a0f96d75cb9a218ec601089274aadd..966381a8c6f279ae61d9a245f9463c5282195b9a 100644 (file)
@@ -40,7 +40,7 @@
 
 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());
@@ -51,8 +51,7 @@ INDEXED_PROPERTY_GETTER(HTMLFormElement)
     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());
index e8e2e72a9bc323441e277665afd89831fa7dcf60..e8bed5981903ffdd10ffe0d74ba1a425be5d913d 100644 (file)
  */
 
 #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"
 
@@ -44,7 +45,7 @@
 
 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());
index 4a696f644dd35979416d2a48ae76465be594f41f..7c6e9e4415efb43aacf1c0c2820a6aad5c5fc872 100644 (file)
@@ -114,7 +114,7 @@ void V8HTMLOptionsCollection::lengthAccessorSetter(v8::Local<v8::String> name, v
     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());
@@ -126,7 +126,7 @@ INDEXED_PROPERTY_GETTER(HTMLOptionsCollection)
     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());
index bc2b16cb26df4c1f8d9a11a918627279c4da4686..f814bdac2c67f957c54083a261b2e41d7d2bb533 100644 (file)
@@ -73,37 +73,37 @@ static v8::Handle<v8::Value> npObjectNamedSetter(v8::Local<v8::String> name, v8:
     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);
@@ -157,37 +157,37 @@ v8::Handle<v8::Value> npObjectIndexedSetter(uint32_t index, v8::Local<v8::Value>
     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);
index 10bd9c0e3201ee3ce6882f4cebcf48b611016977..0d84d920b236fb9653a11d4f06216718b9f1c05d 100644 (file)
@@ -45,9 +45,9 @@
 
 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);
 
@@ -73,7 +73,7 @@ NAMED_PROPERTY_GETTER(HTMLSelectElement)
     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);
@@ -84,7 +84,7 @@ INDEXED_PROPERTY_GETTER(HTMLSelectElement)
     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());
index afa90b7a4556603dc7c849c572c308a299d474ba..b7ff7ed441716db9631736e3baff9dc2d26d1b97 100644 (file)
@@ -29,8 +29,9 @@
  */
 
 #include "config.h"
-#include "NamedNodeMap.h"
+#include "V8NamedNodeMap.h"
 
+#include "NamedNodeMap.h"
 #include "V8Binding.h"
 #include "V8CustomBinding.h"
 #include "V8Proxy.h"
@@ -39,7 +40,7 @@
 
 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());
@@ -50,7 +51,7 @@ INDEXED_PROPERTY_GETTER(NamedNodeMap)
     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.
index 2867936b4eb700ef73121671b59dc105969e5f04..0af3f9614742261a354aa7fc0052eda12b8f2c45 100644 (file)
@@ -42,7 +42,7 @@
 
 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());
index f3f4687ed4ff12c094774a3c474b95018f7bef21..396d333ed497a5375773aa3506c880a7bca0f932 100644 (file)
@@ -31,6 +31,7 @@
 #include "config.h"
 
 #if ENABLE(DOM_STORAGE)
+#include "V8Storage.h"
 
 #include "Storage.h"
 #include "V8Binding.h"
@@ -40,7 +41,7 @@
 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();
@@ -66,14 +67,14 @@ static v8::Handle<v8::Value> storageGetter(v8::Local<v8::String> v8Name, const v
     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);
@@ -101,14 +102,14 @@ static v8::Handle<v8::Value> storageSetter(v8::Local<v8::String> v8Name, v8::Loc
     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);
@@ -127,14 +128,14 @@ static v8::Handle<v8::Boolean> storageDeleter(v8::Local<v8::String> v8Name, cons
     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);
index 32a48ebf5eeb1f078f27fc592a2ddf132548d556..aa532bb451c62e430c9227625f2e87b84108e729 100644 (file)
  */
 
 #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");
 
index 7c75eba71b167a8b6c13c5a4b98f403b5fa3960e..7b4e5c2171ba7403c8e6671c68bba89b13ed3e50 100644 (file)
@@ -51,34 +51,6 @@ v8::Handle<v8::Value> V8Custom::v8WebGLByteArrayConstructorCallback(const v8::Ar
     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()");
index f06fe71bd405598ab267261fff5a6f67febcda75..a6e9f564dcbc4dda3e3d0e79850129122983f525 100644 (file)
@@ -51,31 +51,6 @@ v8::Handle<v8::Value> V8Custom::v8WebGLFloatArrayConstructorCallback(const v8::A
     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()");
index 333c04af73cfee75fbdc13918bdce4a323c09abd..6835d252fcf734e02603f4c3f45724277e9fe1d4 100644 (file)
@@ -51,34 +51,6 @@ v8::Handle<v8::Value> V8Custom::v8WebGLIntArrayConstructorCallback(const v8::Arg
     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()");
index a0a2c30c50dc1c19817ffdce5e96ebc962612f58..436c73b08cd6961c0be140e716b1ade194ae4b7c 100644 (file)
@@ -51,34 +51,6 @@ v8::Handle<v8::Value> V8Custom::v8WebGLShortArrayConstructorCallback(const v8::A
     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()");
index e4d4d9937aaf56188a6facaf59c779816dc536b2..6ac3fd909c61bc020ebf8be43d74610a9578b1b8 100644 (file)
@@ -51,34 +51,6 @@ v8::Handle<v8::Value> V8Custom::v8WebGLUnsignedByteArrayConstructorCallback(cons
     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()");
index 5a119d5ced2021a37bb0f6ff26ff5cd67084fdc4..f9eb8821bc2cb28f813f3f19094a59d3b77d672a 100644 (file)
@@ -51,34 +51,6 @@ v8::Handle<v8::Value> V8Custom::v8WebGLUnsignedIntArrayConstructorCallback(const
     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()");
index 2882ebeaab99aa7e7e2b6a37c5fb6368dc1225e5..668ab9943e8301718f188a8963f39ef3461ee983 100644 (file)
@@ -51,34 +51,6 @@ v8::Handle<v8::Value> V8Custom::v8WebGLUnsignedShortArrayConstructorCallback(con
     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()");