From 15661f3959b8014320ab6bfc670823859660faf1 Mon Sep 17 00:00:00 2001 From: Vladimir Levin Date: Wed, 1 Nov 2023 19:26:16 -0400 Subject: [PATCH 1/2] Add more checkVisibility dictinoary properties --- cssom-view-1/Overview.bs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/cssom-view-1/Overview.bs b/cssom-view-1/Overview.bs index 9522d10b8b4..7da29df336b 100644 --- a/cssom-view-1/Overview.bs +++ b/cssom-view-1/Overview.bs @@ -1161,6 +1161,9 @@ dictionary ScrollIntoViewOptions : ScrollOptions { dictionary CheckVisibilityOptions { boolean checkOpacity = false; boolean checkVisibilityCSS = false; + boolean contentVisibilityAuto = false; + boolean opacityProperty = false; + boolean visibilityProperty = false; }; partial interface Element { @@ -1246,15 +1249,25 @@ Note: The {{DOMRect}} object returned by {{Element/getBoundingClientRect()}} is 1. If an ancestor of |this| in the [=flat tree=] has ''content-visibility: hidden'', return false. - 1. If the {{CheckVisibilityOptions/checkOpacity}} dictionary member of |options| - is true, + 1. If either the {{CheckVisibilityOptions/checkOpacity}} + or the {{CheckVisibilityOptions/opacityProperty}} + dictionary members of |options| + are true, and |this|, or an ancestor of |this| in the [=flat tree=], has a computed 'opacity' value of ''0'', return false. - 1. If the {{CheckVisibilityOptions/checkVisibilityCSS}} dictionary member of |options| - is true, + 1. If either the {{CheckVisibilityOptions/checkVisibilityCSS}} + or the {{CheckVisibilityOptions/visibilityProperty}} + dictionary members of |options| + are true, and |this| is [=invisible=], return false. + 1. If the {{CheckVisibilityOptions/contentVisibilityAuto}} dictionary member of |options| + is true + and an ancestor of |this| in the [=flat tree=] + [=skips its contents=] + due to ''content-visibility: auto'', + return false. 1. Return true. @@ -1984,6 +1997,7 @@ generally not listed.

Changes From 07 July 2022

* Introduced the {{VisualViewport}} API and related concepts * Pinch zoom is now renamed to scale factor +* Added visibilityProperty, opacityProperty, and contentVisiblityAuto properties for {{Element/checkVisibility()}} method.

Changes From 22 June 2022

* Adam Argyle moved the scrollend event from WICG overscroll-scrollend-events to [[CSSOM-VIEW-1]] From 040e66779db706e8f3827fe462e05b3f127e38f3 Mon Sep 17 00:00:00 2001 From: Vladimir Levin Date: Mon, 6 Nov 2023 14:50:41 -0500 Subject: [PATCH 2/2] Update with note --- cssom-view-1/Overview.bs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cssom-view-1/Overview.bs b/cssom-view-1/Overview.bs index 7da29df336b..23b99a691fa 100644 --- a/cssom-view-1/Overview.bs +++ b/cssom-view-1/Overview.bs @@ -1190,6 +1190,10 @@ partial interface Element { }; +Note: The {{CheckVisibilityOptions/checkOpacity}} and {{CheckVisibilityOptions/checkVisibilityCSS}} properties are historical names. +These properties have aliases that match the new naming scheme, +namely {{CheckVisibilityOptions/opacityProperty}} and {{CheckVisibilityOptions/visibilityProperty}}. + The getClientRects() method, when invoked, must return the result of the following algorithm: 1. If the element on which it was invoked does not have an associated [=CSS/box=] return an empty {{DOMRectList}} object and stop this algorithm. @@ -1249,15 +1253,15 @@ Note: The {{DOMRect}} object returned by {{Element/getBoundingClientRect()}} is 1. If an ancestor of |this| in the [=flat tree=] has ''content-visibility: hidden'', return false. - 1. If either the {{CheckVisibilityOptions/checkOpacity}} - or the {{CheckVisibilityOptions/opacityProperty}} + 1. If either the {{CheckVisibilityOptions/opacityProperty}} + or the {{CheckVisibilityOptions/checkOpacity}} dictionary members of |options| are true, and |this|, or an ancestor of |this| in the [=flat tree=], has a computed 'opacity' value of ''0'', return false. - 1. If either the {{CheckVisibilityOptions/checkVisibilityCSS}} - or the {{CheckVisibilityOptions/visibilityProperty}} + 1. If either the {{CheckVisibilityOptions/visibilityProperty}} + or the {{CheckVisibilityOptions/checkVisibilityCSS}} dictionary members of |options| are true, and |this| is [=invisible=],