From 834a8589d2df1977ee8cb1e8b277fa87d5a69a0b Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Tue, 29 Sep 2015 11:38:54 +0200 Subject: [PATCH] Remove legacycaller from two collections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As far as I can tell neither Gecko nor WebKit support legacycaller for either HTMLFormControlsCollection or HTMLOptionsCollection. Furthermore, HTMLOptionsCollection’s namedItem() cannot return a collection since it’s identical to HTMLCollection’s namedItem(). --- source | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/source b/source index 21d67a03c6b..7783f41426b 100644 --- a/source +++ b/source @@ -7081,7 +7081,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d // inherits length and 'getter' Element? item(unsigned long index); (HTMLCollection or Element)? item(DOMString name); - legacycaller getter (HTMLCollection or Element)? namedItem(DOMString name); // shadows inherited namedItem() + legacycaller getter (HTMLCollection or Element)? namedItem(DOMString name); // shadows inherited namedItem() };
@@ -7199,7 +7199,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
interface HTMLFormControlsCollection : HTMLCollection {
   // inherits length and item()
-  legacycaller getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem()
+  getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem()
 };
 
 interface RadioNodeList : NodeList {
@@ -7221,8 +7221,8 @@ interface RadioNodeList : NodeList {
 
    
element = collection . namedItem(name)
radioNodeList = collection . namedItem(name)
-
collection[name]
-
collection(name)
+
element = collection[name]
+
radioNodeList = collection[name]

Returns the item with ID or name name from the collection.

If there are multiple matching items, then a RadioNodeList object containing all those elements is returned.

@@ -7339,9 +7339,8 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E.. attributes and methods that manipulate that element's descendants.

interface HTMLOptionsCollection : HTMLCollection {
-  // inherits item()
-  attribute unsigned long length; // shadows inherited length
-  legacycaller HTMLOptionElement? (DOMString name);
+  // inherits item(), namedItem()
+  attribute unsigned long length; // shadows inherited length
   setter void (unsigned long index, HTMLOptionElement? option);
   void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
   void remove(long index);
@@ -7363,10 +7362,17 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
     

Returns the item with index index from the collection. The items are sorted in tree order.

+
collection[index] = element
+
+

When index is a greater number than the number of items in the collection, adds + new blank option elements in the corresponding container. +

When set to null, removes the item at index index from the collection.

+

When set to an option element, adds or replaces it at index index + from the collection.

+
+
element = collection . namedItem(name)
-
nodeList = collection . namedItem(name)
-
collection[name]
-
collection(name)
+
element = collection[name]

Returns the item with ID or name name from the collection.

If there are multiple matching items, then the first is returned.

@@ -7381,6 +7387,11 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..

This method will throw a HierarchyRequestError exception if element is an ancestor of the element into which it is to be inserted.

+
collection . remove(index)
+
+

Removes the item with index index from the collection.

+
+
collection . selectedIndex [ = value ]
@@ -7423,11 +7434,6 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..

The properties exposed in this way must be unenumerable.

-

The legacy caller of the - HTMLOptionsCollection interface must act like the namedItem() method on the ancestor - HTMLCollection interface.

-

When the user agent is to set the value of a new indexed property or set the value of an existing indexed property for a given property index index to a new value value, it must run the following @@ -7532,7 +7538,7 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..

interface HTMLPropertiesCollection : HTMLCollection {
   // inherits length and item()
-  getter PropertyNodeList? namedItem(DOMString name); // shadows inherited namedItem()
+  getter PropertyNodeList? namedItem(DOMString name); // shadows inherited namedItem()
   [SameObject] readonly attribute DOMString[] names;
 };