Re: [csswg-drafts] [css-sizing] Define precise timing for setting last remembered size? (#7659)

The CSS Working Group just discussed `[css-sizing] Define precise timing for setting last remembered size?`, and agreed to the following:

* `RESOLVED: Accept Oriol's proposal to record last remembered size first before ResizeObserver callbacks`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Subtopic: [css-sizing] Define precise timing for setting last remembered size?<br>
&lt;fantasai> github: https://github.com/w3c/csswg-drafts/issues/7659<br>
&lt;fantasai> oriol: Spec says that when element needs to record last remembered size, occurs when ?? events occur<br>
&lt;fantasai> oriol: but may be multiple observers that need to be notified<br>
&lt;fantasai> oriol: what happens if callbacks are involved?<br>
&lt;fantasai> oriol: [missed]<br>
&lt;fantasai> oriol: Implementations for the last remembered size are using an internal ResizeObserver<br>
&lt;fantasai> oriol: it will be sorted somewhere in this list of observers<br>
&lt;fantasai> oriol: other callback observers can observe whether the last rememberd size was recorded<br>
&lt;fantasai> oriol: so webpage can notice that current impl in Blink and Firefox, they are creating this internal ResizeObserver the first time an element needs to update its size<br>
&lt;fantasai> oriol: then this interal ResizeObserver is preserved for other elements that may need to update their last remembered size<br>
&lt;fantasai> oriol: even if nothing needs to be updated, the ResizeObserver is not removed<br>
&lt;fantasai> oriol: it continues to exist<br>
&lt;fantasai> oriol: We are exposing these implementation details to web pages<br>
&lt;fantasai> oriol: My question is, are we fine with that?<br>
&lt;fantasai> oriol: This is the simplest way to impelemtn it, but shouldn't be hard to say that the last remembered size should be recorded before other ResizeObserver callbacks are involved<br>
&lt;fantasai> oriol: this would be consistent with creating such observers at the very beginning of the creation of the document<br>
&lt;fantasai> oriol: What do people think? Should we keep exposing these? Should we define a specific order?<br>
&lt;fantasai> TabAtkins: I don't think exposing these impl details is good, and your suggestion of timing is good<br>
&lt;fantasai> TabAtkins: would be happy to write that into the spec<br>
&lt;fantasai> iank_: Just to clarify, this would be internal ResizeObserver would be effectively inserted as first in the list of ResizeObservers or something similar to that?<br>
&lt;fantasai> oriol: Yes, that would be the proposal<br>
&lt;fantasai> oriol: Other ResizeObservers can be created and appended, so best to say it's first, before other ResizeObservers are involved<br>
&lt;fantasai> astearns: Only change to authors would be less info about...<br>
&lt;fantasai> oriol: Effect would be if they create their own ResizeObserver, by the time their callback is called the last remembered size will have been recorded<br>
&lt;fantasai> oriol: otherwise it might not be recorded yet, and might fall back to fallback of contain-intrinsic-size<br>
&lt;fantasai> astearns: Any objections to setting this precise timing?<br>
&lt;fantasai> RESOLVED: Accept Oriol's proposal to record last remembered size first before ResizeObserver callbacks<br>
</details>


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


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

Received on Wednesday, 7 September 2022 23:21:45 UTC