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

Replace "viewport" with "Initial Containing Block" #76

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

clelland
Copy link
Collaborator

@clelland clelland commented Aug 31, 2023

This replaces the unlinked "viewport" term with a link to the document's initial containing block, which will be the bounds of the browser window or iframe containing the document.

Closes: w3c/largest-contentful-paint#26


Preview | Diff

This replaces the unlinked "viewport" term with a link to the document's initial
containing block, which will be the bounds of the browser window or iframe
containing the document.

Closes: w3c/largest-contentful-paint#26
@@ -250,7 +250,7 @@ Report image Element Timing {#sec-report-image-element}
<div algorithm="report image element timing">
When asked to <dfn>report image element timing</dfn> given a triple (|element|, |imageRequest|, |loadTime|), a DOMHighResTimestamp |renderTime| and a {{Document}} |document|, perform the following steps:

1. Let |intersectionRect| be the value returned by the <a>intersection rect algorithm</a> using |element| as the target and viewport as the root.
1. Let |intersectionRect| be the value returned by the <a>intersection rect algorithm</a> using |element| as the target and |document|'s [=initial containing block=] as the root.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure if these are the same. If this element was on an iframe, was viewport the entire page viewport or the iframe's viewport?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For an element in an iframe, viewport should be the iframe's bounds, and the element should be clipped to that for LCP calculations.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, makes sense. I guess you need a similar change in the text one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Frame viewport clipping is not properly specified
2 participants