Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[ct] (2) Also make <output> have the same form-association magic, for…
… consistency. (Also, simplify how this magic is specified.) (And note the previous checkin, which means that <object> is now also affected by this magic.)

git-svn-id: http://svn.whatwg.org/webapps@2422 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Nov 20, 2008
1 parent f3fe978 commit ebc3df9
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 235 deletions.
128 changes: 17 additions & 111 deletions index
Expand Up @@ -46987,6 +46987,15 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
node</a>. (This happens in particular during the parsing of
tables with invalid content.)</p>

<p>If an element created by the <a href=#insert-an-html-element>insert an HTML element</a>
algorithm is a <a href=#form-associated-element>form-associated element</a>, and the
<a href=#form-element-pointer><code title="">form</code> element pointer</a> is not null,
and the newly created element doesn't have a <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute, the user agent must
<a href=#concept-form-association title=concept-form-association>associate</a> the newly
created element with the <code><a href=#the-form-element>form</a></code> element pointed to by the
<a href=#form-element-pointer><code title="">form</code> element pointer</a> before
inserting it wherever it is to be inserted.</p>

<hr><p>When the steps below require the UA to <dfn id=insert-a-foreign-element>insert a foreign
element</dfn> for a token, the UA must first <a href=#create-an-element-for-the-token>create an element
for the token</a> in the given namespace, and then append this
Expand Down Expand Up @@ -47899,9 +47908,9 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<!-- the normal ones -->
<dt>A start tag whose tag name is one of: "address", "article",
"aside", "blockquote", "center", "datagrid", "details", "dialog",
"dir", "div", "dl", "figure", "footer", "h1", "h2", "h3", "h4",
"h5", "h6", "header", "menu", "nav", "ol", "p", "section",
"ul"</dt>
"dir", "div", "dl", "fieldset", "figure", "footer", "h1", "h2",
"h3", "h4", "h5", "h6", "header", "menu", "nav", "ol", "p",
"section", "ul"</dt>
<dd>

<!-- As of May 2008 this doesn't match any browser exactly, but is
Expand Down Expand Up @@ -47970,25 +47979,6 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {

</dd>

<!-- as normal, but associated with the form element pointer -->
<dt>A start tag whose tag name is "fieldset"</dt>
<dd>

<p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-scope title="has
an element in scope">has a <code>p</code> element in
scope</a>, then act as if an end tag with the tag name
"p" had been seen.</p>

<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>

<p>If the <a href=#form-element-pointer><code title="">form</code> element pointer</a>
is not null and the newly created element doesn't have a <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute, then <a href=#concept-form-association title=concept-form-association>associate</a> the newly
created <code><a href=#the-fieldset-element>fieldset</a></code> element with the <code><a href=#the-form-element>form</a></code>
element pointed to by the <a href=#form-element-pointer><code title="">form</code> element
pointer</a>.</p>

</dd>

<!-- as normal, but imply </li> when there's another <li> open in weird cases -->
<dt>A start tag whose tag name is "li"</dt>
<dd>
Expand Down Expand Up @@ -48476,46 +48466,20 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {

<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>

<p>If the <a href=#form-element-pointer><code title="">form</code> element pointer</a>
is not null and the newly created element doesn't have a <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute, then <a href=#concept-form-association title=concept-form-association>associate</a> the
<code><a href=#the-button-element>button</a></code> element with the <code><a href=#the-form-element>form</a></code> element
pointed to by the <a href=#form-element-pointer><code title="">form</code> element
pointer</a>.</p>

<p>Insert a marker at the end of the <a href=#list-of-active-formatting-elements>list of active
formatting elements</a>.</p>

</dd>

<dt>A start tag token whose tag name is one of: "applet",
"marquee"</dt>
<dd>

<p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
any.</p>

<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>

<p>Insert a marker at the end of the <a href=#list-of-active-formatting-elements>list of active
formatting elements</a>.</p>

</dd>

<!-- as for applet and marquee, but interacts with the form element pointer -->
<dt>A start tag token whose tag name is "object"</dt>
"marquee", "object"</dt>
<dd>

<p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
any.</p>

<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>

<p>If the <a href=#form-element-pointer><code title="">form</code> element pointer</a>
is not null and the newly created element doesn't have a <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute, then <a href=#concept-form-association title=concept-form-association>associate</a> the newly
created <code><a href=#the-object-element>object</a></code> element with the <code><a href=#the-form-element>form</a></code>
element pointed to by the <a href=#form-element-pointer><code title="">form</code> element
pointer</a>.</p>

<p>Insert a marker at the end of the <a href=#list-of-active-formatting-elements>list of active
formatting elements</a>.</p>

Expand Down Expand Up @@ -48571,7 +48535,7 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
</dd>

<dt>A start tag whose tag name is one of: "area", "basefont",
"bgsound", "br", "embed", "img", "spacer", "wbr"</dt>
"bgsound", "br", "embed", "img", "input", "spacer", "wbr"</dt>
<dd>

<p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
Expand Down Expand Up @@ -48623,45 +48587,6 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<image> element. -->
</dd>

<dt>A start tag whose tag name is "input"</dt>
<dd>

<p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
any.</p>

<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token. Immediately
pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
elements</a>.</p>

<p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the
token's <i>self-closing flag</i></a>, if it is set.</p>

<p>If the <a href=#form-element-pointer><code title="">form</code> element pointer</a>
is not null and the newly created element doesn't have a <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute, then <a href=#concept-form-association title=concept-form-association>associate</a> the newly
created <code><a href=#the-input-element>input</a></code> element with the <code><a href=#the-form-element>form</a></code>
element pointed to by the <a href=#form-element-pointer><code title="">form</code> element
pointer</a>.</p>

</dd>

<dt>A start tag whose tag name is "label"</dt>
<dd>

<!-- XXX should this close open <label> elements? -->

<p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
any.</p>

<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>

<p>If the <a href=#form-element-pointer><code title="">form</code> element pointer</a>
is not null and the newly created element doesn't have a <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute, then <a href=#concept-form-association title=concept-form-association>associate</a> the newly
created <code><a href=#the-label-element>label</a></code> element with the <code><a href=#the-form-element>form</a></code>
element pointed to by the <a href=#form-element-pointer><code title="">form</code> element
pointer</a>.</p>

</dd>

<dt id=isindex>A start tag whose tag name is "isindex"</dt>
<dd>

Expand Down Expand Up @@ -48742,14 +48667,6 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<ol><li><p><a href=#insert-an-html-element>Insert an HTML element</a> for the
token.</li>

<li><p>If the <a href=#form-element-pointer><code title="">form</code> element
pointer</a> is not null and the newly created element doesn't
have a <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute, then
<a href=#concept-form-association title=concept-form-association>associate</a> the newly
created <code><a href=#the-textarea-element>textarea</a></code> element with the <code><a href=#the-form-element>form</a></code>
element pointed to by the <a href=#form-element-pointer><code title="">form</code>
element pointer</a>.</li>

<li><p>If the next token is a U+000A LINE FEED (LF) character
token, then ignore that token and move on to the next
one. (Newlines at the start of <code><a href=#the-textarea-element>textarea</a></code> elements are
Expand Down Expand Up @@ -48783,12 +48700,6 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {

<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>

<p>If the <a href=#form-element-pointer><code title="">form</code> element pointer</a>
is not null and the newly created element doesn't have a <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute, then <a href=#concept-form-association title=concept-form-association>associate</a> the
<code><a href=#the-select-element>select</a></code> element with the <code><a href=#the-form-element>form</a></code> element
pointed to by the <a href=#form-element-pointer><code title="">form</code> element
pointer</a>.</p>

<p>If the <a href=#insertion-mode>insertion mode</a> is one of <a href=#parsing-main-intable title="insertion mode: in table">in table</a>", "<a href=#parsing-main-incaption title="insertion mode: in caption">in caption</a>", "<a href=#parsing-main-incolgroup title="insertion mode: in column group">in column group</a>",
"<a href=#parsing-main-intbody title="insertion mode: in table body">in table
body</a>", "<a href=#parsing-main-intr title="insertion mode: in row">in
Expand Down Expand Up @@ -49224,21 +49135,16 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {

<p>If the token does not have an attribute with the name "type",
or if it does, but that attribute's value is not an <a href=#ascii-case-insensitive>ASCII
case-insensitive</a> match for the string "hidden", or, if the
<a href=#current-table>current table</a> is <a href=#tainted>tainted</a>, then: act as
described in the "anything else" entry below.</p>
case-insensitive</a> match for the string "<code title="">hidden</code>", or, if the <a href=#current-table>current table</a> is
<a href=#tainted>tainted</a>, then: act as described in the "anything
else" entry below.</p>

<p>Otherwise:</p>

<p><a href=#parse-error>Parse error</a>.</p>

<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>

<p>If the <a href=#form-element-pointer><code title="">form</code> element
pointer</a> is not null, then <span>associate</span><!--XXX
xref! --> the <code><a href=#the-input-element>input</a></code> element with the
<code><a href=#the-form-element>form</a></code> element pointed to by the <a href=#form-element-pointer><code title="">form</code> element pointer</a>.</p>

<p>Pop that <code><a href=#the-input-element>input</a></code> element off the <a href=#stack-of-open-elements>stack of
open elements</a>.</p>

Expand Down

0 comments on commit ebc3df9

Please sign in to comment.