Skip to content

Commit

Permalink
[giow] (3) Remove duplication in IDL
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23198
Affected topics: DOM APIs

git-svn-id: http://svn.whatwg.org/webapps@8193 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 23, 2013
1 parent 297bc37 commit a251343
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
8 changes: 4 additions & 4 deletions complete.html
Expand Up @@ -7657,7 +7657,7 @@ <h5 id=htmloptionscollection-0><span class=secno>2.7.2.3 </span>HTMLOptionsColle
<pre class=idl>interface <dfn id=htmloptionscollection>HTMLOptionsCollection</dfn> : <a href=#htmlcollection>HTMLCollection</a> {
// inherits <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item</a>()
attribute unsigned long <a href=#dom-htmloptionscollection-length title=dom-HTMLOptionsCollection-length>length</a>; // shadows inherited length
legacycaller getter <a href=#htmloptionelement>HTMLOptionElement</a>? <a href=#dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem>namedItem</a>(DOMString name); // shadows inherited namedItem()
<a href=#dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem>legacycaller</a> <a href=#htmloptionelement>HTMLOptionElement</a>? (DOMString name);
<a href=#dom-htmloptionscollection-setter title=dom-HTMLOptionsCollection-setter>setter creator</a> void (unsigned long index, <a href=#htmloptionelement>HTMLOptionElement</a>? option);
void <a href=#dom-htmloptionscollection-add title=dom-HTMLOptionsCollection-add>add</a>((<a href=#htmloptionelement>HTMLOptionElement</a> or <a href=#htmloptgroupelement>HTMLOptGroupElement</a>) element, optional (<a href=#htmlelement>HTMLElement</a> or long)? before = null);
void <a href=#dom-htmloptionscollection-remove title=dom-HTMLOptionsCollection-remove>remove</a>(long index);
Expand Down Expand Up @@ -7731,9 +7731,9 @@ <h5 id=htmloptionscollection-0><span class=secno>2.7.2.3 </span>HTMLOptionsColle
duplicates, with the <code title=attr-id><a href=#the-id-attribute>id</a></code> of an element preceding its <code title=attr-option-name><a href=#attr-option-name>name</a></code> if it contributes both, they differ from each other, and neither is
the duplicate of an earlier entry.</p>

<p>The <dfn id=dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem><code>namedItem(<var title="">name</var>)</code></dfn> method must return the first node in the collection that has
either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code title=attr-option-name><a href=#attr-option-name>name</a></code> attribute equal to <var title="">name</var>, if there is one and if <var title="">name</var> is not the empty string;
otherwise, it must return null.</p>
<p>The <dfn id=dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem>legacy caller</dfn> of the
<code><a href=#htmloptionscollection>HTMLOptionsCollection</a></code> interface must act like the <code title=dom-HTMLCollection-namedItem>namedItem()</code> method on the ancestor
<code><a href=#htmlcollection>HTMLCollection</a></code> interface.</p>

<p>When the user agent is to <dfn id=dom-htmloptionscollection-setter title=dom-HTMLOptionsCollection-setter>set the value of a new
indexed property</dfn> for a given property index <var title="">index</var> to a new value <var title="">value</var>, it must run the following algorithm:</p>
Expand Down
8 changes: 4 additions & 4 deletions index
Expand Up @@ -7657,7 +7657,7 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
<pre class=idl>interface <dfn id=htmloptionscollection>HTMLOptionsCollection</dfn> : <a href=#htmlcollection>HTMLCollection</a> {
// inherits <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item</a>()
attribute unsigned long <a href=#dom-htmloptionscollection-length title=dom-HTMLOptionsCollection-length>length</a>; // shadows inherited length
legacycaller getter <a href=#htmloptionelement>HTMLOptionElement</a>? <a href=#dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem>namedItem</a>(DOMString name); // shadows inherited namedItem()
<a href=#dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem>legacycaller</a> <a href=#htmloptionelement>HTMLOptionElement</a>? (DOMString name);
<a href=#dom-htmloptionscollection-setter title=dom-HTMLOptionsCollection-setter>setter creator</a> void (unsigned long index, <a href=#htmloptionelement>HTMLOptionElement</a>? option);
void <a href=#dom-htmloptionscollection-add title=dom-HTMLOptionsCollection-add>add</a>((<a href=#htmloptionelement>HTMLOptionElement</a> or <a href=#htmloptgroupelement>HTMLOptGroupElement</a>) element, optional (<a href=#htmlelement>HTMLElement</a> or long)? before = null);
void <a href=#dom-htmloptionscollection-remove title=dom-HTMLOptionsCollection-remove>remove</a>(long index);
Expand Down Expand Up @@ -7731,9 +7731,9 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
duplicates, with the <code title=attr-id><a href=#the-id-attribute>id</a></code> of an element preceding its <code title=attr-option-name><a href=#attr-option-name>name</a></code> if it contributes both, they differ from each other, and neither is
the duplicate of an earlier entry.</p>

<p>The <dfn id=dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem><code>namedItem(<var title="">name</var>)</code></dfn> method must return the first node in the collection that has
either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code title=attr-option-name><a href=#attr-option-name>name</a></code> attribute equal to <var title="">name</var>, if there is one and if <var title="">name</var> is not the empty string;
otherwise, it must return null.</p>
<p>The <dfn id=dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem>legacy caller</dfn> of the
<code><a href=#htmloptionscollection>HTMLOptionsCollection</a></code> interface must act like the <code title=dom-HTMLCollection-namedItem>namedItem()</code> method on the ancestor
<code><a href=#htmlcollection>HTMLCollection</a></code> interface.</p>

<p>When the user agent is to <dfn id=dom-htmloptionscollection-setter title=dom-HTMLOptionsCollection-setter>set the value of a new
indexed property</dfn> for a given property index <var title="">index</var> to a new value <var title="">value</var>, it must run the following algorithm:</p>
Expand Down
11 changes: 5 additions & 6 deletions source
Expand Up @@ -7234,7 +7234,7 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
<pre class="idl">interface <dfn>HTMLOptionsCollection</dfn> : <span>HTMLCollection</span> {
// inherits <span title="dom-HTMLCollection-item">item</span>()
attribute unsigned long <span title="dom-HTMLOptionsCollection-length">length</span>; // shadows inherited length
legacycaller getter <span>HTMLOptionElement</span>? <span title="dom-HTMLOptionsCollection-namedItem">namedItem</span>(DOMString name); // shadows inherited namedItem()
<span title="dom-HTMLOptionsCollection-namedItem">legacycaller</span> <span>HTMLOptionElement</span>? (DOMString name);
<span title="dom-HTMLOptionsCollection-setter">setter creator</span> void (unsigned long index, <span>HTMLOptionElement</span>? option);
void <span title="dom-HTMLOptionsCollection-add">add</span>((<span>HTMLOptionElement</span> or <span>HTMLOptGroupElement</span>) element, optional (<span>HTMLElement</span> or long)? before = null);
void <span title="dom-HTMLOptionsCollection-remove">remove</span>(long index);
Expand Down Expand Up @@ -7320,11 +7320,10 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
title="attr-option-name">name</code> if it contributes both, they differ from each other, and neither is
the duplicate of an earlier entry.</p>

<p>The <dfn title="dom-HTMLOptionsCollection-namedItem"><code>namedItem(<var
title="">name</var>)</code></dfn> method must return the first node in the collection that has
either an <code title="attr-id">id</code> attribute or a <code
title="attr-option-name">name</code> attribute equal to <var title="">name</var>, if there is one and if <var title="">name</var> is not the empty string;
otherwise, it must return null.</p>
<p>The <dfn title="dom-HTMLOptionsCollection-namedItem">legacy caller</dfn> of the
<code>HTMLOptionsCollection</code> interface must act like the <code
title="dom-HTMLCollection-namedItem">namedItem()</code> method on the ancestor
<code>HTMLCollection</code> interface.</p>

<p>When the user agent is to <dfn title="dom-HTMLOptionsCollection-setter">set the value of a new
indexed property</dfn> for a given property index <var title="">index</var> to a new value <var
Expand Down

0 comments on commit a251343

Please sign in to comment.