Skip to content

Commit

Permalink
[giow] (2) Change how document[name] works to be compatible with both…
Browse files Browse the repository at this point in the history
… IE (which typically are targetted with <object>) and other UAs (which typically are targetted with <embed>).

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=12091

git-svn-id: http://svn.whatwg.org/webapps@6115 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed May 6, 2011
1 parent 8e2a785 commit 499f375
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 69 deletions.
48 changes: 26 additions & 22 deletions complete.html
Expand Up @@ -9467,18 +9467,21 @@ <h4 id=dom-tree-accessors><span class=secno>3.1.4 </span><dfn>DOM tree accessors
named properties">supports named properties</span>. The
<a href=#supported-property-names>supported property names</a> at any moment consist of the
values of the <code title=attr-name>name</code> content attributes
of all the <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-embed-element>embed</a></code>,
<code><a href=#the-form-element>form</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, and
<a href=#fallback-free>fallback-free</a> <code><a href=#the-object-element>object</a></code> elements in the
<code><a href=#document>Document</a></code> that have <code title=attr-name>name</code>
content attributes, and the values of the <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes of all the
<code><a href=#the-applet-element>applet</a></code> and <a href=#fallback-free>fallback-free</a>
<code><a href=#the-object-element>object</a></code> elements in the <code><a href=#document>Document</a></code> that have
<code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes, and the values
of the <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes of all the
<code><a href=#the-img-element>img</a></code> elements in the <code><a href=#document>Document</a></code> that have
both <code title=attr-name>name</code> content attributes and
<code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes.</p>
of all the
<code><a href=#the-applet-element>applet</a></code>,
<a href=#exposed>exposed</a> <code><a href=#the-embed-element>embed</a></code>,
<code><a href=#the-form-element>form</a></code>,
<code><a href=#the-iframe-element>iframe</a></code>,
<code><a href=#the-img-element>img</a></code>, and
<a href=#exposed>exposed</a> <code><a href=#the-object-element>object</a></code>
elements in the <code><a href=#document>Document</a></code> that have <code title=attr-name>name</code> content attributes, and the values of
the <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes of all the
<code><a href=#the-applet-element>applet</a></code> and
<a href=#exposed>exposed</a> <code><a href=#the-object-element>object</a></code>
elements in the <code><a href=#document>Document</a></code> that have <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes, and the values of the
<code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes of all the
<code><a href=#the-img-element>img</a></code>
elements in the <code><a href=#document>Document</a></code> that have both <code title=attr-name>name</code> content attributes and <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes.</p>

<p>When <dfn id=dom-document-nameditem title=dom-document-namedItem>the
<code>HTMLDocument</code> object is indexed for property
Expand Down Expand Up @@ -9532,20 +9535,21 @@ <h4 id=dom-tree-accessors><span class=secno>3.1.4 </span><dfn>DOM tree accessors
with the name <var title="">name</var>, for the purposes of the
above algorithm, are those that are either:</p>

<ul><li><code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>,
<code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, or
<a href=#fallback-free>fallback-free</a> <code><a href=#the-object-element>object</a></code> elements that have a
<code title=attr-name>name</code> content attribute whose value
is <var title="">name</var>, or</li>
<ul><li><code><a href=#the-applet-element>applet</a></code>, <a href=#exposed>exposed</a> <code><a href=#the-embed-element>embed</a></code>,
<code><a href=#the-form-element>form</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, or
<a href=#exposed>exposed</a> <code><a href=#the-object-element>object</a></code> elements that have a <code title=attr-name>name</code> content attribute whose value is <var title="">name</var>, or</li>

<li><code><a href=#the-applet-element>applet</a></code> or <a href=#fallback-free>fallback-free</a>
<code><a href=#the-object-element>object</a></code> elements that have an <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute whose value is <var title="">name</var>, or</li>
<li><code><a href=#the-applet-element>applet</a></code> or <a href=#exposed>exposed</a> <code><a href=#the-object-element>object</a></code>
elements that have an <code title=attr-id><a href=#the-id-attribute>id</a></code> content
attribute whose value is <var title="">name</var>, or</li>

<li><code><a href=#the-img-element>img</a></code> elements that have an <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute whose value is <var title="">name</var>, and that have a <code title=attr-name>name</code> content attribute present also.</li>

</ul><p>An <code><a href=#the-object-element>object</a></code> element is said to be
<dfn id=fallback-free>fallback-free</dfn> if it has no <code><a href=#the-object-element>object</a></code> or
<code><a href=#the-embed-element>embed</a></code> descendants.</p>
</ul><p>An <code><a href=#the-embed-element>embed</a></code> or <code><a href=#the-object-element>object</a></code> element is said to
be <dfn id=exposed>exposed</dfn> if it has no <a href=#exposed>exposed</a>
<code><a href=#the-object-element>object</a></code> ancestor, and, for <code><a href=#the-object-element>object</a></code> elements,
is additionally either not showing its <a href=#fallback-content>fallback content</a>
or has no <code><a href=#the-object-element>object</a></code> or <code><a href=#the-embed-element>embed</a></code> descendants.</p>

</div>

Expand Down
48 changes: 26 additions & 22 deletions index
Expand Up @@ -9492,18 +9492,21 @@ interface <dfn id=htmldocument>HTMLDocument</dfn> {
named properties">supports named properties</span>. The
<a href=#supported-property-names>supported property names</a> at any moment consist of the
values of the <code title=attr-name>name</code> content attributes
of all the <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-embed-element>embed</a></code>,
<code><a href=#the-form-element>form</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, and
<a href=#fallback-free>fallback-free</a> <code><a href=#the-object-element>object</a></code> elements in the
<code><a href=#document>Document</a></code> that have <code title=attr-name>name</code>
content attributes, and the values of the <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes of all the
<code><a href=#the-applet-element>applet</a></code> and <a href=#fallback-free>fallback-free</a>
<code><a href=#the-object-element>object</a></code> elements in the <code><a href=#document>Document</a></code> that have
<code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes, and the values
of the <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes of all the
<code><a href=#the-img-element>img</a></code> elements in the <code><a href=#document>Document</a></code> that have
both <code title=attr-name>name</code> content attributes and
<code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes.</p>
of all the
<code><a href=#the-applet-element>applet</a></code>,
<a href=#exposed>exposed</a> <code><a href=#the-embed-element>embed</a></code>,
<code><a href=#the-form-element>form</a></code>,
<code><a href=#the-iframe-element>iframe</a></code>,
<code><a href=#the-img-element>img</a></code>, and
<a href=#exposed>exposed</a> <code><a href=#the-object-element>object</a></code>
elements in the <code><a href=#document>Document</a></code> that have <code title=attr-name>name</code> content attributes, and the values of
the <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes of all the
<code><a href=#the-applet-element>applet</a></code> and
<a href=#exposed>exposed</a> <code><a href=#the-object-element>object</a></code>
elements in the <code><a href=#document>Document</a></code> that have <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes, and the values of the
<code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes of all the
<code><a href=#the-img-element>img</a></code>
elements in the <code><a href=#document>Document</a></code> that have both <code title=attr-name>name</code> content attributes and <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes.</p>

<p>When <dfn id=dom-document-nameditem title=dom-document-namedItem>the
<code>HTMLDocument</code> object is indexed for property
Expand Down Expand Up @@ -9557,20 +9560,21 @@ interface <dfn id=htmldocument>HTMLDocument</dfn> {
with the name <var title="">name</var>, for the purposes of the
above algorithm, are those that are either:</p>

<ul><li><code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>,
<code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, or
<a href=#fallback-free>fallback-free</a> <code><a href=#the-object-element>object</a></code> elements that have a
<code title=attr-name>name</code> content attribute whose value
is <var title="">name</var>, or</li>
<ul><li><code><a href=#the-applet-element>applet</a></code>, <a href=#exposed>exposed</a> <code><a href=#the-embed-element>embed</a></code>,
<code><a href=#the-form-element>form</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, or
<a href=#exposed>exposed</a> <code><a href=#the-object-element>object</a></code> elements that have a <code title=attr-name>name</code> content attribute whose value is <var title="">name</var>, or</li>

<li><code><a href=#the-applet-element>applet</a></code> or <a href=#fallback-free>fallback-free</a>
<code><a href=#the-object-element>object</a></code> elements that have an <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute whose value is <var title="">name</var>, or</li>
<li><code><a href=#the-applet-element>applet</a></code> or <a href=#exposed>exposed</a> <code><a href=#the-object-element>object</a></code>
elements that have an <code title=attr-id><a href=#the-id-attribute>id</a></code> content
attribute whose value is <var title="">name</var>, or</li>

<li><code><a href=#the-img-element>img</a></code> elements that have an <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute whose value is <var title="">name</var>, and that have a <code title=attr-name>name</code> content attribute present also.</li>

</ul><p>An <code><a href=#the-object-element>object</a></code> element is said to be
<dfn id=fallback-free>fallback-free</dfn> if it has no <code><a href=#the-object-element>object</a></code> or
<code><a href=#the-embed-element>embed</a></code> descendants.</p>
</ul><p>An <code><a href=#the-embed-element>embed</a></code> or <code><a href=#the-object-element>object</a></code> element is said to
be <dfn id=exposed>exposed</dfn> if it has no <a href=#exposed>exposed</a>
<code><a href=#the-object-element>object</a></code> ancestor, and, for <code><a href=#the-object-element>object</a></code> elements,
is additionally either not showing its <a href=#fallback-content>fallback content</a>
or has no <code><a href=#the-object-element>object</a></code> or <code><a href=#the-embed-element>embed</a></code> descendants.</p>

</div>

Expand Down
57 changes: 32 additions & 25 deletions source
Expand Up @@ -9694,19 +9694,25 @@ interface <dfn>HTMLDocument</dfn> {
named properties">supports named properties</span>. The
<span>supported property names</span> at any moment consist of the
values of the <code title="attr-name">name</code> content attributes
of all the <code>applet</code>, <code>embed</code>,
<code>form</code>, <code>iframe</code>, <code>img</code>, and
<span>fallback-free</span> <code>object</code> elements in the
<code>Document</code> that have <code title="attr-name">name</code>
content attributes, and the values of the <code
title="attr-id">id</code> content attributes of all the
<code>applet</code> and <span>fallback-free</span>
<code>object</code> elements in the <code>Document</code> that have
<code title="attr-id">id</code> content attributes, and the values
of the <code title="attr-id">id</code> content attributes of all the
<code>img</code> elements in the <code>Document</code> that have
both <code title="attr-name">name</code> content attributes and
<code title="attr-id">id</code> content attributes.</p>
of all the
<code>applet</code>,
<span>exposed</span> <code>embed</code>,
<code>form</code>,
<code>iframe</code>,
<code>img</code>, and
<span>exposed</span> <code>object</code>
elements in the <code>Document</code> that have <code
title="attr-name">name</code> content attributes, and the values of
the <code title="attr-id">id</code> content attributes of all the
<code>applet</code> and
<span>exposed</span> <code>object</code>
elements in the <code>Document</code> that have <code
title="attr-id">id</code> content attributes, and the values of the
<code title="attr-id">id</code> content attributes of all the
<code>img</code>
elements in the <code>Document</code> that have both <code
title="attr-name">name</code> content attributes and <code
title="attr-id">id</code> content attributes.</p>

<p>When <dfn title="dom-document-namedItem">the
<code>HTMLDocument</code> object is indexed for property
Expand Down Expand Up @@ -9768,27 +9774,28 @@ interface <dfn>HTMLDocument</dfn> {

<ul>

<li><code>applet</code>, <code>embed</code>, <code>form</code>,
<code>iframe</code>, <code>img</code>, or
<span>fallback-free</span> <code>object</code> elements that have a
<code title="attr-name">name</code> content attribute whose value
is <var title="">name</var>, or</li>

<li><code>applet</code> or <span>fallback-free</span>
<code>object</code> elements that have an <code
title="attr-id">id</code> content attribute whose value is <var
<li><code>applet</code>, <span>exposed</span> <code>embed</code>,
<code>form</code>, <code>iframe</code>, <code>img</code>, or
<span>exposed</span> <code>object</code> elements that have a <code
title="attr-name">name</code> content attribute whose value is <var
title="">name</var>, or</li>

<li><code>applet</code> or <span>exposed</span> <code>object</code>
elements that have an <code title="attr-id">id</code> content
attribute whose value is <var title="">name</var>, or</li>

<li><code>img</code> elements that have an <code
title="attr-id">id</code> content attribute whose value is <var
title="">name</var>, and that have a <code
title="attr-name">name</code> content attribute present also.</li>

</ul>

<p>An <code>object</code> element is said to be
<dfn>fallback-free</dfn> if it has no <code>object</code> or
<code>embed</code> descendants.</p>
<p>An <code>embed</code> or <code>object</code> element is said to
be <dfn>exposed</dfn> if it has no <span>exposed</span>
<code>object</code> ancestor, and, for <code>object</code> elements,
is additionally either not showing its <span>fallback content</span>
or has no <code>object</code> or <code>embed</code> descendants.</p>

</div>

Expand Down

0 comments on commit 499f375

Please sign in to comment.