Skip to content

Commit 1889a76

Browse files
authored
selectedcontent post-connection steps did not break out of the loop
In addition: - Remove an unused ancestor variable. - Early return for removed selectedcontent elements that are disabled.
1 parent 976d272 commit 1889a76

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

source

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59159,9 +59159,8 @@ interface <dfn interface>HTMLSelectedContentElement</dfn> : <span>HTMLElement</s
5915959159
replaces them with a new copy of the DOM structure of the <code>select</code>'s selected
5916059160
<code>option</code> element.</p>
5916159161

59162-
<p>Every <code>selectedcontent</code> element has a <dfn
59163-
data-x="selectedcontent-disabled">disabled</dfn> state, which is a boolean, initially set to
59164-
false.</p>
59162+
<p>Every <code>selectedcontent</code> element has a boolean <dfn
59163+
data-x="selectedcontent-disabled">disabled</dfn>, which is initially false.</p>
5916559164

5916659165
<div algorithm>
5916759166
<p>To <dfn>update a <code>select</code>'s <code>selectedcontent</code></dfn> given a
@@ -59199,8 +59198,8 @@ interface <dfn interface>HTMLSelectedContentElement</dfn> : <span>HTMLElement</s
5919959198
<span>descendant</span> of <var>select</var> in <span>tree order</span> if any such element
5920059199
exists; otherwise return null.</p></li>
5920159200

59202-
<li><p>If <var>selectedcontent</var> is <span data-x="selectedcontent-disabled">disabled</span>,
59203-
then return null.</p></li>
59201+
<li><p>If <var>selectedcontent</var>'s <span data-x="selectedcontent-disabled">disabled</span> is
59202+
true, then return null.</p></li>
5920459203

5920559204
<li><p>Return <var>selectedcontent</var>.</p></li>
5920659205
</ol>
@@ -59274,10 +59273,8 @@ interface <dfn interface>HTMLSelectedContentElement</dfn> : <span>HTMLElement</s
5927459273
<ol>
5927559274
<li><p>Let <var>nearestSelectAncestor</var> be null.</p></li>
5927659275

59277-
<li><p>Let <var>ancestor</var> be <var>selectedcontent</var>'s <span>parent</span>.</p></li>
59278-
5927959276
<li><p>Set <var>selectedcontent</var>'s <span data-x="selectedcontent-disabled">disabled</span>
59280-
state to false.</p></li>
59277+
to false.</p></li>
5928159278

5928259279
<li>
5928359280
<p>For each <var>ancestor</var> of <var>selectedcontent</var>'s <span
@@ -59289,20 +59286,21 @@ interface <dfn interface>HTMLSelectedContentElement</dfn> : <span>HTMLElement</s
5928959286

5929059287
<ol>
5929159288
<li><p>If <var>nearestSelectAncestor</var> is null, then set <var>nearestSelectAncestor</var>
59292-
to <var>select</var>.</p></li>
59289+
to <var>select</var> and <span>continue</span>.</p></li>
5929359290

59294-
<li><p>Otherwise, set <var>selectedcontent</var>'s <span
59295-
data-x="selectedcontent-disabled">disabled</span> state to true.</p></li>
59291+
<li><p>Set <var>selectedcontent</var>'s <span
59292+
data-x="selectedcontent-disabled">disabled</span> to true and <span>break</span>.</p></li>
5929659293
</ol>
5929759294
</li>
5929859295

5929959296
<li><p>If <var>ancestor</var> is an <code>option</code> element or a
5930059297
<code>selectedcontent</code> element, then set <var>selectedcontent</var>'s <span
59301-
data-x="selectedcontent-disabled">disabled</span> state to true.</p></li>
59298+
data-x="selectedcontent-disabled">disabled</span> to true and <span>break</span>.</p></li>
5930259299
</ol>
5930359300
</li>
5930459301

59305-
<li><p>If <var>nearestSelectAncestor</var> is null or <var>nearestSelectAncestor</var> has the
59302+
<li><p>If <var>selectedcontent</var>'s <span data-x="selectedcontent-disabled">disabled</span> is
59303+
true, <var>nearestSelectAncestor</var> is null, or <var>nearestSelectAncestor</var> has the
5930659304
<code data-x="attr-select-multiple">multiple</code> attribute, then return.</p></li>
5930759305

5930859306
<li><p>Run <span>update a <code>select</code>'s <code>selectedcontent</code></span> given
@@ -59318,6 +59316,9 @@ interface <dfn interface>HTMLSelectedContentElement</dfn> : <span>HTMLElement</s
5931859316
<var>selectedcontent</var> and <var>oldParent</var>, are:</p>
5931959317

5932059318
<ol>
59319+
<li><p>If <var>selectedcontent</var>'s <span data-x="selectedcontent-disabled">disabled</span> is
59320+
true, then return.</p></li>
59321+
5932159322
<li>
5932259323
<p>For each <var>ancestor</var> of <var>selectedcontent</var>'s <span
5932359324
data-x="ancestor">ancestors</span>, in reverse <span>tree order</span>:</p>

0 commit comments

Comments
 (0)