From 6150b78331facf00e4ece3bb39192aa8319ce8ad Mon Sep 17 00:00:00 2001
From: Joey Arhar
When a find-in-page search encounters a details
element which is not open
, it should search the hidden contents inside the
+ details
element as if it were open, but without adding the open
attribute. If a match inside the closed contents becomes
+ the active match, the details element as well as any other
+ details elements in the ancestor chain containing the match should be opened.
+
Issue #3539 tracks
standardizing how find-in-page underlies the currently-unspecified window.find()
API.
Set the Document
's target element to
target.
If there are one or more details
elements in the ancestor chain of
+ target which are not open
, then open
the details
element(s) containing
+ target.
+
Scroll target into view, with behavior set to "auto", block set to "start", and inline set to "nearest".
The details
element's second slot is expected
- to be removed from the rendering when the details
element does not have an open
attribute.
details
element does not have an open
attribute. The method used to hide the content is a
+ user-agent choice.
From 2ff7386cf8ccb3ae24c7fc09eb25034f4913c370 Mon Sep 17 00:00:00 2001
From: Joey Arhar When a find-in-page search encounters a details
element which is not open
, it should search the hidden contents inside the
- details
element as if it were open, but without adding the open
attribute. If a match inside the closed contents becomes
- the active match, the details element as well as any other
- details elements in the ancestor chain containing the match should be opened.
+
When a find-in-page search begins, all details
elements in the page which are not
+ open
should be rendered as if they were open so that
+ find-in-page can look for matches inside of them, but without modifying the open
attribute. After the find-in-page search is done, the
+ closed details elements should go back to not being rendered.
+
+ When find-in-page chooses a new active match, all
+ details
elements in the flat tree ancestor chain of the active match must be opened if the are not already open before
+ the active match is scrolled into view.
Issue #3539 tracks
standardizing how find-in-page underlies the currently-unspecified summary {
expected to allow the user to request the details be shown or hidden.
The details
element's second slot is expected
- to be hidden when the details
element does not have an open
attribute. The method used to hide the content is a
- user-agent choice.
details
element does not have an open
attribute.
From 738da4bfce02bcd907f435a6e1ab161c333e4254 Mon Sep 17 00:00:00 2001
From: Joey Arhar The ancestor details revealing algorithm is to run the following steps on + currentNode:
+ +If currentNode is slotted into the second slot of a details element, open the details
+ element and add the open
attribute to the details
+ element. Then, let currentNode be the details element which was just opened and go to step
+ 1.
If currentNode has a parent node, let currentNode be the parent and go to step 1.
When a find-in-page search begins, all details
elements in the page which are not
- open
should be rendered as if they were open so that
- find-in-page can look for matches inside of them, but without modifying the open
attribute. After the find-in-page search is done, the
- closed details elements should go back to not being rendered.
+
When find-in-page begins searching for matches, all details
elements in the page
+ which are not open
should have their second slot be added
+ to the rendering without modifying the open
attribute.
+ After find-in-page finishes searching for matches, those details elements should have their second
+ slot be removed from the rendering again.
details
elements in the flat tree ancestor chain of the active match must be opened if the are not already open before
- the active match is scrolled into view.
+ When find-in-page chooses a new active match, run the + ancestor details revealing algorithm on the first node in the active match.
Issue #3539 tracks
standardizing how find-in-page underlies the currently-unspecified Set the If there are one or more Run the ancestor details revealing algorithm on target.
Scroll target into view,
with behavior set to "auto", block set to "start", and inline
From 21ee9bda19c2a2db8e554072034e0dd3940dafc1 Mon Sep 17 00:00:00 2001
From: Joey Arhar If currentNode is slotted into the second slot of a details element, open the details
- element and add the While currentNode has a parent node, perform the following steps: If currentNode has a parent node, let currentNode be the parent and go to step 1. If currentNode is slotted into the second slot of a details element, add the Document
's target element to
target.details
elements in the ancestor chain of
- target which are not open
, then open
the details
element(s) containing
- target.
+
-
open
attribute to the details
- element. Then, let currentNode be the details element which was just opened and go to step
- 1.open
attribute to the details element. Then, let currentNode
+ be the details element which was just opened. Otherwise, let currentNode be the parent node of
+ currentNode.
When find-in-page chooses a new active match, perform + the following steps:
+ +Let node be the first node in the active + match.
Queue a global task on the user interaction task source given node's relevant global + object to run the ancestor details revealing algorithm on node.
Issue #3539 tracks
standardizing how find-in-page underlies the currently-unspecified window.find()
API.
While currentNode has a parent node, perform the following steps:
While currentNode has a parent node, perform the following steps:
If currentNode is slotted into the second slot of a details element, add the open
attribute to the details element. Then, let currentNode
- be the details element which was just opened. Otherwise, let currentNode be the parent node of
- currentNode.
If currentNode is slotted into the second slot of a details
+ element:
let currentNode be the details
element which
+ currentNode is slotted into.
Add the open
attribute to
+ currentNode.
Otherwise, let currentNode be the parent node of + currentNode.
open
should have their second slot be added
to the rendering without modifying the open
attribute.
After find-in-page finishes searching for matches, those details elements should have their second
- slot be removed from the rendering again.
-
- When find-in-page chooses a new active match, run the - ancestor details revealing algorithm on the first node in the active match. + slot be removed from the rendering again. This entire process must happen synchronously (and so is + not observable to users or to author code).
When find-in-page chooses a new active match, perform the following steps:
Let node be the first node in the active
+ Let node be the first node in the active
match. Queue a global task on the user interaction task source given node's relevant global
- object to run the ancestor details revealing algorithm on node. Queue a global task on the user interaction task source given
+ node's relevant global object to run the ancestor details
+ revealing algorithm on node.
Issue #3539 tracks @@ -86048,7 +86055,7 @@ new PaymentRequest(…); // Allowed to use
Set the Document
's target element to
target.
Run the ancestor details revealing algorithm on target. +
Run the ancestor details revealing algorithm on target.
Scroll target into view,
with behavior set to "auto", block set to "start", and inline
From 60e8e57f3b3d385d2d2bc2038ebb83a908c72837 Mon Sep 17 00:00:00 2001
From: Joey Arhar
Otherwise, let currentNode be the parent node of - currentNode.
The ancestor details revealing algorithm is to run the following steps on + currentNode:
+ +While currentNode has a parent node, perform the following steps:
+ +If currentNode is slotted into the second slot of a details
+ element:
Set currentNode to the details
element which
+ currentNode is slotted into.
Set the open
attribute on currentNode to the empty
+ string.
Otherwise, set currentNode to the parent node of + currentNode.
The following example shows the details
element being used to hide technical
@@ -57158,27 +57185,6 @@ interface HTMLDetailsElement : HTMLElement {
<p>Direction: North</p>
</details>
-
The ancestor details revealing algorithm is to run the following steps on - currentNode:
- -While currentNode has a parent node, perform the following steps:
If currentNode is slotted into the second slot of a details
- element:
let currentNode be the details
element which
- currentNode is slotted into.
Add the open
attribute to
- currentNode.
Otherwise, let currentNode be the parent node of - currentNode.
When find-in-page begins searching for matches, all details
elements in the page
which are not open
should have their second slot be added
to the rendering without modifying the open
attribute.
- After find-in-page finishes searching for matches, those details elements should have their second
- slot be removed from the rendering again. This entire process must happen synchronously (and so is
- not observable to users or to author code).
details
elements should have
+ their second slot be removed from the rendering again. This entire process must happen
+ synchronously (and so is not observable to users or to author code).
When find-in-page chooses a new active match, perform the following steps:
From 96b233db6432b1a1bc05e3c99207667e402ba32b Mon Sep 17 00:00:00 2001 From: Domenic DenicolaWhile currentNode has a parent node, perform the following steps:
+While currentNode has a parent node:
If currentNode is slotted into the second slot of a While currentNode has a parent node: If currentNode is slotted into the second slot of a If currentNode is slotted into the second slot of a Set currentNode to the details
From b2dc5996bc05f47cea4a00a3c081ba7faf7bf035 Mon Sep 17 00:00:00 2001
From: Joey Arhar
-
details
- element:details
+ element:
details
element which
@@ -76168,22 +76169,23 @@ body { display:none }
data-x="fip-active-match">active match
When find-in-page begins searching for matches, all details
elements in the page
- which are not open
should have their second slot be added
- to the rendering without modifying the open
attribute.
- After find-in-page finishes searching for matches, those details
elements should have
- their second slot be removed from the rendering again. This entire process must happen
+ which do not have their open
attribute set should have
+ their second slot act as if it is added to the rendering without modifying the open
attribute in order to make find-in-page able to search
+ through it. After find-in-page finishes searching for matches, those details
elements
+ should have their second slot be removed from the rendering again. This entire process must happen
synchronously (and so is not observable to users or to author code).
When find-in-page chooses a new active match, perform the following steps:
Let node be the first node in the active - match.
Let node be the first node in the active + match.
Queue a global task on the user interaction task source given - node's relevant global object to run the ancestor details - revealing algorithm on node.
Queue a global task on the user interaction task source given + node's relevant global object to run the ancestor details + revealing algorithm on node.
Issue #3539 tracks
From a3dadcf22ab0bfcfe6ccd1ad583c2c136b2ec734 Mon Sep 17 00:00:00 2001
From: Joey Arhar Set currentNode to the Set the If the details
element which
currentNode is slotted into.open
attribute on currentNode to the empty
- string.open
attribute is not set on
+ currentNode, then Set
+ the open
attribute on currentNode to the
+ empty string.
When find-in-page begins searching for matches, all details
elements in the page
- which do not have their open
attribute set should have
- their second slot act as if it is added to the rendering without modifying the open
attribute in order to make find-in-page able to search
- through it. After find-in-page finishes searching for matches, those details
elements
- should have their second slot be removed from the rendering again. This entire process must happen
- synchronously (and so is not observable to users or to author code).
open
attribute set should have the
+ skipped contents of their
+ second slot become accessible. without modifying the open
+ attribute in order to make find-in-page able to search through it. After find-in-page finishes
+ searching for matches, those details
elements should have their contents become
+ skipped again. This entire process must happen synchronously (and so is not observable to users or
+ to author code).
When find-in-page chooses a new active match, perform the following steps:
@@ -115871,9 +115872,9 @@ details[open] > summary {The details
element's first summary
element child, if any, is
expected to allow the user to request the details be shown or hidden.
The details
element's second slot is expected
- to be removed from the rendering when the details
element does not have an open
attribute.
The details
element's second slot must have the
+ style "display:block; content-visibility:hidden"
when the details
+ element does not have an open
attribute.
The details
element's first summary
element child, if any, is
expected to allow the user to request the details be shown or hidden.
The details
element's second slot must have the
- style "display:block; content-visibility:hidden"
when the details
- element does not have an open
attribute.
The details
element's second slot is expected
+ to have the style "display:block; content-visibility:hidden"
when the
+ details
element does not have an open
+ attribute.
The details
element's second slot is expected
- to have the style "display:block; content-visibility:hidden"
when the
+ to have its style attribute set to "display:block; content-visibility:hidden" when the
details
element does not have an open
- attribute.
open
attribute, the style
+ attribute is expected to be removed from the second slot.
From 07f4bd8f71f65a7305fdca89b7da74d2f6232a6a Mon Sep 17 00:00:00 2001
From: Joey Arhar details
element does not have an open
attribute. When it does have the open
attribute, the style
- attribute is expected to be removed from the second slot.
+ attribute is expected to be removed from the second slot.
From 5d1e8c7829e0ba8158655052fbda10946a7be2df Mon Sep 17 00:00:00 2001
From: Joey Arhar to style attribute
---
source | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/source b/source
index 44f3b03a976..30b4bf6ae8d 100644
--- a/source
+++ b/source
@@ -115873,9 +115873,10 @@ details[open] > summary {
expected to allow the user to request the details be shown or hidden.
The details
element's second slot is expected
- to have its style attribute set to "display:block; content-visibility:hidden" when the
- details
element does not have an open
- attribute. When it does have the open
attribute, the style
+ to have its style
attribute set to "display:block;
+ content-visibility:hidden" when the details
element does not have an open
attribute. When it does have the open
attribute, the style
attribute is expected to be removed from the second slot.
From 295912a091dd61c64803d0faaa503df64335f635 Mon Sep 17 00:00:00 2001
From: Joey Arhar
Date: Wed, 28 Jul 2021 13:10:05 -0700
Subject: [PATCH 16/17] Add flat tree
---
source | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source b/source
index 30b4bf6ae8d..c08f45cedaf 100644
--- a/source
+++ b/source
@@ -57121,7 +57121,7 @@ interface HTMLDetailsElement : HTMLElement {
Otherwise, set currentNode to the parent node of
- currentNode.
.
+ currentNode within the flat tree..
From 4054db908d715dabe996dc4e494e9f628c294305 Mon Sep 17 00:00:00 2001
From: Domenic Denicola
Date: Thu, 5 Aug 2021 14:27:32 -0400
Subject: [PATCH 17/17] Editorial tweaks
---
source | 51 ++++++++++++++++++++++++++++++++++-----------------
1 file changed, 34 insertions(+), 17 deletions(-)
diff --git a/source b/source
index c08f45cedaf..23a5b9c61ed 100644
--- a/source
+++ b/source
@@ -3757,6 +3757,12 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
- '::file-selector-button'
+
+ The following term is defined in CSS Containment:
+
+
+ - skips its contents
+
@@ -57102,7 +57108,7 @@ interface HTMLDetailsElement : HTMLElement {
-
-
While currentNode has a parent node:
+ While currentNode has a parent node within the flat tree:
-
@@ -57114,14 +57120,14 @@ interface HTMLDetailsElement : HTMLElement {
currentNode is slotted into.
If the open
attribute is not set on
- currentNode, then Set
+ currentNode, then set
the open
attribute on currentNode to the
empty string.
Otherwise, set currentNode to the parent node of
- currentNode within the flat tree.
.
+ currentNode within the flat tree.
@@ -76169,14 +76175,20 @@ body { display:none }
can navigate through the matches by advancing the active match using the find-in-page interface.
+ Issue #3539 tracks
+ standardizing how find-in-page underlies the currently-unspecified window.find()
API.
+
+ Interaction with details
+
When find-in-page begins searching for matches, all details
elements in the page
- which do not have their open
attribute set should have the
- skipped contents of their
- second slot become accessible. without modifying the open
- attribute in order to make find-in-page able to search through it. After find-in-page finishes
- searching for matches, those details
elements should have their contents become
- skipped again. This entire process must happen synchronously (and so is not observable to users or
- to author code).
+ which do not have their open
attribute set should have
+ the skipped contents of their second slot become
+ accessible, without modifying the open
attribute, in
+ order to make find-in-page able to search through it. After find-in-page finishes searching for
+ matches, those details
elements should have their contents become skipped again.
+ This entire process must happen synchronously (and so is not observable to users or to author
+ code).
When find-in-page chooses a new active match, perform
the following steps:
@@ -76190,10 +76202,6 @@ body { display:none }
revealing algorithm
Issue #3539 tracks
- standardizing how find-in-page underlies the currently-unspecified window.find()
API.
The find-in-page process is invoked in the context of a document, and may have an effect on @@ -115873,12 +115881,18 @@ details[open] > summary { expected to allow the user to request the details be shown or hidden.
The details
element's second slot is expected
- to have its style
attribute set to "display:block;
- content-visibility:hidden" when the details
element does not have an open
attribute. When it does have the style
attribute set to "display:
+ block; content-visibility: hidden;
" when the details
element does not have an
+ open
attribute. When it does have the open
attribute, the style
attribute is expected to be removed from the second slot.
Because the slots are hidden inside a shadow tree, this style
attribute is not directly visible to author code. Its impacts,
+ however, are visible. Notably, the choice of content-visibility: hidden
+ instead of, e.g., display: none
, impacts the results of various APIs that
+ query layout information.