Re: [csswg-drafts] [css-sizing] How does 0x0 size affect last remembered size? (#7539)

The CSS Working Group just discussed `[css-sizing] How does 0x0 size affect last remembered size?`, and agreed to the following:

* `RESOLVED: 0x0 is not special wrt ResizeObserver or c-i-s`
* `RESOLVED: Replace ResizeObserver editors with Oriol and Emilio`

<details><summary>The full IRC log of that discussion</summary>
&lt;emilio> Topic: [css-sizing] How does 0x0 size affect last remembered size?<br>
&lt;emilio> github: https://github.com/w3c/csswg-drafts/issues/7539<br>
&lt;JakeA> Thanks all. I'm going to finish some spec edits for SET. Ping me if you need me and I'll rejoin.<br>
&lt;emilio> oriol: Not sure if I should do a quick intro about contain-intrinsic-size: auto<br>
&lt;emilio> ... which is a feature that remembers the last size of an element<br>
&lt;emilio> ... and then uses that instead of collapsing the contribution of the contents<br>
&lt;emilio> ... when you have size containment<br>
&lt;emilio> ... this specific issue is about 0x0 size. The spec seems to assume that using ResizeObserver is the way to track this size<br>
&lt;emilio> ... since it mentions that the size is updated at ResizeObserver time<br>
&lt;emilio> ... when implementing this I found a problem when the size is 0x0<br>
&lt;emilio> ... if you start observing an element with ResizeObserver and the element doesn't have a 0x0 size then you get an observation with the current size<br>
&lt;dbaron> This sounds like a spec bug, and the spec should handle 0x0 sizes just like other sizes.<br>
&lt;emilio> ... but you don't get it without it<br>
&lt;emilio> ... so the question is should we still store this size as the last remembered size?<br>
&lt;emilio> ... seems like Chromium wasn't doing it<br>
&lt;emilio> ... so I don't see a reason about why special-casing it<br>
&lt;emilio> q+<br>
&lt;TabAtkins> q+<br>
&lt;fantasai> scribe+<br>
&lt;Rossen_> ack emilio<br>
&lt;fantasai> emilio: now that you've explained this, this is only observable in some cases, right?<br>
&lt;fantasai> emilio: if there's not stored size, you use 0x0<br>
&lt;fantasai> emilio: e.g. in one axis<br>
&lt;emilio> oriol: when you have c-i-s: auto you need to provide a fallback value<br>
&lt;flackr> q+<br>
&lt;emilio> ... so if you get the fallback you can detect it's not stored<br>
&lt;Rossen_> ack TabAtkins<br>
&lt;emilio> TabAtkins: this appears to be a corner case falling from the implementation details<br>
&lt;emilio> ... so I don't mind either way<br>
&lt;emilio> ack dbaron<br>
&lt;Rossen_> ack dbaron<br>
&lt;emilio> dbaron: I think this is just a spec bug that was copied to the spec because it was written based on impl<br>
&lt;emilio> ... I think 0x0 should be handled like any other size<br>
&lt;emilio> TabAtkins: the spec doesn't special-case this<br>
&lt;emilio> ... so it's an impl bug<br>
&lt;emilio> q+<br>
&lt;emilio> oriol: yeah, this is because the ResizeObserver inits its size to 0x0<br>
&lt;Rossen_> ack flackr<br>
&lt;emilio> TabAtkins: we only reuse the RO timing<br>
&lt;emilio> dbaron: it might be a bug in ResizeObserver<br>
&lt;emilio> flackr: should we remember 0x0 only if the element was visible? This is intended for content-visibility<br>
&lt;emilio> oriol: there are some issues with storing the size<br>
&lt;Rossen_> q<br>
&lt;emilio> oriol: you need to be size-contained at the time, which c-v provides in some cases<br>
&lt;emilio> ... so if you lay out the content normally without size-containment etc it gets saved<br>
&lt;emilio> flackr: if the element has never been on screen we shouldn't be remembering 0x0 for its size<br>
&lt;emilio> ... we'd lay out 0x0 with c-v: hidden<br>
&lt;emilio> oriol: if it has c-v from the beginning you don't store the size<br>
&lt;emilio> flackr: but c-v: auto changes dynamically when you scroll<br>
&lt;emilio> oriol: if you have c-v: auto initially outside of the screen we won't store the last remembered size because it has size containment, we'll store it once you enter the screen<br>
&lt;emilio> flackr: so we won't save the size if it has size containment, so my concern is addressed<br>
&lt;emilio> ... resizeobserver will still fire<br>
&lt;emilio> oriol: yeah, but you won't store the last remembered size<br>
&lt;fantasai> emilio: I think I agree with dbaron , but it feels like ??<br>
&lt;fantasai> emilio: IntersectionObserver does fire an observation immediately, regardless of whether on the screen<br>
&lt;dbaron> s/but it feels like ??/that it feels like a bug in ResizeObserver/<br>
&lt;fantasai> emilio: so it feels to me like a bug that ResizeObserver doesn't fire on zero<br>
&lt;flackr> +1<br>
&lt;fantasai> emilio: and that would fix this by extension<br>
&lt;fantasai> emilio: so I suspect we just move this to the ResizeObserver spec<br>
&lt;fantasai> emilio: idk who's the editor of that?<br>
&lt;fantasai> emilio: but given the precedent of IntersectionObserver always firing as well, it doesn't seem to me that this would be ???<br>
&lt;vmpstr> s/???/objectionable/<br>
&lt;Rossen_> q?<br>
&lt;fantasai> emilio: It seems the editors are no longer working on CSS specs<br>
&lt;fantasai> emilio: so we need new editors for this spec?<br>
&lt;fantasai> Rossen_: Let's figure out what we want to fix and then figure out who is going to do it<br>
&lt;fantasai> oriol: Proposed resolution would be that 0x0 size is not special, is just like any other size<br>
&lt;fantasai> emilio: that's the current spec behavior<br>
&lt;fantasai> Rossen_: that doesn't require any change to the spec, simply requires implementations to fix their bugs<br>
&lt;fantasai> emilio: but then we need to file a ResizeObserver bug<br>
&lt;fantasai> Rossen_: yeah, but we're here to fix specs<br>
&lt;fantasai> Rossen_: seems we don't need a spec change, if hte bugs are not filed, please go and file them<br>
&lt;fantasai> Rossen_: Anything else on this topic?<br>
&lt;fantasai> Rossen_: objections to resolving on 0x0 is not a special size?<br>
&lt;fantasai> RESOLVED: 0x0 is not special wrt ResizeObserver or c-i-s<br>
&lt;fantasai> emilio: This means we need ResizeObserver spec changes<br>
&lt;fantasai> [discussion of possible editors]<br>
&lt;fantasai> RESOLVED: Replace ResizeObserver editors with Oriol and Emilio<br>
</details>


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


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

Received on Tuesday, 2 August 2022 13:48:38 UTC