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

Define content clip #386

Merged
merged 3 commits into from
Apr 1, 2022
Merged
Changes from 2 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
8 changes: 6 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ urlPrefix: https://drafts.csswg.org/cssom-view-1/
url: #pinch-zoom; type:dfn; text: pinch zoom
urlPrefix: https://drafts.csswg.org/css2/visuren.html
url: #viewport; type:dfn; text: viewport
urlPrefix: https://drafts.csswg.org/css-overflow-3/
url: #overflow-properties; type:dfn; text: overflow properties
</pre>

<pre class="link-defaults">
Expand Down Expand Up @@ -305,6 +307,8 @@ or else the <a>top-level browsing context</a>'s {{document}} node
(referred to as the <dfn for="IntersectionObserver">implicit root</dfn>) if
the {{IntersectionObserver/root}} attribute is <code>null</code>.

An {{Element}} is defined as having a <dfn for="IntersectionObserver">content clip</dfn> if its computed style has <a>overflow properties</a> that cause its content to be clipped to the element's padding edge.
szager-chromium marked this conversation as resolved.
Show resolved Hide resolved

The <dfn for=IntersectionObserver>root intersection rectangle</dfn>
for an {{IntersectionObserver}}
is the rectangle we'll use to check against the targets.
Expand All @@ -316,7 +320,7 @@ is the rectangle we'll use to check against the targets.
<dt>If the <a>intersection root</a> is a {{document}},
<dd>it's the size of the {{document}}'s <a>viewport</a> (note that this processing step can only be reached if the {{document}} is <a>fully active</a>).

<dt>Otherwise, if the <a>intersection root</a> has an overflow clip,
<dt>Otherwise, if the <a>intersection root</a> has a <a>content clip</a>,
<dd>it's the element's <a>content area</a>.

<dt>Otherwise,
Expand Down Expand Up @@ -592,7 +596,7 @@ run these steps:
of the {{document}}, and update |container| to be
the <a>browsing context container</a> of |container|.
2. Map |intersectionRect| to the coordinate space of |container|.
3. If |container| has overflow clipping or a css <a>clip-path</a> property,
3. If |container| has a <a>content clip</a> or a css <a>clip-path</a> property,
update |intersectionRect| by applying |container|'s clip.
4. If |container| is the root element of a <a>browsing context</a>,
update |container| to be the <a>browsing context</a>'s {{document}};
Expand Down