From 1330ad5cdb7076dab36f8efe8efd5c686a0c4933 Mon Sep 17 00:00:00 2001
From: Joey Arhar
Several of these modes, namely "in head", "in body", "in - table", and "in select", are special, in - that the other modes defer to them at various times. When the algorithm below says that the user - agent is to do something "using the rules for the m insertion - mode", where m is one of these modes, the user agent must use the rules - described under the m insertion mode's section, but must leave - the insertion mode unchanged unless the rules in m themselves - switch the insertion mode to a new value.
+ data-x="insertion mode: in body">in body", and "in + table", are special, in that the other modes defer to them at various times. When the + algorithm below says that the user agent is to do something "using the rules for the + m insertion mode", where m is one of these modes, the user agent must use + the rules described under the m insertion mode's section, but must leave + the insertion mode unchanged unless the rules in m themselves switch the + insertion mode to a new value.When the insertion mode is switched to "text" or "in table text", the original insertion @@ -124402,37 +124417,6 @@ dictionary StorageEventInit : EventInit { parsing algorithm (fragment case), set node to the context element passed to that algorithm.
-If node is a select
element, run these substeps:
If last is true, jump to the step below labeled - done.
Let ancestor be node.
Loop: If ancestor is the first node in the stack of - open elements, jump to the step below labeled done.
Let ancestor be the node before ancestor in the - stack of open elements.
If ancestor is a template
node, jump to the step below
- labeled done.
If ancestor is a table
node, switch the insertion
- mode to "in select in table"
- and return.
Jump back to the step labeled loop.
Done: Switch the insertion mode to "in select" and return.
If node is a td
or th
element and last is
false, then switch the insertion mode to "in
cell" and return.
th
marquee
object
select
template
mi
mo
template
in the HTML namespaceThe stack of open elements is said to have a particular element in select scope when it has that element in the specific scope consisting of all element types - except the following:
- -optgroup
in the HTML namespaceoption
in the HTML namespaceNothing happens if at any time any of the elements in the stack of open elements
are moved to a new location in, or removed from, the Document
tree. In particular,
the stack is not changed in this situation. This can cause, amongst other strange effects, content
@@ -129324,6 +129298,24 @@ document.body.appendChild(text);
p
element in button scope, then close a p
element.
If the stack of open elements has a
+ select
element in scope and has either an option
element in scope or an optgroup
element in scope, then:
Generate implied end tags except for option
and
+ optgroup
elements.
If the current node is not now an option
or
+ optgroup
element, this is a parse error.
While the stack of open elements has
+ an option
element in scope or has an
+ optgroup
element in scope, pop an element from the stack of open
+ elements.
Insert an HTML element for the token. Immediately pop the current node off the stack of open elements.
@@ -129393,25 +129385,70 @@ document.body.appendChild(text);If the stack of open elements has a
+ select
element in scope, then:
Parse error.
Pop elements from the stack of open elements until a select
+ element has been popped from the stack.
Reconstruct the active formatting elements, if any.
Insert an HTML element for the token.
Set the frameset-ok flag to "not ok".
+If the stack of open elements has a
+ select
element in scope and has a has
+ an option
element in scope, then:
Generate implied end tags except for option
elements.
If the current node is not now an option
element, this is a
+ parse error.
While the stack of open elements has
+ an option
element in scope, pop an element from the stack of open
+ elements.
Reconstruct the active formatting elements, if any.
-If the insertion mode is one of "in - table", "in caption", "in table body", "in row", or "in cell", then switch the - insertion mode to "in select in - table". Otherwise, switch the insertion mode to "in select".
+Insert an HTML element for the token.
If the current node is an option
element, then pop the
- current node off the stack of open elements.
If the stack of open elements has a
+ select
element in scope and has either an option
element in scope or an optgroup
element in scope, then:
Generate implied end tags except for option
and
+ optgroup
elements.
If the current node is not now an option
or
+ optgroup
element, this is a parse error.
Generate implied end tags except for optgroup
+ elements.
If the current node is not now an optgroup
element, this is a
+ parse error.
While the stack of open elements has
+ an option
element in scope or has an
+ optgroup
element in scope, pop an element from the stack of open
+ elements.
Reconstruct the active formatting elements, if any.
@@ -130539,231 +130576,6 @@ document.body.appendChild(text); same time, nor can it have neither when the close the cell algorithm is invoked. -When the user agent is to apply the rules for the "in - select" insertion mode, the user agent must handle the token as follows:
- -Parse error. Ignore the token.
-Insert the token's character.
-Insert a comment.
-Parse error. Ignore the token.
-Process the token using the rules for the "in body" insertion mode.
-If the current node is an option
element, pop that node from the
- stack of open elements.
Insert an HTML element for the token.
-If the current node is an option
element, pop that node from the
- stack of open elements.
If the current node is an optgroup
element, pop that node from the
- stack of open elements.
Insert an HTML element for the token.
-If the current node is an option
element, pop that node from the
- stack of open elements.
If the current node is an optgroup
element, pop that node from the
- stack of open elements.
Insert an HTML element for the token. Immediately pop the current - node off the stack of open elements.
- -Acknowledge the token's self-closing flag, if it is set.
-First, if the current node is an option
element, and the node
- immediately before it in the stack of open elements is an optgroup
- element, then pop the current node from the stack of open
- elements.
If the current node is an optgroup
element, then pop that node from
- the stack of open elements. Otherwise, this is a parse error; ignore
- the token.
If the current node is an option
element, then pop that node from
- the stack of open elements. Otherwise, this is a parse error; ignore
- the token.
If the stack of open elements does not have a select
element in select scope, this is a parse
- error; ignore the token. (fragment case)
Otherwise:
- -Pop elements from the stack of open elements until a select
element
- has been popped from the stack.
Reset the insertion mode appropriately.
-Parse error.
- - -If the stack of open elements does not have a select
element in select scope, ignore the token.
- (fragment case)
Otherwise:
- -Pop elements from the stack of open elements until a select
element
- has been popped from the stack.
Reset the insertion mode appropriately.
- - -It just gets treated like an end tag.
-Parse error.
- - -If the stack of open elements does not have a select
element in select scope, ignore the token.
- (fragment case)
Otherwise:
- -Pop elements from the stack of open elements until a select
element
- has been popped from the stack.
Reset the insertion mode appropriately.
- - -Reprocess the token.
-Process the token using the rules for the "in head" insertion mode.
-Process the token using the rules for the "in body" insertion mode.
-Parse error. Ignore the token.
-When the user agent is to apply the rules for the "in select in table" insertion mode, the user agent must handle the - token as follows:
- -Parse error.
- - -Pop elements from the stack of open elements until a select
element
- has been popped from the stack.
Reset the insertion mode appropriately.
- - -Reprocess the token.
-Parse error.
- -If the stack of open elements does not have an element in table scope that is an HTML - element with the same tag name as that of the token, then ignore the token.
- -Otherwise:
- - -Pop elements from the stack of open elements until a select
element
- has been popped from the stack.
Reset the insertion mode appropriately.
- - -Reprocess the token.
-Process the token using the rules for the "in select" insertion mode.
-When the user agent is to apply the rules for the "in
From b87d93d527aff0fe324e4b6b74a99cdebc0338ed Mon Sep 17 00:00:00 2001
From: Joey Arhar
If the stack of open elements has a
- select
element in scope and has either an option
element in scope or an optgroup
element in scope, then:
Generate implied end tags except for option
and
- optgroup
elements.
If the current node is not now an option
or
- optgroup
element, this is a parse error.
While the stack of open elements has
- an option
element in scope or has an
- optgroup
element in scope, pop an element from the stack of open
- elements.
select
element in scope, then generate implied end tags except
+ for option
and optgroup
elements.
Insert an HTML element for the token. Immediately pop the current node off the stack of open elements.
@@ -129405,53 +129391,33 @@ document.body.appendChild(text);If the stack of open elements has a
- select
element in scope and has a has
- an option
element in scope, then:
select
element in scope, then:
Generate implied end tags except for option
elements.
If the current node is not now an option
element, this is a
- parse error.
Generate implied end tags except for optgroup
+ elements.
While the stack of open elements has
- an option
element in scope, pop an element from the stack of open
- elements.
If the stack of open elements has an
+ option
element in scope, then this is a parse error.
Reconstruct the active formatting elements, if any.
-Insert an HTML element for the token.
If the stack of open elements has a
- select
element in scope and has either an option
element in scope or an optgroup
element in scope, then:
select
element in scope, then:
Generate implied end tags except for option
and
- optgroup
elements.
If the current node is not now an option
or
- optgroup
element, this is a parse error.
Generate implied end tags except for optgroup
- elements.
If the current node is not now an optgroup
element, this is a
- parse error.
Generate implied end tags.
While the stack of open elements has
- an option
element in scope or has an
- optgroup
element in scope, pop an element from the stack of open
- elements.
If the stack of open elements has an
+ option
element in scope or has an
+ optgroup
element in scope, then this is a parse
+ error.
Reconstruct the active formatting elements, if any.
-Insert an HTML element for the token.
If the stack of open elements has a
- select
element in scope, then generate implied end tags except
- for option
and optgroup
elements.
select
element in scope, then:
+
+ Generate implied end tags except for optgroup
+ elements.
If the stack of open elements has an
+ option
element in scope, then this is a parse error.
Insert an HTML element for the token. Immediately pop the current node off the stack of open elements.
From e07cb01a4855cf3942e53a551d7b279300ec9e54 Mon Sep 17 00:00:00 2001 From: Joey Arharoption
element in scope, then this is a parse error.
+ Otherwise, if the current node is an option
element, then pop the
+ current node off the stack of open elements.
Insert an HTML element for the token.
@@ -129425,6 +129428,18 @@ document.body.appendChild(text); error. +Otherwise:
+ +If the current node is an option
element, and the node
+ immediately before it in the stack of open elements is an optgroup
+ element, then pop the current node from the stack of open
+ elements.
If the current node is an optgroup
element, then pop that node
+ from the stack of open elements.
Insert an HTML element for the token.
From 5117d13c8c2f783575ea4ea0837b4d3a266a3ffe Mon Sep 17 00:00:00 2001 From: Joey Arharoption
element in scope, then this is a parse error.
- Otherwise, if the current node is an option
element, then pop the
- current node off the stack of open elements.
Otherwise:
+ +If the current node is an option
element, then pop the
+ current node off the stack of open elements.
Reconstruct the active formatting elements, if any.
Insert an HTML element for the token.
@@ -129438,6 +129444,8 @@ document.body.appendChild(text);If the current node is an optgroup
element, then pop that node
from the stack of open elements.
Reconstruct the active formatting elements, if any.
Insert an HTML element for the token.
From 33370b759c686345d7407f1f9855a16e30a8a7bf Mon Sep 17 00:00:00 2001 From: Joey ArharIf the current node is an option
element, then pop the
current node off the stack of open elements.
Reconstruct the active formatting elements, if any.
Insert an HTML element for the token.
@@ -129437,15 +129435,11 @@ document.body.appendChild(text);Otherwise:
If the current node is an option
element, and the node
- immediately before it in the stack of open elements is an optgroup
- element, then pop the current node from the stack of open
- elements.
If the current node is an optgroup
element, then pop that node
- from the stack of open elements.
If the current node is an option
element, then pop the
+ current node from the stack of open elements.
Reconstruct the active formatting elements, if any.
If the current node is an optgroup
element, then pop the
+ current node from the stack of open elements.
Insert an HTML element for the token.
From 76e0d7fc12916b84d65de4331da8bb6dc062a16d Mon Sep 17 00:00:00 2001 From: Joey ArharFor each ancestor of option's For each ancestor of insertedOption's ancestors:
If ancestor is a select
element, then run the selectedness
- setting algorithm given select and return.
If ancestor is a select
element, then run the selectedness
- setting algorithm given select and return.
If the current node is an option
element, then pop the
current node off the stack of open elements.
Reconstruct the active formatting elements, if any.
Insert an HTML element for the token.
@@ -129440,6 +129442,8 @@ document.body.appendChild(text);If the current node is an optgroup
element, then pop the
current node from the stack of open elements.
Reconstruct the active formatting elements, if any.
Insert an HTML element for the token.
From b8ba8e6440876480dcfce31f412e1c3376bd5613 Mon Sep 17 00:00:00 2001 From: Joey ArharIf the current node is an option
element, then pop the
current node from the stack of open elements.
If the current node is an optgroup
element, then pop the
- current node from the stack of open elements.
Reconstruct the active formatting elements, if any.
If the current node is an option
element, then pop the
current node off the stack of open elements.
Reconstruct the active formatting elements, if any.
Reconstruct the active formatting elements, if any.
+Insert an HTML element for the token.
@@ -129434,14 +129434,10 @@ document.body.appendChild(text); error. -Otherwise:
+Otherwise, if the current node is an option
element, then pop the
+ current node from the stack of open elements.
If the current node is an option
element, then pop the
- current node from the stack of open elements.
Reconstruct the active formatting elements, if any.
Reconstruct the active formatting elements, if any.
Insert an HTML element for the token.
From e615f9bb2728899114b87c23c30b280f06763f63 Mon Sep 17 00:00:00 2001 From: Joey Arharselect
element in scope, then:
Generate implied end tags except for optgroup
- elements.
Generate implied end tags.
If the stack of open elements has an
- option
element in scope, then this is a parse error.
option
element in scope or has an
+ optgroup
element in scope, then this is a parse
+ error.
Insert an HTML element for the token. Immediately pop the current
From 53fa2f49328cc1dc07216e027b37f40438be79eb Mon Sep 17 00:00:00 2001
From: Joey Arhar For each ancestor of insertedOption's ancestors:
If ancestor is a For each ancestor of oldParent's inclusive ancestors:select
element, then run the selectedness
@@ -54166,7 +54166,7 @@ interface HTMLOptionElement : HTMLElement {
in reverse tree order:
If ancestor is a select
element, then run the selectedness
From 5c0627dd258647c279d1e563c260df68a08fbf9c Mon Sep 17 00:00:00 2001
From: Joey Arhar
Reconstruct the active formatting elements, if any.
+Otherwise:
-Insert an HTML element for the token.
+Reconstruct the active formatting elements, if any.
Set the frameset-ok flag to "not ok".
+Insert an HTML element for the token.
Set the frameset-ok flag to "not ok".