[html5] r8446 - [giow] (3) Turns out browsers reset the form owner not just when a node is taken [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Jan 30 13:51:45 PST 2014


Author: ianh
Date: 2014-01-30 13:51:44 -0800 (Thu, 30 Jan 2014)
New Revision: 8446

Modified:
   complete.html
   index
   source
Log:
[giow] (3) Turns out browsers reset the form owner not just when a node is taken from a document, but also when it's taken from a subtree. which makes sense.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=24352
Affected topics: DOM APIs, HTML

Modified: complete.html
===================================================================
--- complete.html	2014-01-30 20:05:20 UTC (rev 8445)
+++ complete.html	2014-01-30 21:51:44 UTC (rev 8446)
@@ -38223,10 +38223,9 @@
   <a href=#reflect>reflect</a> the <code title=attr-form-accept-charset><a href=#attr-form-accept-charset>accept-charset</a></code> content
   attribute.</p>
 
-  <hr><p>The <dfn id=dom-form-elements title=dom-form-elements><code>elements</code></dfn> IDL attribute must return an
-  <code><a href=#htmlformcontrolscollection>HTMLFormControlsCollection</a></code> rooted at the <code><a href=#document>Document</a></code> node while the
-  <code><a href=#the-form-element>form</a></code> element is <a href=#in-a-document>in a <code>Document</code></a> and rooted at the
-  <code><a href=#the-form-element>form</a></code> element itself when it is not, whose filter matches <a href=#category-listed title=category-listed>listed elements</a> whose <a href=#form-owner>form owner</a> is the
+  <hr><!--CLEANUP--><p>The <dfn id=dom-form-elements title=dom-form-elements><code>elements</code></dfn> IDL attribute must return an
+  <code><a href=#htmlformcontrolscollection>HTMLFormControlsCollection</a></code> rooted at the 
+  <code><a href=#the-form-element>form</a></code> element's <a href=#home-subtree>home subtree</a>'s <a href=#root-element>root element</a>, whose filter matches <a href=#category-listed title=category-listed>listed elements</a> whose <a href=#form-owner>form owner</a> is the
   <code><a href=#the-form-element>form</a></code> element, with the exception of <code><a href=#the-input-element>input</a></code> elements whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image
   Button</a> state, which must, for historical reasons, be excluded from this particular
   collection.</p>
@@ -47205,6 +47204,7 @@
   <p class=note>This feature allows authors to work around the lack of support for nested
   <code><a href=#the-form-element>form</a></code> elements.</p>
 
+<!--CLEANUP-->
   <p>If a <a href=#category-form-attr title=category-form-attr>reassociateable</a> <a href=#form-associated-element>form-associated
   element</a> has a <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute specified, then that
   attribute's value must be the <a href=#concept-id title=concept-id>ID</a> of a <code><a href=#the-form-element>form</a></code> element in
@@ -47222,6 +47222,7 @@
   <p>When a <a href=#form-associated-element>form-associated element</a> is created, its <a href=#form-owner>form owner</a> must be
   initialized to null (no owner).</p>
 
+<!--CLEANUP-->
   <p>When a <a href=#form-associated-element>form-associated element</a> is to be <dfn id=concept-form-association title=concept-form-association>associated</dfn> with a form, its <a href=#form-owner>form owner</a> must be
   set to that form.</p>
 
@@ -47230,8 +47231,8 @@
   <a href=#reset-the-form-owner>reset the form owner</a> of that <a href=#form-associated-element>form-associated element</a>. <span class=note>The <a href=#html-parser>HTML parser</a> overrides this requirement when inserting form
   controls.</span></p>
 
-  <p>When an element is <a href=#remove-an-element-from-a-document title="remove an element from a document">removed from a
-  <code>Document</code></a> resulting in a <a href=#form-associated-element>form-associated element</a> and its
+<!--CLEANUP-->
+  <p>When an element changes its parent node resulting in a <a href=#form-associated-element>form-associated element</a> and its
   <a href=#form-owner>form owner</a> (if any) no longer being in the same <a href=#home-subtree>home subtree</a>, then the
   user agent must <a href=#reset-the-form-owner>reset the form owner</a> of that <a href=#form-associated-element>form-associated
   element</a>.</p>
@@ -47240,6 +47241,7 @@
   element</a>'s <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is set, changed, or removed,
   then the user agent must <a href=#reset-the-form-owner>reset the form owner</a> of that element.</p>
 
+<!--CLEANUP-->
   <p>When a <a href=#category-form-attr title=category-form-attr>reassociateable</a> <a href=#form-associated-element>form-associated
   element</a> has a <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute and the <a href=#concept-id title=concept-id>ID</a> of any of the elements in the <code><a href=#document>Document</a></code> changes, then the
   user agent must <a href=#reset-the-form-owner>reset the form owner</a> of that <a href=#form-associated-element>form-associated
@@ -47255,7 +47257,7 @@
   <p>When the user agent is to <dfn id=reset-the-form-owner>reset the form owner</dfn> of a <a href=#form-associated-element>form-associated
   element</a>, it must run the following steps:</p>
 
-  <ol><li><p>If the element's <a href=#form-owner>form owner</a> is not null, and either the element is not <a href=#category-form-attr title=category-form-attr>reassociateable</a> or its <code title=attr-fae-form><a href=#attr-fae-form>form</a></code>
+  <ol><!--CLEANUP--><li><p>If the element's <a href=#form-owner>form owner</a> is not null, and either the element is not <a href=#category-form-attr title=category-form-attr>reassociateable</a> or its <code title=attr-fae-form><a href=#attr-fae-form>form</a></code>
    content attribute is not present, and the element's <a href=#form-owner>form owner</a> is its nearest
    <code><a href=#the-form-element>form</a></code> element ancestor after the change to the ancestor chain, then do nothing, and
    abort these steps.</li>

Modified: index
===================================================================
--- index	2014-01-30 20:05:20 UTC (rev 8445)
+++ index	2014-01-30 21:51:44 UTC (rev 8446)
@@ -38223,10 +38223,9 @@
   <a href=#reflect>reflect</a> the <code title=attr-form-accept-charset><a href=#attr-form-accept-charset>accept-charset</a></code> content
   attribute.</p>
 
-  <hr><p>The <dfn id=dom-form-elements title=dom-form-elements><code>elements</code></dfn> IDL attribute must return an
-  <code><a href=#htmlformcontrolscollection>HTMLFormControlsCollection</a></code> rooted at the <code><a href=#document>Document</a></code> node while the
-  <code><a href=#the-form-element>form</a></code> element is <a href=#in-a-document>in a <code>Document</code></a> and rooted at the
-  <code><a href=#the-form-element>form</a></code> element itself when it is not, whose filter matches <a href=#category-listed title=category-listed>listed elements</a> whose <a href=#form-owner>form owner</a> is the
+  <hr><!--CLEANUP--><p>The <dfn id=dom-form-elements title=dom-form-elements><code>elements</code></dfn> IDL attribute must return an
+  <code><a href=#htmlformcontrolscollection>HTMLFormControlsCollection</a></code> rooted at the 
+  <code><a href=#the-form-element>form</a></code> element's <a href=#home-subtree>home subtree</a>'s <a href=#root-element>root element</a>, whose filter matches <a href=#category-listed title=category-listed>listed elements</a> whose <a href=#form-owner>form owner</a> is the
   <code><a href=#the-form-element>form</a></code> element, with the exception of <code><a href=#the-input-element>input</a></code> elements whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image
   Button</a> state, which must, for historical reasons, be excluded from this particular
   collection.</p>
@@ -47205,6 +47204,7 @@
   <p class=note>This feature allows authors to work around the lack of support for nested
   <code><a href=#the-form-element>form</a></code> elements.</p>
 
+<!--CLEANUP-->
   <p>If a <a href=#category-form-attr title=category-form-attr>reassociateable</a> <a href=#form-associated-element>form-associated
   element</a> has a <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute specified, then that
   attribute's value must be the <a href=#concept-id title=concept-id>ID</a> of a <code><a href=#the-form-element>form</a></code> element in
@@ -47222,6 +47222,7 @@
   <p>When a <a href=#form-associated-element>form-associated element</a> is created, its <a href=#form-owner>form owner</a> must be
   initialized to null (no owner).</p>
 
+<!--CLEANUP-->
   <p>When a <a href=#form-associated-element>form-associated element</a> is to be <dfn id=concept-form-association title=concept-form-association>associated</dfn> with a form, its <a href=#form-owner>form owner</a> must be
   set to that form.</p>
 
@@ -47230,8 +47231,8 @@
   <a href=#reset-the-form-owner>reset the form owner</a> of that <a href=#form-associated-element>form-associated element</a>. <span class=note>The <a href=#html-parser>HTML parser</a> overrides this requirement when inserting form
   controls.</span></p>
 
-  <p>When an element is <a href=#remove-an-element-from-a-document title="remove an element from a document">removed from a
-  <code>Document</code></a> resulting in a <a href=#form-associated-element>form-associated element</a> and its
+<!--CLEANUP-->
+  <p>When an element changes its parent node resulting in a <a href=#form-associated-element>form-associated element</a> and its
   <a href=#form-owner>form owner</a> (if any) no longer being in the same <a href=#home-subtree>home subtree</a>, then the
   user agent must <a href=#reset-the-form-owner>reset the form owner</a> of that <a href=#form-associated-element>form-associated
   element</a>.</p>
@@ -47240,6 +47241,7 @@
   element</a>'s <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is set, changed, or removed,
   then the user agent must <a href=#reset-the-form-owner>reset the form owner</a> of that element.</p>
 
+<!--CLEANUP-->
   <p>When a <a href=#category-form-attr title=category-form-attr>reassociateable</a> <a href=#form-associated-element>form-associated
   element</a> has a <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute and the <a href=#concept-id title=concept-id>ID</a> of any of the elements in the <code><a href=#document>Document</a></code> changes, then the
   user agent must <a href=#reset-the-form-owner>reset the form owner</a> of that <a href=#form-associated-element>form-associated
@@ -47255,7 +47257,7 @@
   <p>When the user agent is to <dfn id=reset-the-form-owner>reset the form owner</dfn> of a <a href=#form-associated-element>form-associated
   element</a>, it must run the following steps:</p>
 
-  <ol><li><p>If the element's <a href=#form-owner>form owner</a> is not null, and either the element is not <a href=#category-form-attr title=category-form-attr>reassociateable</a> or its <code title=attr-fae-form><a href=#attr-fae-form>form</a></code>
+  <ol><!--CLEANUP--><li><p>If the element's <a href=#form-owner>form owner</a> is not null, and either the element is not <a href=#category-form-attr title=category-form-attr>reassociateable</a> or its <code title=attr-fae-form><a href=#attr-fae-form>form</a></code>
    content attribute is not present, and the element's <a href=#form-owner>form owner</a> is its nearest
    <code><a href=#the-form-element>form</a></code> element ancestor after the change to the ancestor chain, then do nothing, and
    abort these steps.</li>

Modified: source
===================================================================
--- source	2014-01-30 20:05:20 UTC (rev 8445)
+++ source	2014-01-30 21:51:44 UTC (rev 8446)
@@ -41689,10 +41689,10 @@
 
   <hr>
 
+<!--CLEANUP-->
   <p>The <dfn data-x="dom-form-elements"><code>elements</code></dfn> IDL attribute must return an
-  <code>HTMLFormControlsCollection</code> rooted at the <code>Document</code> node while the
-  <code>form</code> element is <span>in a <code>Document</code></span> and rooted at the
-  <code>form</code> element itself when it is not, whose filter matches <span
+  <code>HTMLFormControlsCollection</code> rooted at the 
+  <code>form</code> element's <span>home subtree</span>'s <span>root element</span>, whose filter matches <span
   data-x="category-listed">listed elements</span> whose <span>form owner</span> is the
   <code>form</code> element, with the exception of <code>input</code> elements whose <code
   data-x="attr-input-type">type</code> attribute is in the <span data-x="attr-input-type-image">Image
@@ -51824,6 +51824,7 @@
   <p class="note">This feature allows authors to work around the lack of support for nested
   <code>form</code> elements.</p>
 
+<!--CLEANUP-->
   <p>If a <span data-x="category-form-attr">reassociateable</span> <span>form-associated
   element</span> has a <code data-x="attr-fae-form">form</code> attribute specified, then that
   attribute's value must be the <span data-x="concept-id">ID</span> of a <code>form</code> element in
@@ -51841,6 +51842,7 @@
   <p>When a <span>form-associated element</span> is created, its <span>form owner</span> must be
   initialized to null (no owner).</p>
 
+<!--CLEANUP-->
   <p>When a <span>form-associated element</span> is to be <dfn
   data-x="concept-form-association">associated</dfn> with a form, its <span>form owner</span> must be
   set to that form.</p>
@@ -51851,8 +51853,8 @@
   class="note">The <span>HTML parser</span> overrides this requirement when inserting form
   controls.</span></p>
 
-  <p>When an element is <span data-x="remove an element from a document">removed from a
-  <code>Document</code></span> resulting in a <span>form-associated element</span> and its
+<!--CLEANUP-->
+  <p>When an element changes its parent node resulting in a <span>form-associated element</span> and its
   <span>form owner</span> (if any) no longer being in the same <span>home subtree</span>, then the
   user agent must <span>reset the form owner</span> of that <span>form-associated
   element</span>.</p>
@@ -51861,6 +51863,7 @@
   element</span>'s <code data-x="attr-fae-form">form</code> attribute is set, changed, or removed,
   then the user agent must <span>reset the form owner</span> of that element.</p>
 
+<!--CLEANUP-->
   <p>When a <span data-x="category-form-attr">reassociateable</span> <span>form-associated
   element</span> has a <code data-x="attr-fae-form">form</code> attribute and the <span
   data-x="concept-id">ID</span> of any of the elements in the <code>Document</code> changes, then the
@@ -51879,6 +51882,7 @@
 
   <ol>
 
+<!--CLEANUP-->
    <li><p>If the element's <span>form owner</span> is not null, and either the element is not <span
    data-x="category-form-attr">reassociateable</span> or its <code data-x="attr-fae-form">form</code>
    content attribute is not present, and the element's <span>form owner</span> is its nearest




More information about the Commit-Watchers mailing list