element. If there is no
The rules in this section are complicated by the fact that although conforming
- documents will never contain nested form
elements, it is quite possible (e.g. using a
- script that performs DOM manipulation) to generate documents that have such nested elements. They
- are also complicated by rules in the HTML parser that, for historical reasons, can result in a
- form-associated element being associated with a form
element that is not
- its ancestor.
+ documents or
trees will never contain nested
form
+ elements, it is quite possible (e.g., using a script that performs DOM manipulation) to generate
+
trees that have such nested elements. They are also complicated by
+ rules in the HTML parser that, for historical reasons, can result in a
form-associated
+ element being associated with a
form
element that is not its ancestor.
When a form-associated element is created, its form owner must be
initialised to null (no owner).
@@ -52287,10 +52285,9 @@ out of 233 257 824 bytes available</meter></p>
be set to that form.
When a form-associated element or one of its ancestors is inserted into a Document
, then the user agent must
- reset the form owner of that form-associated element. The HTML parser overrides this requirement when inserting form
- controls.
+ connected">connected, then the user agent must
reset the form owner of that
+
form-associated element.
The HTML parser overrides
+ this requirement when inserting form controls.
When an element changes its parent node resulting in a form-associated element and
its form owner (if any) no longer being in the same tree, then the user
@@ -52302,7 +52299,7 @@ out of 233 257 824 bytes available</meter></p>
When a listed form-associated element has a
form
attribute and the ID of
- any of the elements in the Document
changes, then the user agent must reset the
+ any of the elements in the tree changes, then the user agent must reset the
form owner of that form-associated element.
When a listed form-associated element has a
@@ -52313,7 +52310,7 @@ out of 233 257 824 bytes available</meter></p>
form-associated element.
When the user agent is to reset the form owner of a form-associated
- element, it must run the following steps:
+ element
element, it must run the following steps:
@@ -52321,48 +52318,38 @@ out of 233 257 824 bytes available</meter></p>
If all of the following conditions are true
- - the element's form owner is not null
-
- the element is not listed or its
-
form
content attribute is not present
- - the element's form owner is its nearest
form
element ancestor
- after the change to the ancestor chain
+ - element's form owner is not null
+
- element is not listed or its
form
content attribute is not present
+ - element's form owner is its nearest
form
element
+ ancestor after the change to the ancestor chain
then do nothing, and abort these steps.
- Let the element's form owner be null.
+ Set element's form owner to null.
-
-
-
If the element is listed, has a form
content attribute, and is itself in a Document
, then run these substeps:
+ If element is listed, has a form
content attribute, and is itself in a shadow-including
+ document, then run this substep:
-
+ If the first element in element's tree, in tree
+ order, to have an ID that is case-sensitively equal to element's form
content attribute's value, is a form
element,
+ then associate the element with that
+ form
element.
- If the first element in the Document
to
- have an ID that is case-sensitively equal to the element's form
content attribute's value is a form
element,
- then associate the form-associated
- element with that form
element.
-
- Abort the "reset the form owner" steps.
-
+ case sensitive) -->
-
- Otherwise, if the form-associated element in question has an ancestor
- form
element, then associate the
- form-associated element with the nearest such ancestor form
- element.
-
- Otherwise, the element is left unassociated.
-
+ Otherwise, if element has an ancestor form
element, then associate element with the nearest such
+ ancestor form
element.
@@ -54377,8 +54364,8 @@ MIT Room 32-G524
When the autofill field name is "on
", the user agent should attempt to use heuristics to
determine the most appropriate values to offer the user, e.g. based on the element's name
value, the position of the element in the document's DOM, what
- other fields exist in the form, and so forth.
+ data-x="attr-fe-name">name value, the position of the element in its
tree,
+ what other fields exist in the form, and so forth.
When the autofill field name is one of the names of the autofill fields described above, the user agent should provide suggestions that
@@ -59599,7 +59586,6 @@ o............A....e
Otherwise queue a task to fire a simple event named load
at the script
element.
-