Support latest Web IDL indexed property getters
authorch.dumez@sisa.samsung.com <ch.dumez@sisa.samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Jun 2013 14:41:19 +0000 (14:41 +0000)
committerch.dumez@sisa.samsung.com <ch.dumez@sisa.samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Jun 2013 14:41:19 +0000 (14:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=117507

Reviewed by Kentaro Hara.

Support latest Web IDL indexed property getters:
http://www.w3.org/TR/WebIDL/#dfn-support-indexed-properties

Drop support for outdated [IndexedGetter] and [NumericIndexedGetter]
IDL extended attributes. Since the new getter format specifies the
return type, the bindings generator is now smart enough to know if
the indexed getter is numeric or not on its own.

Based on Blink r149564 by <kojih@chromium.org>.

No new tests, no behavior change.

* Modules/filesystem/EntryArray.idl:
* Modules/filesystem/EntryArraySync.idl:
* Modules/gamepad/GamepadList.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognitionResult.idl:
* Modules/speech/SpeechRecognitionResultList.idl:
* bindings/scripts/CodeGenerator.pm:
(IsNumericType):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateGetOwnPropertyDescriptorBody):
(GetIndexedGetterFunction):
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/TestEventTarget.idl:
* bindings/scripts/test/TestTypedArray.idl:
* css/CSSRuleList.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSValueList.idl:
* css/MediaList.idl:
* css/StyleSheetList.idl:
* css/WebKitCSSFilterValue.idl:
* css/WebKitCSSKeyframesRule.idl:
* css/WebKitCSSTransformValue.idl:
* dom/ClientRectList.idl:
* dom/DOMNamedFlowCollection.idl:
* dom/DOMStringList.idl:
* dom/DataTransferItemList.idl:
* dom/NamedNodeMap.idl:
* dom/NodeList.idl:
* dom/PropertyNodeList.idl:
* dom/TouchList.idl:
* fileapi/FileList.idl:
* html/DOMSettableTokenList.idl:
* html/DOMTokenList.idl:
* html/HTMLAllCollection.idl:
* html/HTMLCollection.idl:
* html/HTMLFormControlsCollection.idl:
* html/HTMLFormElement.idl:
* html/HTMLPropertiesCollection.idl:
* html/HTMLSelectElement.idl:
* html/RadioNodeList.idl:
* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/canvas/Uint8ClampedArray.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrackCueList.idl:
* html/track/TextTrackList.idl:
* html/track/TextTrackRegionList.idl:
* html/track/VideoTrackList.idl:
* page/PerformanceEntryList.idl:
* page/SpeechInputResultList.idl:
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:

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

58 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/filesystem/EntryArray.idl
Source/WebCore/Modules/filesystem/EntryArraySync.idl
Source/WebCore/Modules/gamepad/GamepadList.idl
Source/WebCore/Modules/mediasource/SourceBufferList.idl
Source/WebCore/Modules/speech/SpeechGrammarList.idl
Source/WebCore/Modules/speech/SpeechRecognitionResult.idl
Source/WebCore/Modules/speech/SpeechRecognitionResultList.idl
Source/WebCore/bindings/scripts/CodeGenerator.pm
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/IDLAttributes.txt
Source/WebCore/bindings/scripts/test/TestEventTarget.idl
Source/WebCore/bindings/scripts/test/TestTypedArray.idl
Source/WebCore/css/CSSRuleList.idl
Source/WebCore/css/CSSStyleDeclaration.idl
Source/WebCore/css/CSSValueList.idl
Source/WebCore/css/MediaList.idl
Source/WebCore/css/StyleSheetList.idl
Source/WebCore/css/WebKitCSSFilterValue.idl
Source/WebCore/css/WebKitCSSKeyframesRule.idl
Source/WebCore/css/WebKitCSSTransformValue.idl
Source/WebCore/dom/ClientRectList.idl
Source/WebCore/dom/DOMNamedFlowCollection.idl
Source/WebCore/dom/DOMStringList.idl
Source/WebCore/dom/DataTransferItemList.idl
Source/WebCore/dom/NamedNodeMap.idl
Source/WebCore/dom/NodeList.idl
Source/WebCore/dom/PropertyNodeList.idl
Source/WebCore/dom/TouchList.idl
Source/WebCore/fileapi/FileList.idl
Source/WebCore/html/DOMSettableTokenList.idl
Source/WebCore/html/DOMTokenList.idl
Source/WebCore/html/HTMLAllCollection.idl
Source/WebCore/html/HTMLCollection.idl
Source/WebCore/html/HTMLFormControlsCollection.idl
Source/WebCore/html/HTMLFormElement.idl
Source/WebCore/html/HTMLPropertiesCollection.idl
Source/WebCore/html/HTMLSelectElement.idl
Source/WebCore/html/RadioNodeList.idl
Source/WebCore/html/canvas/Float32Array.idl
Source/WebCore/html/canvas/Float64Array.idl
Source/WebCore/html/canvas/Int16Array.idl
Source/WebCore/html/canvas/Int32Array.idl
Source/WebCore/html/canvas/Int8Array.idl
Source/WebCore/html/canvas/Uint16Array.idl
Source/WebCore/html/canvas/Uint32Array.idl
Source/WebCore/html/canvas/Uint8Array.idl
Source/WebCore/html/canvas/Uint8ClampedArray.idl
Source/WebCore/html/track/AudioTrackList.idl
Source/WebCore/html/track/TextTrackCueList.idl
Source/WebCore/html/track/TextTrackList.idl
Source/WebCore/html/track/TextTrackRegionList.idl
Source/WebCore/html/track/VideoTrackList.idl
Source/WebCore/page/PerformanceEntryList.idl
Source/WebCore/page/SpeechInputResultList.idl
Source/WebCore/plugins/DOMMimeTypeArray.idl
Source/WebCore/plugins/DOMPlugin.idl
Source/WebCore/plugins/DOMPluginArray.idl

index c994970..2838f2e 100644 (file)
@@ -1,5 +1,88 @@
 2013-06-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
 
+        Support latest Web IDL indexed property getters
+        https://bugs.webkit.org/show_bug.cgi?id=117507
+
+        Reviewed by Kentaro Hara.
+
+        Support latest Web IDL indexed property getters:
+        http://www.w3.org/TR/WebIDL/#dfn-support-indexed-properties
+
+        Drop support for outdated [IndexedGetter] and [NumericIndexedGetter]
+        IDL extended attributes. Since the new getter format specifies the
+        return type, the bindings generator is now smart enough to know if
+        the indexed getter is numeric or not on its own.
+
+        Based on Blink r149564 by <kojih@chromium.org>.
+
+        No new tests, no behavior change.
+
+        * Modules/filesystem/EntryArray.idl:
+        * Modules/filesystem/EntryArraySync.idl:
+        * Modules/gamepad/GamepadList.idl:
+        * Modules/mediasource/SourceBufferList.idl:
+        * Modules/speech/SpeechGrammarList.idl:
+        * Modules/speech/SpeechRecognitionResult.idl:
+        * Modules/speech/SpeechRecognitionResultList.idl:
+        * bindings/scripts/CodeGenerator.pm:
+        (IsNumericType):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateGetOwnPropertySlotBody):
+        (GenerateGetOwnPropertyDescriptorBody):
+        (GetIndexedGetterFunction):
+        (GenerateHeader):
+        (GenerateImplementation):
+        * bindings/scripts/IDLAttributes.txt:
+        * bindings/scripts/test/TestEventTarget.idl:
+        * bindings/scripts/test/TestTypedArray.idl:
+        * css/CSSRuleList.idl:
+        * css/CSSStyleDeclaration.idl:
+        * css/CSSValueList.idl:
+        * css/MediaList.idl:
+        * css/StyleSheetList.idl:
+        * css/WebKitCSSFilterValue.idl:
+        * css/WebKitCSSKeyframesRule.idl:
+        * css/WebKitCSSTransformValue.idl:
+        * dom/ClientRectList.idl:
+        * dom/DOMNamedFlowCollection.idl:
+        * dom/DOMStringList.idl:
+        * dom/DataTransferItemList.idl:
+        * dom/NamedNodeMap.idl:
+        * dom/NodeList.idl:
+        * dom/PropertyNodeList.idl:
+        * dom/TouchList.idl:
+        * fileapi/FileList.idl:
+        * html/DOMSettableTokenList.idl:
+        * html/DOMTokenList.idl:
+        * html/HTMLAllCollection.idl:
+        * html/HTMLCollection.idl:
+        * html/HTMLFormControlsCollection.idl:
+        * html/HTMLFormElement.idl:
+        * html/HTMLPropertiesCollection.idl:
+        * html/HTMLSelectElement.idl:
+        * html/RadioNodeList.idl:
+        * html/canvas/Float32Array.idl:
+        * html/canvas/Float64Array.idl:
+        * html/canvas/Int16Array.idl:
+        * html/canvas/Int32Array.idl:
+        * html/canvas/Int8Array.idl:
+        * html/canvas/Uint16Array.idl:
+        * html/canvas/Uint32Array.idl:
+        * html/canvas/Uint8Array.idl:
+        * html/canvas/Uint8ClampedArray.idl:
+        * html/track/AudioTrackList.idl:
+        * html/track/TextTrackCueList.idl:
+        * html/track/TextTrackList.idl:
+        * html/track/TextTrackRegionList.idl:
+        * html/track/VideoTrackList.idl:
+        * page/PerformanceEntryList.idl:
+        * page/SpeechInputResultList.idl:
+        * plugins/DOMMimeTypeArray.idl:
+        * plugins/DOMPlugin.idl:
+        * plugins/DOMPluginArray.idl:
+
+2013-06-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
+
         Rename [CallWith] to [ConstructorCallWith] for IDL interfaces
         https://bugs.webkit.org/show_bug.cgi?id=117531
 
index af87919..8029cb2 100644 (file)
 [
     NoInterfaceObject,
     Conditional=FILE_SYSTEM,
-    IndexedGetter,
     JSNoStaticTables,
     ImplementationLacksVTable
 ] interface EntryArray {
     readonly attribute unsigned long length;
-    Entry item([IsIndex] unsigned long index);
+    getter Entry item([IsIndex] unsigned long index);
 };
index b121710..ed65594 100644 (file)
 [
     NoInterfaceObject,
     Conditional=FILE_SYSTEM,
-    IndexedGetter,
     JSNoStaticTables,
     ImplementationLacksVTable
 ] interface EntryArraySync {
     readonly attribute unsigned long length;
-    EntrySync item([IsIndex] unsigned long index);
+    getter EntrySync item([IsIndex] unsigned long index);
 };
index bfbf2a0..28935ba 100644 (file)
 [
     NoInterfaceObject,
     Conditional=GAMEPAD,
-    IndexedGetter,
     ImplementationLacksVTable
 ] interface GamepadList {
     readonly attribute unsigned long length;
-    Gamepad item([Default=Undefined] optional unsigned long index);
+    getter Gamepad item([Default=Undefined] optional unsigned long index);
 };
 
index 04132dc..5b14ad8 100644 (file)
  
 [
     Conditional=MEDIA_SOURCE,
-    IndexedGetter,
     EventTarget,
     InterfaceName=WebKitSourceBufferList
 ] interface SourceBufferList {
     readonly attribute unsigned long length;
-    SourceBuffer item(unsigned long index);
+    getter SourceBuffer item(unsigned long index);
 
     // EventTarget interface
     void addEventListener(DOMString type,
index d38bb4a..e33360b 100644 (file)
 
 [
     Conditional=SCRIPTED_SPEECH,
-    IndexedGetter,
     Constructor,
     ImplementationLacksVTable,
     InterfaceName=webkitSpeechGrammarList
 ] interface SpeechGrammarList {
     readonly attribute unsigned long length;
-    SpeechGrammar item([IsIndex] unsigned long index);
+    getter SpeechGrammar item([IsIndex] unsigned long index);
     [CallWith=ScriptExecutionContext] void addFromUri(DOMString src, optional float weight);
     void addFromString(DOMString string, optional float weight);
 };
index 3302c95..cc7213b 100644 (file)
 [
     NoInterfaceObject,
     Conditional=SCRIPTED_SPEECH,
-    IndexedGetter,
     ImplementationLacksVTable
 ] interface SpeechRecognitionResult {
     readonly attribute unsigned long length;
-    SpeechRecognitionAlternative item([IsIndex] unsigned long index);
+    getter SpeechRecognitionAlternative item([IsIndex] unsigned long index);
     readonly attribute boolean isFinal;
 };
index 1654fb4..4635651 100644 (file)
@@ -26,9 +26,8 @@
 [
     NoInterfaceObject,
     Conditional=SCRIPTED_SPEECH,
-    IndexedGetter,
     ImplementationLacksVTable
 ] interface SpeechRecognitionResultList {
     readonly attribute unsigned long length;
-    SpeechRecognitionResult item([IsIndex] unsigned long index);
+    getter SpeechRecognitionResult item([IsIndex] unsigned long index);
 };
index 3df3e40..9bc8313 100644 (file)
@@ -48,7 +48,8 @@ my $verbose = 0;
 my %numericTypeHash = ("int" => 1, "short" => 1, "long" => 1, "long long" => 1,
                        "unsigned int" => 1, "unsigned short" => 1,
                        "unsigned long" => 1, "unsigned long long" => 1,
-                       "float" => 1, "double" => 1);
+                       "float" => 1, "double" => 1, "byte" => 1,
+                       "octet" => 1);
 
 my %primitiveTypeHash = ( "boolean" => 1, "void" => 1, "Date" => 1);
 
@@ -348,6 +349,15 @@ sub IsConstructorTemplate
     return $interface->extendedAttributes->{"ConstructorTemplate"} && $interface->extendedAttributes->{"ConstructorTemplate"} eq $template;
 }
 
+sub IsNumericType
+{
+    my $object = shift;
+    my $type = shift;
+
+    return 1 if $numericTypeHash{$type};
+    return 0;
+}
+
 sub IsPrimitiveType
 {
     my $object = shift;
index 5b5100b..1f33c21 100644 (file)
@@ -353,6 +353,8 @@ sub GenerateGetOwnPropertySlotBody
 
     my $namespaceMaybe = ($inlined ? "JSC::" : "");
     my $namedGetterFunction = GetNamedGetterFunction($interface);
+    my $indexedGetterFunction = GetIndexedGetterFunction($interface);
+    my $hasNumericIndexedGetter = $indexedGetterFunction ? $codeGenerator->IsNumericType($indexedGetterFunction->signature->type) : 0;
 
     my @getOwnPropertySlotImpl = ();
 
@@ -363,7 +365,7 @@ sub GenerateGetOwnPropertySlotBody
     }
 
     my $manualLookupGetterGeneration = sub {
-        my $requiresManualLookup = $interface->extendedAttributes->{"IndexedGetter"} || $namedGetterFunction;
+        my $requiresManualLookup = ($indexedGetterFunction && !$hasNumericIndexedGetter) || $namedGetterFunction;
         if ($requiresManualLookup) {
             push(@getOwnPropertySlotImpl, "    const ${namespaceMaybe}HashEntry* entry = getStaticValueSlotEntryWithoutCaching<$className>(exec, propertyName);\n");
             push(@getOwnPropertySlotImpl, "    if (entry) {\n");
@@ -377,7 +379,7 @@ sub GenerateGetOwnPropertySlotBody
         &$manualLookupGetterGeneration();
     }
 
-    if ($interface->extendedAttributes->{"IndexedGetter"} || $interface->extendedAttributes->{"NumericIndexedGetter"}) {
+    if ($indexedGetterFunction) {
         push(@getOwnPropertySlotImpl, "    unsigned index = propertyName.asIndex();\n");
 
         # If the item function returns a string then we let the TreatReturnedNullStringAs handle the cases
@@ -387,7 +389,7 @@ sub GenerateGetOwnPropertySlotBody
         } else {
             push(@getOwnPropertySlotImpl, "    if (index != PropertyName::NotAnIndex && index < static_cast<$interfaceName*>(thisObject->impl())->length()) {\n");
         }
-        if ($interface->extendedAttributes->{"NumericIndexedGetter"}) {
+        if ($hasNumericIndexedGetter) {
             push(@getOwnPropertySlotImpl, "        slot.setValue(thisObject->getByIndex(exec, index));\n");
         } else {
             push(@getOwnPropertySlotImpl, "        slot.setCustomIndex(thisObject, index, indexGetter);\n");
@@ -437,6 +439,9 @@ sub GenerateGetOwnPropertyDescriptorBody
     
     my $namespaceMaybe = ($inlined ? "JSC::" : "");
     my $namedGetterFunction = GetNamedGetterFunction($interface);
+    my $indexedGetterFunction = GetIndexedGetterFunction($interface);
+    my $hasNumericIndexedGetter = $indexedGetterFunction ? $codeGenerator->IsNumericType($indexedGetterFunction->signature->type) : 0;
+
     
     my @getOwnPropertyDescriptorImpl = ();
     if ($interface->extendedAttributes->{"CheckSecurity"}) {
@@ -456,7 +461,7 @@ sub GenerateGetOwnPropertyDescriptorBody
     }
     
     my $manualLookupGetterGeneration = sub {
-        my $requiresManualLookup = $interface->extendedAttributes->{"IndexedGetter"} || $namedGetterFunction;
+        my $requiresManualLookup = ($indexedGetterFunction && !$hasNumericIndexedGetter) || $namedGetterFunction;
         if ($requiresManualLookup) {
             push(@getOwnPropertyDescriptorImpl, "    const ${namespaceMaybe}HashEntry* entry = ${className}Table.entry(exec, propertyName);\n");
             push(@getOwnPropertyDescriptorImpl, "    if (entry) {\n");
@@ -472,10 +477,10 @@ sub GenerateGetOwnPropertyDescriptorBody
         &$manualLookupGetterGeneration();
     }
 
-    if ($interface->extendedAttributes->{"IndexedGetter"} || $interface->extendedAttributes->{"NumericIndexedGetter"}) {
+    if ($indexedGetterFunction) {
         push(@getOwnPropertyDescriptorImpl, "    unsigned index = propertyName.asIndex();\n");
         push(@getOwnPropertyDescriptorImpl, "    if (index != PropertyName::NotAnIndex && index < static_cast<$interfaceName*>(thisObject->impl())->length()) {\n");
-        if ($interface->extendedAttributes->{"NumericIndexedGetter"}) {
+        if ($hasNumericIndexedGetter) {
             # Assume that if there's a setter, the index will be writable
             if ($interface->extendedAttributes->{"CustomIndexedSetter"}) {
                 push(@getOwnPropertyDescriptorImpl, "        descriptor.setDescriptor(thisObject->getByIndex(exec, index), ${namespaceMaybe}DontDelete);\n");
@@ -632,6 +637,12 @@ sub GetSpecialAccessorFunctionForType
     return 0;
 }
 
+sub GetIndexedGetterFunction
+{
+    my $interface = shift;
+    return GetSpecialAccessorFunctionForType($interface, "getter", "unsigned long", 1);
+}
+
 sub GetNamedGetterFunction
 {
     my $interface = shift;
@@ -773,6 +784,8 @@ sub GenerateHeader
     $implIncludes{"${className}Custom.h"} = 1 if !$interface->extendedAttributes->{"JSCustomHeader"} && ($interface->extendedAttributes->{"CustomPutFunction"} || $interface->extendedAttributes->{"CustomNamedSetter"});
 
     my $namedGetterFunction = GetNamedGetterFunction($interface);
+    my $indexedGetterFunction = GetIndexedGetterFunction($interface);
+    my $hasNumericIndexedGetter = $indexedGetterFunction ? $codeGenerator->IsNumericType($indexedGetterFunction->signature->type) : 0;
 
     my $hasImpureNamedGetter =
         $namedGetterFunction
@@ -780,8 +793,7 @@ sub GenerateHeader
         || $interface->extendedAttributes->{"CustomGetOwnPropertySlot"};
 
     my $hasComplexGetter =
-        $interface->extendedAttributes->{"IndexedGetter"}
-        || $interface->extendedAttributes->{"NumericIndexedGetter"}
+        $indexedGetterFunction
         || $interface->extendedAttributes->{"JSCustomGetOwnPropertySlotAndDescriptor"}
         || $hasImpureNamedGetter;
     
@@ -865,7 +877,7 @@ sub GenerateHeader
     }
 
     # Custom getOwnPropertyNames function
-    if ($interface->extendedAttributes->{"CustomEnumerateProperty"} || $interface->extendedAttributes->{"IndexedGetter"} || $interface->extendedAttributes->{"NumericIndexedGetter"}) {
+    if ($interface->extendedAttributes->{"CustomEnumerateProperty"} || $indexedGetterFunction) {
         push(@headerContent, "    static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties);\n");
         $structureFlags{"JSC::OverridesGetPropertyNames"} = 1;       
     }
@@ -1000,11 +1012,12 @@ sub GenerateHeader
     push(@headerContent, "Base::StructureFlags;\n");
 
     # Index getter
-    if ($interface->extendedAttributes->{"IndexedGetter"}) {
-        push(@headerContent, "    static JSC::JSValue indexGetter(JSC::ExecState*, JSC::JSValue, unsigned);\n");
-    }
-    if ($interface->extendedAttributes->{"NumericIndexedGetter"}) {
-        push(@headerContent, "    JSC::JSValue getByIndex(JSC::ExecState*, unsigned index);\n");
+    if ($indexedGetterFunction) {
+        if ($hasNumericIndexedGetter) {
+            push(@headerContent, "    JSC::JSValue getByIndex(JSC::ExecState*, unsigned index);\n");
+        } else {
+            push(@headerContent, "    static JSC::JSValue indexGetter(JSC::ExecState*, JSC::JSValue, unsigned);\n");
+        }
     }
 
     # Index setter
@@ -1588,11 +1601,15 @@ sub GenerateImplementation
     my $eventTarget = $interface->extendedAttributes->{"EventTarget"} || ($codeGenerator->InheritsInterface($interface, "EventTarget") && $interface->name ne "EventTarget");
     my $needsMarkChildren = $interface->extendedAttributes->{"JSCustomMarkFunction"} || $interface->extendedAttributes->{"EventTarget"} || $interface->name eq "EventTarget";
 
+    my $namedGetterFunction = GetNamedGetterFunction($interface);
+    my $indexedGetterFunction = GetIndexedGetterFunction($interface);
+    my $hasNumericIndexedGetter = $indexedGetterFunction ? $codeGenerator->IsNumericType($indexedGetterFunction->signature->type) : 0;
+
     # - Add default header template
     push(@implContentHeader, GenerateImplementationContentHeader($interface));
 
     $implIncludes{"<wtf/GetPtr.h>"} = 1;
-    $implIncludes{"<runtime/PropertyNameArray.h>"} = 1 if $interface->extendedAttributes->{"IndexedGetter"} || $interface->extendedAttributes->{"NumericIndexedGetter"};
+    $implIncludes{"<runtime/PropertyNameArray.h>"} = 1 if $indexedGetterFunction;
 
     AddIncludesForTypeInImpl($interfaceName);
 
@@ -1606,8 +1623,6 @@ sub GenerateImplementation
     my $numConstants = @{$interface->constants};
     my $numFunctions = @{$interface->functions};
 
-    my $namedGetterFunction = GetNamedGetterFunction($interface);
-
     # - Add all constants
     if (!$interface->extendedAttributes->{"NoInterfaceObject"}) {
         my $hashSize = $numConstants;
@@ -1919,8 +1934,7 @@ sub GenerateImplementation
 
     my $hasGetter = $numAttributes > 0
                  || !$interface->extendedAttributes->{"NoInterfaceObject"}
-                 || $interface->extendedAttributes->{"IndexedGetter"}
-                 || $interface->extendedAttributes->{"NumericIndexedGetter"}
+                 || $indexedGetterFunction
                  || $interface->extendedAttributes->{"JSCustomGetOwnPropertySlotAndDescriptor"}
                  || $interface->extendedAttributes->{"CustomGetOwnPropertySlot"}
                  || $namedGetterFunction
@@ -1943,8 +1957,8 @@ sub GenerateImplementation
             push(@implContent, "}\n\n");
         }
 
-        if ($interface->extendedAttributes->{"IndexedGetter"} || $interface->extendedAttributes->{"NumericIndexedGetter"}
-                || $namedGetterFunction || $interface->extendedAttributes->{"CustomNamedGetter"}
+        if ($indexedGetterFunction || $namedGetterFunction
+                || $interface->extendedAttributes->{"CustomNamedGetter"}
                 || $interface->extendedAttributes->{"JSCustomGetOwnPropertySlotAndDescriptor"}) {
             push(@implContent, "bool ${className}::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned index, PropertySlot& slot)\n");
             push(@implContent, "{\n");
@@ -1962,13 +1976,13 @@ sub GenerateImplementation
                 $generatedPropertyName = 1;
             };
 
-            if ($interface->extendedAttributes->{"IndexedGetter"} || $interface->extendedAttributes->{"NumericIndexedGetter"}) {
+            if ($indexedGetterFunction) {
                 if (IndexGetterReturnsStrings($interfaceName)) {
                     push(@implContent, "    if (index <= MAX_ARRAY_INDEX) {\n");
                 } else {
                     push(@implContent, "    if (index < static_cast<$interfaceName*>(thisObject->impl())->length()) {\n");
                 }
-                if ($interface->extendedAttributes->{"NumericIndexedGetter"}) {
+                if ($hasNumericIndexedGetter) {
                     push(@implContent, "        slot.setValue(thisObject->getByIndex(exec, index));\n");
                 } else {
                     push(@implContent, "        slot.setCustomIndex(thisObject, index, thisObject->indexGetter);\n");
@@ -2425,15 +2439,13 @@ sub GenerateImplementation
         }
     }
 
-    if (($interface->extendedAttributes->{"IndexedGetter"} || $interface->extendedAttributes->{"NumericIndexedGetter"}) && !$interface->extendedAttributes->{"CustomEnumerateProperty"}) {
+    if ($indexedGetterFunction && !$interface->extendedAttributes->{"CustomEnumerateProperty"}) {
         push(@implContent, "void ${className}::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)\n");
         push(@implContent, "{\n");
         push(@implContent, "    ${className}* thisObject = jsCast<${className}*>(object);\n");
         push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);\n");
-        if ($interface->extendedAttributes->{"IndexedGetter"} || $interface->extendedAttributes->{"NumericIndexedGetter"}) {
-            push(@implContent, "    for (unsigned i = 0; i < static_cast<${interfaceName}*>(thisObject->impl())->length(); ++i)\n");
-            push(@implContent, "        propertyNames.add(Identifier::from(exec, i));\n");
-        }
+        push(@implContent, "    for (unsigned i = 0; i < static_cast<${interfaceName}*>(thisObject->impl())->length(); ++i)\n");
+        push(@implContent, "        propertyNames.add(Identifier::from(exec, i));\n");
         push(@implContent, "     Base::getOwnPropertyNames(thisObject, exec, propertyNames, mode);\n");
         push(@implContent, "}\n\n");
     }
@@ -2629,7 +2641,7 @@ sub GenerateImplementation
         }
     }
 
-    if ($interface->extendedAttributes->{"IndexedGetter"}) {
+    if ($indexedGetterFunction && !$hasNumericIndexedGetter) {
         push(@implContent, "\nJSValue ${className}::indexGetter(ExecState* exec, JSValue slotBase, unsigned index)\n");
         push(@implContent, "{\n");
         push(@implContent, "    ${className}* thisObj = jsCast<$className*>(asObject(slotBase));\n");
@@ -2647,7 +2659,7 @@ sub GenerateImplementation
         }
     }
 
-    if ($interface->extendedAttributes->{"NumericIndexedGetter"}) {
+    if ($hasNumericIndexedGetter) {
         push(@implContent, "\nJSValue ${className}::getByIndex(ExecState*, unsigned index)\n");
         push(@implContent, "{\n");
         push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(this, &s_info);\n");
index c4e2c8a..180ee39 100644 (file)
@@ -63,7 +63,6 @@ Immutable
 ImplementationLacksVTable
 ImplementationNamespace=*
 ImplementedAs=*
-IndexedGetter
 InitializedByEventConstructor
 InterfaceName=*
 IsIndex
@@ -87,7 +86,6 @@ MasqueradesAsUndefined
 NamedConstructor=*
 NoInterfaceObject
 NotEnumerable
-NumericIndexedGetter
 ObjCCustomImplementation
 ObjCLegacyUnnamedParameters
 ObjCPolymorphic
index 6f06577..8df037b 100644 (file)
 
 [
     EventTarget,
-    IndexedGetter,
     MasqueradesAsUndefined
 ] interface TestEventTarget {
 
-    Node item([IsIndex] unsigned long index);
+    getter Node item([IsIndex] unsigned long index);
     getter Node (DOMString name);
 
     void addEventListener(DOMString type, 
index 97ce95e..227a4cf 100644 (file)
@@ -26,7 +26,6 @@
 
 [
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
     CustomIndexedSetter,
     JSGenerateToNativeObject,
     JSNoStaticTables,
@@ -36,4 +35,6 @@
 ] interface Float64Array : ArrayBufferView {
     Int32Array foo(Float32Array array);
     void set();
+
+    getter double (unsigned long index);
 };
index f76ce8c..e936a86 100644 (file)
 // Introduced in DOM Level 2:
 [
     CustomIsReachable,
-    IndexedGetter,
     SkipVTableValidation
 ] interface CSSRuleList {
     readonly attribute unsigned long    length;
-    CSSRule           item([Default=Undefined] optional unsigned long index);
+    getter CSSRule item([Default=Undefined] optional unsigned long index);
 };
 
index 1701541..14b6466 100644 (file)
@@ -25,7 +25,6 @@
     GenerateIsReachable,
     JSCustomGetOwnPropertySlotAndDescriptor,
     CustomNamedSetter,
-    IndexedGetter,
     CustomEnumerateProperty,
     SkipVTableValidation
 ] interface CSSStyleDeclaration {
@@ -40,7 +39,7 @@
                                     [Default=Undefined] optional DOMString priority);
 
     readonly attribute unsigned long    length;
-    DOMString          item([Default=Undefined] optional unsigned long index);
+    getter DOMString          item([Default=Undefined] optional unsigned long index);
     readonly attribute CSSRule          parentRule;
 
     // Extensions
index 9504c7b..ca51d6c 100644 (file)
 
 // Introduced in DOM Level 2:
 [
-    IndexedGetter,
     ImplementationLacksVTable
 ] interface CSSValueList : CSSValue {
     readonly attribute unsigned long    length;
-    CSSValue           item([Default=Undefined] optional unsigned long index);
+    getter CSSValue           item([Default=Undefined] optional unsigned long index);
 };
 
index 8aabb73..34f8275 100644 (file)
 [
     JSCustomHeader,
     GenerateIsReachable,
-    IndexedGetter,
     ImplementationLacksVTable
 ] interface MediaList {
 
     [TreatNullAs=NullString, TreatReturnedNullStringAs=Null, SetterRaisesException] attribute DOMString mediaText;
     readonly attribute unsigned long length;
 
-    [TreatReturnedNullStringAs=Null] DOMString item([Default=Undefined] optional unsigned long index);
+    [TreatReturnedNullStringAs=Null] getter DOMString item([Default=Undefined] optional unsigned long index);
     [RaisesException] void deleteMedium([Default=Undefined] optional DOMString oldMedium);
     [RaisesException] void appendMedium([Default=Undefined] optional DOMString newMedium);
 
index 46686c1..cc6bf3a 100644 (file)
 // Introduced in DOM Level 2:
 [
     GenerateIsReachable=ImplDocument,
-    IndexedGetter,
     ImplementationLacksVTable
 ] interface StyleSheetList {
     readonly attribute unsigned long    length;
-    StyleSheet         item([Default=Undefined] optional unsigned long index);
+    getter StyleSheet         item([Default=Undefined] optional unsigned long index);
     getter CSSStyleSheet (DOMString name);
 };
 
index 021ffa6..f9346f5 100644 (file)
@@ -24,9 +24,8 @@
  */
 
 [
-        Conditional=CSS_FILTERS,
-        IndexedGetter,
-        DoNotCheckConstants,
+    Conditional=CSS_FILTERS,
+    DoNotCheckConstants,
     ImplementationLacksVTable
 ] interface WebKitCSSFilterValue : CSSValueList {
 
@@ -49,4 +48,6 @@
 #endif
 
     readonly attribute unsigned short operationType;
+
+    getter CSSValue ([Default=Undefined] optional unsigned long index);
 };
index 19faaa5..4552a7b 100644 (file)
@@ -27,9 +27,7 @@
  */
 
 // Introduced in DOM Level ?:
-[
-    IndexedGetter
-] interface WebKitCSSKeyframesRule : CSSRule {
+interface WebKitCSSKeyframesRule : CSSRule {
 
     [TreatReturnedNullStringAs=Null, TreatNullAs=NullString] attribute DOMString name;
     readonly attribute CSSRuleList cssRules;
@@ -37,5 +35,7 @@
     void insertRule([Default=Undefined] optional DOMString rule);
     void deleteRule([Default=Undefined] optional DOMString key);
     WebKitCSSKeyframeRule findRule([Default=Undefined] optional DOMString key);
+
+    getter WebKitCSSKeyframeRule (unsigned long index);
 };
 
index 95dbb28..516211a 100644 (file)
@@ -27,8 +27,7 @@
  */
 
 [
-        IndexedGetter,
-        DoNotCheckConstants,
+    DoNotCheckConstants,
     ImplementationLacksVTable
 ] interface WebKitCSSTransformValue : CSSValueList {
 
@@ -57,5 +56,7 @@
     const unsigned short CSS_MATRIX3D    = 21;
 
     readonly attribute unsigned short operationType;
+
+    getter CSSValue ([Default=Undefined] optional unsigned long index);
 };
 
index 4efaab7..ca1fcb2 100644 (file)
  */
 
 [
-    IndexedGetter,
     ImplementationLacksVTable
 ] interface ClientRectList {
     readonly attribute unsigned long length;
-    ClientRect item([IsIndex, Default=Undefined] optional unsigned long index);
+    getter ClientRect item([IsIndex, Default=Undefined] optional unsigned long index);
     // FIXME: Fix list behavior to allow custom exceptions to be thrown.
 };
 
index 9b43ba1..f867b66 100644 (file)
     Conditional=CSS_REGIONS,
     InterfaceName=WebKitNamedFlowCollection,
     JSGenerateToJSObject,
-    IndexedGetter,
     ImplementationLacksVTable
 ] interface DOMNamedFlowCollection {
     readonly attribute unsigned long length;
-    WebKitNamedFlow item(unsigned long index);
+    getter WebKitNamedFlow item(unsigned long index);
     getter WebKitNamedFlow namedItem(DOMString name);
 };
index d10a8a6..915a66b 100644 (file)
  */
 
 [
-    IndexedGetter,
     JSCustomToNativeObject,
     JSNoStaticTables,
     ImplementationLacksVTable
 ] interface DOMStringList {
     readonly attribute unsigned long length;
-    [TreatReturnedNullStringAs=Null] DOMString item([Default=Undefined] optional unsigned long index);
+    [TreatReturnedNullStringAs=Null] getter DOMString item([Default=Undefined] optional unsigned long index);
     boolean contains([Default=Undefined] optional DOMString string);
 };
 
index 24e7f7f..ab01a04 100644 (file)
 [
     NoInterfaceObject,
     Conditional=DATA_TRANSFER_ITEMS,
-    IndexedGetter,
     JSGenerateToNativeObject,
     ImplementationLacksVTable
 ] interface DataTransferItemList {
     readonly attribute long length;
-    DataTransferItem item([Default=Undefined] optional unsigned long index);
+    getter DataTransferItem item([Default=Undefined] optional unsigned long index);
 
     void clear();
     void add(File? file);
index 5cde88d..ae68d42 100644 (file)
@@ -20,7 +20,6 @@
 
 [
     GenerateIsReachable=ImplElementRoot,
-    IndexedGetter,
     ImplementationLacksVTable
 ] interface NamedNodeMap {
 
@@ -30,7 +29,7 @@
 
     [RaisesException] Node removeNamedItem([Default=Undefined] optional DOMString name);
 
-    Node item([Default=Undefined] optional unsigned long index);
+    getter Node item([Default=Undefined] optional unsigned long index);
     
     readonly attribute unsigned long length;
 
index 2ffcc6e..ca2c034 100644 (file)
 
 [
     CustomIsReachable,
-    IndexedGetter,
     SkipVTableValidation
 ] interface NodeList {
 
-    Node item([IsIndex,Default=Undefined] optional unsigned long index);
+    getter Node item([IsIndex,Default=Undefined] optional unsigned long index);
     getter (Node or unsigned long) (DOMString name);
 
     readonly attribute unsigned long length;
index 7e6f3a0..915bfe3 100644 (file)
 
 [
     Conditional=MICRODATA,
-    IndexedGetter,
     JSGenerateToJSObject
 ] interface PropertyNodeList : NodeList {
 
     sequence<MicroDataItemValue> getValues();
-    Node item(unsigned long index);
+    getter Node item(unsigned long index);
 
     readonly attribute unsigned long length;
 };
index 811e0a7..ebbf81c 100644 (file)
 
 [
     Conditional=TOUCH_EVENTS,
-    IndexedGetter,
     ImplementationLacksVTable
 ] interface TouchList {
     readonly attribute unsigned long length;
 
-    Touch item(unsigned long index);
+    getter Touch item(unsigned long index);
 };
index 7add0c2..f0d4ce4 100644 (file)
  */
 
 [
-    IndexedGetter,
     JSNoStaticTables,
     ImplementationLacksVTable
 ] interface FileList {
     readonly attribute unsigned long length;
-    File item(unsigned long index);
+    getter File item(unsigned long index);
 };
 
index 6947b19..59d0be2 100644 (file)
  */
 
 [
-    IndexedGetter,
     JSGenerateToJSObject,
     SkipVTableValidation,
 ] interface DOMSettableTokenList : DOMTokenList {
     attribute DOMString value;
+
+    [TreatReturnedNullStringAs=Null] getter DOMString (unsigned long index);
 };
 
index d67e00f..5893129 100644 (file)
 
 [
     GenerateIsReachable=ImplElementRoot,
-    IndexedGetter,
     SkipVTableValidation
 ] interface DOMTokenList {
     readonly attribute unsigned long length;
-    [TreatReturnedNullStringAs=Null] DOMString item(unsigned long index);
+    [TreatReturnedNullStringAs=Null] getter DOMString item(unsigned long index);
     [RaisesException] boolean contains(DOMString token);
     [RaisesException] void add(DOMString... tokens);
     [RaisesException] void remove(DOMString... tokens);
index 62e913e..a8e4434 100644 (file)
  */
 
 [
-    IndexedGetter,
     CustomCall,
     MasqueradesAsUndefined,
     GenerateIsReachable=ImplOwnerNodeRoot,
 ] interface HTMLAllCollection {
     readonly attribute unsigned long length;
-    [Custom] Node item([Default=Undefined] optional unsigned long index);
+    [Custom] getter Node item([Default=Undefined] optional unsigned long index);
     [Custom] getter Node namedItem(DOMString name);
     // FIXME: This should return an HTMLAllCollection.
     NodeList tags(DOMString name);
index 716f42b..62cb050 100644 (file)
  */
 
 [
-    IndexedGetter,
     CustomToJSObject,
     GenerateIsReachable=ImplOwnerNodeRoot,
     ObjCPolymorphic,
 ] interface HTMLCollection {
     readonly attribute unsigned long length;
-    Node item([Default=Undefined] optional unsigned long index);
+    getter Node item([Default=Undefined] optional unsigned long index);
     getter Node namedItem([Default=Undefined] optional DOMString name);
 
 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
index 0c0494e..375d27f 100644 (file)
@@ -19,8 +19,8 @@
  */
 
 [
-    IndexedGetter,
     GenerateIsReachable=ImplOwnerNodeRoot,
 ] interface HTMLFormControlsCollection : HTMLCollection {
+    getter Node ([Default=Undefined] optional unsigned long index);
     [Custom] getter Node namedItem([Default=Undefined] optional DOMString name);
 };
index 86a6f74..a632dba 100644 (file)
@@ -19,7 +19,6 @@
  */
 
 [
-    IndexedGetter,
     CustomNamedGetter
 ] interface HTMLFormElement : HTMLElement {
     [Reflect=accept_charset] attribute DOMString acceptCharset;
@@ -35,6 +34,8 @@
     readonly attribute HTMLCollection elements;
     readonly attribute long length;
 
+    getter Element (unsigned long index);
+
 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
     [ImplementedAs=submitFromJavaScript] void submit();
 #else
index 49af4ef..392fb94 100644 (file)
 [
     Conditional=MICRODATA,
     JSGenerateToJSObject,
-    IndexedGetter
 ] interface HTMLPropertiesCollection : HTMLCollection {
     readonly attribute unsigned long length;
-    Node item(unsigned long index);
+    getter Node item(unsigned long index);
 
     readonly attribute DOMStringList names;
     [ImplementedAs=propertyNodeList] getter PropertyNodeList namedItem(DOMString name);
index 24e764f..6c7dced 100644 (file)
@@ -19,7 +19,6 @@
  */
 
 [
-    IndexedGetter,
     CustomIndexedSetter,
 ] interface HTMLSelectElement : HTMLElement {
     attribute [Reflect] boolean autofocus;
@@ -40,7 +39,7 @@
 #else
     [SetterRaisesException] attribute unsigned long length;
 #endif
-    Node item([IsIndex,Default=Undefined] optional unsigned long index);
+    getter Node item([IsIndex,Default=Undefined] optional unsigned long index);
     Node namedItem([Default=Undefined] optional DOMString name);
     [ObjCLegacyUnnamedParameters, RaisesException] void add([Default=Undefined] optional HTMLElement element,
                             [Default=Undefined] optional HTMLElement before);
index 200116d..6e348e4 100644 (file)
@@ -26,7 +26,8 @@
 [
     NoInterfaceObject,
     JSGenerateToJSObject,
-    IndexedGetter,
 ] interface RadioNodeList : NodeList {
     attribute DOMString value;
+
+    getter Node ([IsIndex,Default=Undefined] optional unsigned long index);
 };
index fa01c98..ea0cc15 100644 (file)
@@ -27,7 +27,6 @@
 [
     GlobalContext=WindowAndWorker,
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
     CustomIndexedSetter,
     JSGenerateToNativeObject,
     JSNoStaticTables,
@@ -42,6 +41,8 @@
     Float32Array subarray([Default=Undefined] optional long start, 
                           optional long end);
 
+    getter float (unsigned long index);
+
     // void set(Float32Array array, optional unsigned long offset);
     // void set(sequence<long> array, optional unsigned long offset);
     void set();
index c95be13..168d2c9 100644 (file)
@@ -27,7 +27,6 @@
 [
     GlobalContext=WindowAndWorker,
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
     CustomIndexedSetter,
     JSGenerateToNativeObject,
     JSNoStaticTables,
@@ -42,6 +41,8 @@
     Float64Array subarray([Default=Undefined] optional long start, 
                           optional long end);
 
+    getter double (unsigned long index);
+
     // void set(Float64Array array, optional unsigned long offset);
     // void set(sequence<long> array, optional unsigned long offset);
     void set();
index c76519a..bc44fd9 100644 (file)
@@ -26,7 +26,6 @@
 [
     GlobalContext=WindowAndWorker,
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
     CustomIndexedSetter,
     JSGenerateToNativeObject,
     JSNoStaticTables,
@@ -41,6 +40,8 @@
     Int16Array subarray([Default=Undefined] optional long start, 
                         optional long end);
 
+    getter short (unsigned long index);
+
     // void set(Int16Array array, optional unsigned long offset);
     // void set(sequence<long> array, optional unsigned long offset);
     void set();
index 1ee441c..6ff7b80 100644 (file)
@@ -27,7 +27,6 @@
 [
     GlobalContext=WindowAndWorker,
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
     CustomIndexedSetter,
     JSGenerateToNativeObject,
     JSNoStaticTables,
@@ -42,6 +41,8 @@
     Int32Array subarray([Default=Undefined] optional long start, 
                         optional long end);
 
+    getter long (unsigned long index);
+
     // void set(Int32Array array, optional unsigned long offset);
     // void set(sequence<long> array, optional unsigned long offset);
     void set();
index 035e8c4..d37c31b 100644 (file)
@@ -27,7 +27,6 @@
 [
     GlobalContext=WindowAndWorker,
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
     CustomIndexedSetter,
     JSGenerateToNativeObject,
     JSNoStaticTables,
@@ -42,6 +41,8 @@
     Int8Array subarray([Default=Undefined] optional long start, 
                        optional long end);
 
+    getter byte (unsigned long index);
+
     // void set(Int8Array array, optional unsigned long offset);
     // void set(sequence<long> array, optional unsigned long offset);
     void set();
index 06c8d5d..a482728 100644 (file)
@@ -27,7 +27,6 @@
 [
     GlobalContext=WindowAndWorker,
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
     CustomIndexedSetter,
     JSGenerateToNativeObject,
     JSNoStaticTables,
@@ -41,6 +40,8 @@
     readonly attribute unsigned long length;
     Uint16Array subarray([Default=Undefined] optional long start, optional long end);
 
+    getter unsigned short (unsigned long index);
+
     // void set(Uint16Array array, optional unsigned long offset);
     // void set(sequence<long> array, optional unsigned long offset);
     void set();
index 775cc24..467021e 100644 (file)
@@ -27,7 +27,6 @@
 [
     GlobalContext=WindowAndWorker,
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
     CustomIndexedSetter,
     JSGenerateToNativeObject,
     JSNoStaticTables,
@@ -41,6 +40,8 @@
     readonly attribute unsigned long length;
     Uint32Array subarray([Default=Undefined] optional long start, optional long end);
 
+    getter unsigned long (unsigned long index);
+
     // void set(Uint32Array array, optional unsigned long offset);
     // void set(sequence<long> array, optional unsigned long offset);
     void set();
index 3a417a5..fd5e740 100644 (file)
@@ -27,7 +27,6 @@
 [
     GlobalContext=WindowAndWorker,
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
     CustomIndexedSetter,
     JSGenerateToNativeObject,
     JSNoStaticTables,
@@ -41,6 +40,8 @@
     readonly attribute unsigned long length;
     Uint8Array subarray([Default=Undefined] optional long start, optional long end);
 
+    getter octet (unsigned long index);
+
     // void set(Uint8Array array, optional unsigned long offset);
     // void set(sequence<long> array, optional unsigned long offset);
     void set();
index 346dd1f..8e823d0 100644 (file)
@@ -27,7 +27,6 @@
 [
     GlobalContext=WindowAndWorker,
     ConstructorTemplate=TypedArray,
-    NumericIndexedGetter,
     CustomIndexedSetter,
     JSGenerateToNativeObject,
     JSNoStaticTables,
@@ -41,6 +40,8 @@
     readonly attribute unsigned long length;
     Uint8ClampedArray subarray([Default=Undefined] optional long start, optional long end);
 
+    getter octet (unsigned long index);
+
     // FIXME: Missing other setters!
     // void set(Uint8ClampedArray array, optional unsigned long offset);
     // void set(sequence<long> array, optional unsigned long offset);
index d527162..e195fa2 100644 (file)
     NoInterfaceObject,
     Conditional=VIDEO_TRACK,
     GenerateIsReachable=ImplElementRoot,
-    IndexedGetter,
     EventTarget,
     JSCustomMarkFunction
 ] interface AudioTrackList {
     readonly attribute unsigned long length;
-    AudioTrack item(unsigned long index);
+    getter AudioTrack item(unsigned long index);
     AudioTrack getTrackById(DOMString id);
 
     attribute EventListener onchange;
index 9594758..0802592 100644 (file)
 
 [
     Conditional=VIDEO_TRACK,
-    IndexedGetter,
     ImplementationLacksVTable
 ] interface TextTrackCueList {
     readonly attribute unsigned long length;
-    TextTrackCue item(unsigned long index);
+    getter TextTrackCue item(unsigned long index);
     TextTrackCue getCueById(DOMString id);
 };
 
index d9d5d32..01b0a35 100644 (file)
 [
     Conditional=VIDEO_TRACK,
     GenerateIsReachable=ImplElementRoot,
-    IndexedGetter,
     EventTarget,
     JSCustomMarkFunction
 ] interface TextTrackList {
     readonly attribute unsigned long length;
-    TextTrack item(unsigned long index);
+    getter TextTrack item(unsigned long index);
 
     attribute EventListener onaddtrack;
     attribute EventListener onremovetrack;
index b52a174..8804a52 100644 (file)
 [
     NoInterfaceObject,
     Conditional=VIDEO_TRACK & WEBVTT_REGIONS,
-    IndexedGetter,
     ImplementationLacksVTable
 ] interface TextTrackRegionList {
     readonly attribute unsigned long length;
-    TextTrackRegion item(unsigned long index);
+    getter TextTrackRegion item(unsigned long index);
     TextTrackRegion getRegionById(DOMString id);
 };
 
index e28d877..902f516 100644 (file)
     NoInterfaceObject,
     Conditional=VIDEO_TRACK,
     GenerateIsReachable=ImplElementRoot,
-    IndexedGetter,
     EventTarget,
     JSCustomMarkFunction
 ] interface VideoTrackList {
     readonly attribute unsigned long length;
-    VideoTrack item(unsigned long index);
+    getter VideoTrack item(unsigned long index);
     VideoTrack getTrackById(DOMString id);
 
     attribute EventListener onchange;
index ab70b74..4dc9ebf 100644 (file)
     NoInterfaceObject,
     Conditional=WEB_TIMING,
     Conditional=PERFORMANCE_TIMELINE,
-    IndexedGetter,
     ImplementationLacksVTable
 ] interface PerformanceEntryList {
     readonly attribute unsigned long length;
-    PerformanceEntry item(unsigned long index);
+    getter PerformanceEntry item(unsigned long index);
 };
 
index f9dcf34..4cf29ea 100644 (file)
 
 [
     NoInterfaceObject,
-    IndexedGetter,
     Conditional=INPUT_SPEECH,
     ImplementationLacksVTable
 ] interface SpeechInputResultList {
     readonly attribute unsigned long length;
-    SpeechInputResult item([IsIndex] unsigned long index);
+    getter SpeechInputResult item([IsIndex] unsigned long index);
 };
 
index 4667344..9ce52b4 100644 (file)
 
 [
     GenerateIsReachable=ImplFrame,
-    IndexedGetter,
     InterfaceName=MimeTypeArray
 ] interface DOMMimeTypeArray {
     readonly attribute unsigned long length;
-    DOMMimeType item([Default=Undefined] optional unsigned long index);
+    getter DOMMimeType item([Default=Undefined] optional unsigned long index);
     getter DOMMimeType namedItem([Default=Undefined] optional DOMString name);
 };
 
index f4ac45c..08e4a84 100644 (file)
 */
 
 [
-    IndexedGetter,
     InterfaceName=Plugin
 ] interface DOMPlugin {
     readonly attribute DOMString name;
     readonly attribute DOMString filename;
     readonly attribute DOMString description;
     readonly attribute unsigned long length;
-    DOMMimeType item([Default=Undefined] optional unsigned long index);
+    getter DOMMimeType item([Default=Undefined] optional unsigned long index);
     getter DOMMimeType namedItem([Default=Undefined] optional DOMString name);
 };
 
index b5a0fa3..4b3a4ad 100644 (file)
 
 [
     GenerateIsReachable=ImplFrame,
-    IndexedGetter,
     InterfaceName=PluginArray
 ] interface DOMPluginArray {
     readonly attribute unsigned long length;
-    DOMPlugin item([Default=Undefined] optional unsigned long index);
+    getter DOMPlugin item([Default=Undefined] optional unsigned long index);
     getter DOMPlugin namedItem([Default=Undefined] optional DOMString name);
     void refresh([Default=Undefined] optional boolean reload);
 };