Re: [csswg-drafts] [css-view-transitions-1] What is the snapshot containing block for iframes? (#9786)

The CSS Working Group just discussed `[css-view-transitions-1] What is the snapshot containing block for iframes?`, and agreed to the following:

* `RESOLVED: Snapshot Containing Block for an iframe should be that frame's Initial Containing Block`
* `RESOLVED: If the SCB of an iframe exceeds an implementation defined maximum, the UA can skip the transition`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> khush: defining the snapshot used for the block in the transition<br>
&lt;TabAtkins> khush: defined with two things in mind<br>
&lt;TabAtkins> khush: one was, this whole pseudo-dom we're making, how is it positioned in the doc during layout<br>
&lt;TabAtkins> khush: two was, which dom do you capture<br>
&lt;TabAtkins> khush: on mobile viewports, you have some part of UI that can be retracted (url bar, root scrollers)<br>
&lt;TabAtkins> khush: we want it so that if going A->B, capture the largest chunk of window that can potentially display page content, even if interactive widgets are hidden<br>
&lt;TabAtkins> khush: this is very specific to the top-level frame, we didn't describe iframes well<br>
&lt;TabAtkins> khush: implicitly it ended up being the ICB of the iframe.<br>
&lt;TabAtkins> khush: iframes can be scrolled offscreen, so trying to define it as the on-screen viewport doesn't map well<br>
&lt;TabAtkins> khush: so one proposal is for iframes, say the snapshot containing block is the ICB<br>
&lt;TabAtkins> khush: but someone filed a bug where they had a massive iframe, and it causes an OOM for us<br>
&lt;TabAtkins> khush: so either we define a way to clip the iframe snapshot to be reasonable sized, or give an affordance to the UA to skip the transition<br>
&lt;TabAtkins> khush: it seems like an edge-case people won't generally hit<br>
&lt;khush> q?<br>
&lt;TabAtkins> khush: So second proposal is if snapshot containing block exceeds a UA-defined max size, we can skip the transition<br>
&lt;fremy> q+<br>
&lt;bramus> scribe+<br>
&lt;bramus> TabAtkins: (missed)<br>
&lt;bramus> khush: (missed2)<br>
&lt;TabAtkins> TabAtkins: We already allow UAs to implicitly do whatever they need for OOM conditions. Good to call them out if they might be common, but don't *need* an explicit allowance for it.<br>
&lt;bramus> s/(missed)//<br>
&lt;bramus> s/(missed2)//<br>
&lt;TabAtkins> khush: The question here is because there' two design choices. One is, when this came up for elements, if you have a massive element, the spec recommends capturing at least the on-screen portion fo the element<br>
&lt;TabAtkins> khush: For iframes - for OOPIFs it's hard to track where on the screen the iframe is<br>
&lt;TabAtkins> (out of process iframes)<br>
&lt;TabAtkins> khush: So the question was if we should try to figure out where the iframe is and capture the ons-creen part, or just say "you amde a massive iframe, sucks to be you"<br>
&lt;miriam> ack fremy<br>
&lt;khush> q?<br>
&lt;TabAtkins> fremy: I was wondering why we special-case iframes, but khush seems to have answered that<br>
&lt;TabAtkins> fremy: is it really a little difficult, or *impossible* to tell this? good for consistency if possible.<br>
&lt;TabAtkins> fremy: But also agree with TAb, if you'rea bout to crash the browser do whatever you need to avoid that.<br>
&lt;TabAtkins> fantasai: So I think the OOM condition doesn't *have* to be in the spec<br>
&lt;TabAtkins> s/fantasai/fremy/<br>
&lt;TabAtkins> fremy: so if you have a big document but a small iframe, are you snapshotting the hwole document or the part that's scrolled?<br>
&lt;TabAtkins> khush: a screenshot of the iframe bounds. for the embedded dcument that's what we'll define the containing block as<br>
&lt;TabAtkins> fremy: So this is only an issue if the &lt;iframe> element is very big, not if the content of the iframe is big<br>
&lt;TabAtkins> khush: yes<br>
&lt;miriam> q?<br>
&lt;TabAtkins> khush: to answer how difficult, i think because of web features like intersectionObserver, we do send this info to the embedded document, but I haven't looked into the details yet<br>
&lt;TabAtkins> khush: I'd like to take the massive iframe resolution now, and we can revisit if necessary to do a more correct thing<br>
&lt;khush> res 1: Snapshot Containing Block for an iframe should be that frame's Initial Containing Block<br>
&lt;khush> res 2: If the SCB exceeds an implementation defined maximum, the UA can skip the transition<br>
&lt;TabAtkins> miriam: So any objections to first resolution?<br>
&lt;TabAtkins> RESOLVED: Snapshot Containing Block for an iframe should be that frame's Initial Containing Block<br>
&lt;TabAtkins> astearns: question - just for iframes?<br>
&lt;TabAtkins> khush: yes<br>
&lt;TabAtkins> astearns: then second resolution should specify that<br>
&lt;TabAtkins> RESOLVED: If the SCB of an iframe exceeds an implementation defined maximum, the UA can skip the transition<br>
&lt;TabAtkins> fantasai: Did we need a similar resolution for the main window?<br>
&lt;TabAtkins> astearns: For main if already scopes to the visible rect<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9786#issuecomment-1939259536 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 12 February 2024 18:03:15 UTC