Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand <details> for find-in-page and element fragments #6466

Merged
merged 18 commits into from
Aug 6, 2021
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -56988,6 +56988,18 @@ interface <dfn>HTMLDetailsElement</dfn> : <span>HTMLElement</span> {
&lt;p>Direction: North&lt;/p>
&lt;/details></code></pre>

<p>The <dfn>ancestor details revealing algorithm</dfn> is to run the following steps on
domenic marked this conversation as resolved.
Show resolved Hide resolved
currentNode:</p>
domenic marked this conversation as resolved.
Show resolved Hide resolved

<ol>
<li><p>While currentNode has a parent node, perform the following steps:</p></li>
josepharhar marked this conversation as resolved.
Show resolved Hide resolved
domenic marked this conversation as resolved.
Show resolved Hide resolved

<li><p>If currentNode is slotted into the second slot of a details element, add the <code
data-x="attr-details-open">open</code> attribute to the details element. Then, let currentNode
domenic marked this conversation as resolved.
Show resolved Hide resolved
be the details element which was just opened. Otherwise, let currentNode be the parent node of
currentNode.</li></p>
</ol>
domenic marked this conversation as resolved.
Show resolved Hide resolved

</div>

domenic marked this conversation as resolved.
Show resolved Hide resolved

Expand Down Expand Up @@ -75340,6 +75352,27 @@ body { display:none }
can navigate through the <span data-x="fip-matches">matches</span> by advancing the <span
data-x="fip-active-match">active match</span> using the <span>find-in-page interface</span>.</p>

<p>When find-in-page begins searching for matches, all <code>details</code> elements in the page
which are not <code data-x="attr-details-open">open</code> should have their second slot be added
to the rendering without modifying the <code data-x="attr-details-open">open</code> attribute.
After find-in-page finishes searching for matches, those details elements should have their second
slot be removed from the rendering again.</p>
domenic marked this conversation as resolved.
Show resolved Hide resolved

<p>When find-in-page chooses a new <span data-x="fip-active-match">active match</span>, run the
<span>ancestor details revealing algorithm</span> on the first node in the <span
domenic marked this conversation as resolved.
Show resolved Hide resolved
data-x="fip-active-match">active match</span>.

<p>When find-in-page chooses a new <span data-x="fip-active-match">active match</span>, perform
the following steps:</p>

domenic marked this conversation as resolved.
Show resolved Hide resolved
<ol>
<li><p>Let node be the first node in the <span data-x="fip-active-match">active
domenic marked this conversation as resolved.
Show resolved Hide resolved
match</span>.</p></li>

<li><p>Queue a global task on the user interaction task source given node's relevant global
domenic marked this conversation as resolved.
Show resolved Hide resolved
object to run the <span>ancestor details revealing algorithm</span> on node.</p></li>
</ol>

<p class="XXX"><a href="https://github.com/whatwg/html/issues/3539">Issue #3539</a> tracks
standardizing how <span>find-in-page</span> underlies the currently-unspecified <code
data-x="">window.find()</code> API.</p>
Expand Down Expand Up @@ -86015,6 +86048,8 @@ new PaymentRequest(&hellip;); // Allowed to use
<li><p>Set the <code>Document</code>'s <span>target element</span> to
<var>target</var>.</p></li>

<li><p>Run the <span>ancestor details revealing algorithm</span> on <var>target</var>.
domenic marked this conversation as resolved.
Show resolved Hide resolved

<li><p><span data-x="scroll an element into view">Scroll <var>target</var> into view</span>,
with <var>behavior</var> set to "auto", <var>block</var> set to "start", and <var>inline</var>
set to "nearest". <ref spec=CSSOMVIEW></p></li>
Expand Down