[html5] r2422 - [ct] (2) Also make <output> have the same form-association magic, for consistenc [...]
whatwg at whatwg.org
whatwg at whatwg.org
Wed Nov 19 18:03:29 PST 2008
Author: ianh
Date: 2008-11-19 18:03:28 -0800 (Wed, 19 Nov 2008)
New Revision: 2422
Modified:
index
source
Log:
[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.)
Modified: index
===================================================================
--- index 2008-11-20 01:51:23 UTC (rev 2421)
+++ index 2008-11-20 02:03:28 UTC (rev 2422)
@@ -46987,6 +46987,15 @@
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
@@ -47899,9 +47908,9 @@
<!-- 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
@@ -47970,25 +47979,6 @@
</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>
@@ -48476,19 +48466,13 @@
<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>
+ "marquee", "object"</dt>
<dd>
<p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
@@ -48501,26 +48485,6 @@
</dd>
- <!-- as for applet and marquee, but interacts with the form element pointer -->
- <dt>A start tag token whose tag name is "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>
-
- </dd>
-
<dt>An end tag token whose tag name is one of: "applet", "button",
"marquee", "object"</dt>
<dd>
@@ -48571,7 +48535,7 @@
</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
@@ -48623,45 +48587,6 @@
<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>
@@ -48742,14 +48667,6 @@
<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
@@ -48783,12 +48700,6 @@
<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
@@ -49224,9 +49135,9 @@
<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>
@@ -49234,11 +49145,6 @@
<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>
Modified: source
===================================================================
--- source 2008-11-20 01:51:23 UTC (rev 2421)
+++ source 2008-11-20 02:03:28 UTC (rev 2422)
@@ -53602,6 +53602,16 @@
node</span>. (This happens in particular during the parsing of
tables with invalid content.)</p>
+ <p>If an element created by the <span>insert an HTML element</span>
+ algorithm is a <span>form-associated element</span>, and the
+ <span><code title="">form</code> element pointer</span> is not null,
+ and the newly created element doesn't have a <code
+ title="attr-fae-form">form</code> attribute, the user agent must
+ <span title="concept-form-association">associate</span> the newly
+ created element with the <code>form</code> element pointed to by the
+ <span><code title="">form</code> element pointer</span> before
+ inserting it wherever it is to be inserted.</p>
+
<hr>
<p>When the steps below require the UA to <dfn>insert a foreign
@@ -54606,9 +54616,9 @@
<!-- 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
@@ -54677,27 +54687,6 @@
</dd>
- <!-- as normal, but associated with the form element pointer -->
- <dt>A start tag whose tag name is "fieldset"</dt>
- <dd>
-
- <p>If the <span>stack of open elements</span> <span title="has
- an element in scope">has a <code>p</code> element in
- scope</span>, then act as if an end tag with the tag name
- "p" had been seen.</p>
-
- <p><span>Insert an HTML element</span> for the token.</p>
-
- <p>If the <span><code title="">form</code> element pointer</span>
- is not null and the newly created element doesn't have a <code
- title="attr-fae-form">form</code> attribute, then <span
- title="concept-form-association">associate</span> the newly
- created <code>fieldset</code> element with the <code>form</code>
- element pointed to by the <span><code title="">form</code> element
- pointer</span>.</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>
@@ -55237,21 +55226,13 @@
<p><span>Insert an HTML element</span> for the token.</p>
- <p>If the <span><code title="">form</code> element pointer</span>
- is not null and the newly created element doesn't have a <code
- title="attr-fae-form">form</code> attribute, then <span
- title="concept-form-association">associate</span> the
- <code>button</code> element with the <code>form</code> element
- pointed to by the <span><code title="">form</code> element
- pointer</span>.</p>
-
<p>Insert a marker at the end of the <span>list of active
formatting elements</span>.</p>
</dd>
<dt>A start tag token whose tag name is one of: "applet",
- "marquee"</dt>
+ "marquee", "object"</dt>
<dd>
<p><span>Reconstruct the active formatting elements</span>, if
@@ -55264,28 +55245,6 @@
</dd>
- <!-- as for applet and marquee, but interacts with the form element pointer -->
- <dt>A start tag token whose tag name is "object"</dt>
- <dd>
-
- <p><span>Reconstruct the active formatting elements</span>, if
- any.</p>
-
- <p><span>Insert an HTML element</span> for the token.</p>
-
- <p>If the <span><code title="">form</code> element pointer</span>
- is not null and the newly created element doesn't have a <code
- title="attr-fae-form">form</code> attribute, then <span
- title="concept-form-association">associate</span> the newly
- created <code>object</code> element with the <code>form</code>
- element pointed to by the <span><code title="">form</code> element
- pointer</span>.</p>
-
- <p>Insert a marker at the end of the <span>list of active
- formatting elements</span>.</p>
-
- </dd>
-
<dt>An end tag token whose tag name is one of: "applet", "button",
"marquee", "object"</dt>
<dd>
@@ -55342,7 +55301,7 @@
</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><span>Reconstruct the active formatting elements</span>, if
@@ -55394,49 +55353,6 @@
<image> element. -->
</dd>
- <dt>A start tag whose tag name is "input"</dt>
- <dd>
-
- <p><span>Reconstruct the active formatting elements</span>, if
- any.</p>
-
- <p><span>Insert an HTML element</span> for the token. Immediately
- pop the <span>current node</span> off the <span>stack of open
- elements</span>.</p>
-
- <p><span title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></span>, if it is set.</p>
-
- <p>If the <span><code title="">form</code> element pointer</span>
- is not null and the newly created element doesn't have a <code
- title="attr-fae-form">form</code> attribute, then <span
- title="concept-form-association">associate</span> the newly
- created <code>input</code> element with the <code>form</code>
- element pointed to by the <span><code title="">form</code> element
- pointer</span>.</p>
-
- </dd>
-
- <dt>A start tag whose tag name is "label"</dt>
- <dd>
-
- <!-- XXX should this close open <label> elements? -->
-
- <p><span>Reconstruct the active formatting elements</span>, if
- any.</p>
-
- <p><span>Insert an HTML element</span> for the token.</p>
-
- <p>If the <span><code title="">form</code> element pointer</span>
- is not null and the newly created element doesn't have a <code
- title="attr-fae-form">form</code> attribute, then <span
- title="concept-form-association">associate</span> the newly
- created <code>label</code> element with the <code>form</code>
- element pointed to by the <span><code title="">form</code> element
- pointer</span>.</p>
-
- </dd>
-
<dt id="isindex">A start tag whose tag name is "isindex"</dt>
<dd>
@@ -55521,14 +55437,6 @@
<li><p><span>Insert an HTML element</span> for the
token.</p></li>
- <li><p>If the <span><code title="">form</code> element
- pointer</span> is not null and the newly created element doesn't
- have a <code title="attr-fae-form">form</code> attribute, then
- <span title="concept-form-association">associate</span> the newly
- created <code>textarea</code> element with the <code>form</code>
- element pointed to by the <span><code title="">form</code>
- element pointer</span>.</p></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>textarea</code> elements are
@@ -55565,14 +55473,6 @@
<p><span>Insert an HTML element</span> for the token.</p>
- <p>If the <span><code title="">form</code> element pointer</span>
- is not null and the newly created element doesn't have a <code
- title="attr-fae-form">form</code> attribute, then <span
- title="concept-form-association">associate</span> the
- <code>select</code> element with the <code>form</code> element
- pointed to by the <span><code title="">form</code> element
- pointer</span>.</p>
-
<p>If the <span>insertion mode</span> is one of <span
title="insertion mode: in table">in table</span>", "<span
title="insertion mode: in caption">in caption</span>", "<span
@@ -56047,9 +55947,10 @@
<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 <span>ASCII
- case-insensitive</span> match for the string "hidden", or, if the
- <span>current table</span> is <span>tainted</span>, then: act as
- described in the "anything else" entry below.</p>
+ case-insensitive</span> match for the string "<code
+ title="">hidden</code>", or, if the <span>current table</span> is
+ <span>tainted</span>, then: act as described in the "anything
+ else" entry below.</p>
<p>Otherwise:</p>
@@ -56057,12 +55958,6 @@
<p><span>Insert an HTML element</span> for the token.</p>
- <p>If the <span><code title="">form</code> element
- pointer</span> is not null, then <span>associate</span><!--XXX
- xref! --> the <code>input</code> element with the
- <code>form</code> element pointed to by the <span><code
- title="">form</code> element pointer</span>.</p>
-
<p>Pop that <code>input</code> element off the <span>stack of
open elements</span>.</p>
More information about the Commit-Watchers
mailing list