@@ -61902,35 +61902,6 @@ interface <dfn interface>HTMLDetailsElement</dfn> : <span>HTMLElement</span> {
61902
61902
61903
61903
</div>
61904
61904
61905
- <p>The <dfn>ancestor details revealing algorithm</dfn> is to run the following steps on
61906
- <var>currentNode</var>:</p>
61907
-
61908
- <ol>
61909
- <li>
61910
- <p>While <var>currentNode</var> has a parent node within the <span>flat tree</span>:</p>
61911
-
61912
- <ol>
61913
- <li>
61914
- <p>If <var>currentNode</var> is slotted into the second slot of a <code>details</code>
61915
- element:</p>
61916
-
61917
- <ol>
61918
- <li><p>Set <var>currentNode</var> to the <code>details</code> element which
61919
- <var>currentNode</var> is slotted into.</p></li>
61920
-
61921
- <li><p>If the <code data-x="attr-details-open">open</code> attribute is not set on
61922
- <var>currentNode</var>, then <span data-x="concept-element-attributes-set-value">set</span>
61923
- the <code data-x="attr-details-open">open</code> attribute on <var>currentNode</var> to the
61924
- empty string.</p></li>
61925
- </ol>
61926
- </li>
61927
-
61928
- <li><p>Otherwise, set <var>currentNode</var> to the parent node of
61929
- <var>currentNode</var> within the <span>flat tree</span>.</p></li>
61930
- </ol>
61931
- </li>
61932
- </ol>
61933
-
61934
61905
<div class="example">
61935
61906
61936
61907
<p>The following example shows the <code>details</code> element being used to hide technical
@@ -80071,8 +80042,7 @@ END:VCARD</pre>
80071
80042
data-x="navigate-fragid">fragment navigation</span>. When these features attempt to scroll to a
80072
80043
target which is in the element's subtree, the user agent will remove the <code
80073
80044
data-x="attr-hidden">hidden</code> attribute in order to reveal the content before scrolling to
80074
- it by running the <span>ancestor hidden-until-found revealing algorithm</span> on the target
80075
- node.</p>
80045
+ it by running the <span>ancestor revealing algorithm</span> on the target node.</p>
80076
80046
80077
80047
<div w-nodev>
80078
80048
@@ -80227,30 +80197,80 @@ END:VCARD</pre>
80227
80197
string.</p></li>
80228
80198
</ol>
80229
80199
80230
- <p>The <dfn>ancestor hidden-until-found revealing algorithm</dfn> is to run the following steps on
80231
- <var>currentNode</var>:</p>
80200
+ <p>An <dfn>ancestor reveal pair</dfn> is a <span>tuple</span> consisting of a <dfn
80201
+ data-x="ancestor-reveal-pair-node">node</dfn> and a <dfn
80202
+ data-x="ancestor-reveal-pair-string">string</dfn>.</p>
80203
+
80204
+ <p>The <dfn>ancestor revealing algorithm</dfn> given a node <var>target</var> is:</p>
80232
80205
80233
80206
<ol>
80207
+ <li><p>Let <var>ancestorsToReveal</var> be « ».</p></li>
80208
+
80209
+ <li><p>Let <var>ancestor</var> be <var>target</var>.</p></li>
80210
+
80211
+ <li>
80212
+ <p>While <var>ancestor</var> has a parent node within the <span>flat tree</span>:</p>
80213
+
80214
+ <ol>
80215
+ <li><p>If <var>ancestor</var> has a <code data-x="attr-hidden">hidden</code> attribute in the
80216
+ <span data-x="attr-hidden-until-found-state">Hidden Until Found</span> state, then <span
80217
+ data-x="list append">append</span> (<var>ancestor</var>, "<code data-x="">until-found</code>")
80218
+ to <var>ancestorsToReveal</var>.</p></li>
80219
+
80220
+ <li><p>If <var>ancestor</var> is slotted into the second slot of a <code>details</code>
80221
+ element which does not have an <code data-x="attr-details-open">open</code> attribute, then
80222
+ <span data-x="list append">append</span> (<var>ancestor</var>'s parent node, "<code
80223
+ data-x="">details</code>") to <var>ancestorsToReveal</var>.</p></li>
80224
+
80225
+ <li><p>Set <var>ancestor</var> to the parent node of <var>ancestor</var> within the
80226
+ <span>flat tree</span>.</p></li>
80227
+ </ol>
80228
+ </li>
80229
+
80234
80230
<li>
80235
- <p>While <var>currentNode</var> has a parent node within the <span>flat tree</span>:</p>
80231
+ <p>For each (<var>ancestorToReveal</var>, <var>revealType</var>) of
80232
+ <var>ancestorsToReveal</var>:</p>
80236
80233
80237
80234
<ol>
80235
+ <li><p>If <var>ancestorToReveal</var> is not <span>connected</span>, then return.</p></li>
80236
+
80238
80237
<li>
80239
- <p>If <var>currentNode</var> has the <code data-x="attr-hidden">hidden</code> attribute in the
80240
- <span data-x="attr-hidden-until-found-state">Hidden Until Found</span> state, then:</p>
80238
+ <p>If <var>revealType</var> is "<code data-x="">until-found</code>":</p>
80241
80239
80242
80240
<ol>
80241
+ <li><p>If <var>ancestorToReveal</var>'s <code data-x="attr-hidden">hidden</code> attribute is
80242
+ not in the <span data-x="attr-hidden-until-found-state">Hidden Until Found</span> state, then
80243
+ return.</p></li>
80244
+
80243
80245
<li><p><span data-x="concept-event-fire">Fire an event</span> named <code
80244
- data-x="event-beforematch">beforematch</code> at <var>currentNode </var> with the <code
80246
+ data-x="event-beforematch">beforematch</code> at <var>ancestorToReveal </var> with the <code
80245
80247
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true.</p></li>
80246
80248
80249
+ <li><p>If <var>ancestorToReveal</var> is not <span>connected</span>, then return.</p></li>
80250
+
80251
+ <li><p>If <var>ancestorToReveal</var>'s <code data-x="attr-hidden">hidden</code> attribute is
80252
+ not in the <span data-x="attr-hidden-until-found-state">Hidden Until Found</span> state, then
80253
+ return.</p></li>
80254
+
80247
80255
<li><p>Remove the <code data-x="attr-hidden">hidden</code> attribute from
80248
- <var>currentNode </var>.</p></li>
80256
+ <var>ancestorToReveal </var>.</p></li>
80249
80257
</ol>
80250
- </ li>
80258
+ <li>
80251
80259
80252
- <li><p>Set <var>currentNode</var> to the parent node of <var>currentNode</var> within the
80253
- <span>flat tree</span>.</p></li>
80260
+ <li>
80261
+ <p>Otherwise:</p>
80262
+
80263
+ <ol>
80264
+ <li><p><span>Assert</span>: <var>revealType</var> is "<code
80265
+ data-x="">details</code>".</p></li>
80266
+
80267
+ <li><p>If <var>ancestorToReveal</var> has an <code data-x="attr-details-open">open</code>
80268
+ attribute, then return.</p></li>
80269
+
80270
+ <li><p>Set <var>ancestorToReveal</var>'s <code data-x="attr-details-open">open</code>
80271
+ attribute to the empty string.</p></li>
80272
+ </ol>
80273
+ </li>
80254
80274
</ol>
80255
80275
</li>
80256
80276
</ol>
@@ -84122,15 +84142,8 @@ body { display:none }
84122
84142
match</span>.</p></li>
84123
84143
84124
84144
<li><p><span>Queue a global task</span> on the <span>user interaction task source</span> given
84125
- <var>node</var>'s <span>relevant global object</span> to run the following steps:</p>
84126
-
84127
- <ol>
84128
- <li><p>Run the <span>ancestor details revealing algorithm</span> on <var>node</var>.</p></li>
84129
-
84130
- <li><p>Run the <span>ancestor hidden-until-found revealing algorithm</span> on
84131
- <var>node</var>.</p></li>
84132
- </ol>
84133
- </li>
84145
+ <var>node</var>'s <span>relevant global object</span> to run the <span>ancestor revealing
84146
+ algorithm</span> on <var>node</var>.</p></li>
84134
84147
</ol>
84135
84148
84136
84149
<p class="warning">
@@ -106399,10 +106412,7 @@ location.href = '#foo';</code></pre>
106399
106412
106400
106413
<li><p>Set <var>document</var>'s <span>target element</span> to <var>target</var>.</p></li>
106401
106414
106402
- <li><p>Run the <span>ancestor details revealing algorithm</span> on <var>target</var>.</p></li>
106403
-
106404
- <li><p>Run the <span>ancestor hidden-until-found revealing algorithm</span> on
106405
- <var>target</var>.</p></li>
106415
+ <li><p>Run the <span>ancestor revealing algorithm</span> on <var>target</var>.</p></li>
106406
106416
106407
106417
<li><p><span data-x="scroll a target into view">Scroll <var>target</var> into view</span>,
106408
106418
with <i>behavior</i> set to "auto", <i>block</i> set to "start", and <i>inline</i>
0 commit comments