Re: [csswg-drafts] [css-images] Layout of iframes with content intrinsic sizing that does not match the <iframe> (#6817)

The CSS Working Group just discussed `layout of iframes`, and agreed to the following:

* `RESOLVED: object-fit affects the rendering of iframes with expressed intrinsic sizes`
* `RESOLVED: object-position applies to iframes in the above case as well`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: layout of iframes<br>
&lt;TabAtkins> github: https://github.com/w3c/csswg-drafts/issues/6817<br>
&lt;TabAtkins> chrishtr: About iframes with content size different from the iframe element<br>
&lt;TabAtkins> chrishtr: Currently not possible<br>
&lt;TabAtkins> chrishtr: But two upcoming features that might change this<br>
&lt;TabAtkins> chrishtr: fenced frame that prevents iframe content from changing size after laoded, to avoid info leaks<br>
&lt;TabAtkins> chrishtr: And cooperative iframe sizing, which may let the content document size differently from the iframe element<br>
&lt;TabAtkins> chrishtr: I propose we apply object-fit semantics to this, and default to object-fit: contain<br>
&lt;TabAtkins> chrishtr: (thus letterboxing the iframe)<br>
&lt;TabAtkins> fantasai: Does this mean you'll shrink/zoom out the iframe if it's smaller than the document?<br>
&lt;TabAtkins> chrishtr: Yes<br>
&lt;TabAtkins> chrishtr: I think that would look the best, if they differ.<br>
&lt;TabAtkins> smfr: not sure i agree - flashes of scaled content are weird<br>
&lt;TabAtkins> smfr: Could just attach it to start-start corner<br>
&lt;TabAtkins> chrishtr: so two potential resolutions: one is whether object-fit works, and second is what the default value is<br>
&lt;fantasai> TabAtkins: applying oject-fit makes sense, it's designed to handle this kind of thing<br>
&lt;fantasai> TabAtkins: no reason not to work as it does elsewhere<br>
&lt;fantasai> TabAtkins: no strong opinion about default value<br>
&lt;dholbert> q+<br>
&lt;fantasai> TabAtkins: if question between losing data because doing object-fit: none and overflowing in some way<br>
&lt;fantasai> TabAtkins: or making something very small, either squished or zoomed out<br>
&lt;fantasai> TabAtkins: they're both pretty bad<br>
&lt;fantasai> TabAtkins: I'm not sure which is best for the user<br>
&lt;TabAtkins> chrishtr: none would cut off content<br>
&lt;TabAtkins> chrishtr: there's also "smaller" - only transform if you have to make it smaller to fit<br>
&lt;TabAtkins> chrishtr: "scale-down"<br>
&lt;TabAtkins> smfr: Is this a frozen iframe?<br>
&lt;TabAtkins> chrishtr: For a fenced frame, this would persist for th elife of the frame - they'd interact with it potentially<br>
&lt;TabAtkins> chrishtr: These are for, like, ads - the 3rd party doesn't see what size the iframe ends up being<br>
&lt;TabAtkins> chrishtr: Authors should avoid having this happen, but when it does we need some dfn for the behavior<br>
&lt;TabAtkins> dholbert: This have any effect on regular iframes?<br>
&lt;fantasai> TabAtkins: no, they continue o have no intrinsic size and work as they do today<br>
&lt;TabAtkins> Rossen_: what's the scenaro?<br>
&lt;TabAtkins> dholbert: &lt;iframe src="giant-image.jpg"><br>
&lt;TabAtkins> dholbert: Chrome displays at full res, Firefox does scaled down but you can click it to go full, unsure what webkit does<br>
&lt;TabAtkins> Rossen_: given we dont' have interop...<br>
&lt;TabAtkins> dholbert: Taht's what i'm getting at, does this have any effect on these<br>
&lt;TabAtkins> chrishtr: This shouldn't have any effect on today's iframes, only on the new stuff the cited proposals can bring up<br>
&lt;TabAtkins> chrishtr: Only situations where there is an expressed intrinsic sizing (iframes today don't have it at all) and there's a mismatch<br>
&lt;TabAtkins> Rossen_: Objections?<br>
&lt;fantasai> TabAtkins: Should we resolve separately on whether to apply the property and what the default shoul be?<br>
&lt;TabAtkins> RESOLVED: object-fit affects the rendering of iframes with expressed intrinsic sizes<br>
&lt;TabAtkins> chrishtr: I'd like the resolution for the second now, if possible<br>
&lt;TabAtkins> Rossen_: we can change in the future<br>
&lt;TabAtkins> dholbert: object-position should also be relevant<br>
&lt;TabAtkins> TabAtkins: oh yeah i assumed it would be<br>
&lt;TabAtkins> Rossen_: Objections?<br>
&lt;TabAtkins> RESOLVED: object-position applies to iframes in the above case as well<br>
&lt;TabAtkins> Rossen_: Please work out the defaults in the issue and we can resolve next week<br>
</details>


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


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

Received on Thursday, 2 December 2021 01:00:29 UTC