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

[cssom-view-1] Add more checkVisibility dictionary properties #9549

Merged
merged 2 commits into from
Jan 24, 2024
Merged
Changes from 1 commit
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
22 changes: 18 additions & 4 deletions cssom-view-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,9 @@ dictionary ScrollIntoViewOptions : ScrollOptions {
dictionary CheckVisibilityOptions {
boolean checkOpacity = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a Note that says that checkVisibilityCSS and checkOpacity are deprecated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't resolved to deprecate these. I've added a note that says they are historical names that have aliases that match the new naming scheme. I suspect we want to revisit at CSSWG if we want to deprecate the names though.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine to call them deprecated IMO. I don't feel strongly either way tho. Assuming @smfr is fine with the current wording feel free to merge.

boolean checkVisibilityCSS = false;
boolean contentVisibilityAuto = false;
boolean opacityProperty = false;
boolean visibilityProperty = false;
};

partial interface Element {
Expand Down Expand Up @@ -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}}
vmpstr marked this conversation as resolved.
Show resolved Hide resolved
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}}
vmpstr marked this conversation as resolved.
Show resolved Hide resolved
dictionary members of |options|
are true,
and |this| is <l spec=css-display>[=invisible=]</l>,
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.
</div>

Expand Down Expand Up @@ -1984,6 +1997,7 @@ generally not listed.
<h3 id='changes-from-2022-07-07' class=no-num>Changes From 07 July 2022</h3>
* Introduced the {{VisualViewport}} API and related concepts
* Pinch zoom is now renamed to <a>scale factor</a>
* Added visibilityProperty, opacityProperty, and contentVisiblityAuto properties for {{Element/checkVisibility()}} method.

<h3 id='changes-from-2022-06-22' class=no-num>Changes From 22 June 2022</h3>
* Adam Argyle moved the <a event>scrollend</a> event from <a href="https://wicg.github.io/overscroll-scrollend-events/">WICG overscroll-scrollend-events</a> to [[CSSOM-VIEW-1]]
Expand Down