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

Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-sizing] Define precise timing for setting last remembered size? ==
From https://drafts.csswg.org/css-sizing-4/#last-remembered, the last remembered size is recorded

> At the time that [ResizeObserver](https://drafts.csswg.org/resize-observer-1/#resizeobserver) events are determined and delivered

But what if the author is already observing the element with some `ResizeObservers`? When an observed element changes size, the various callbacks are invoked in order of the creation of the `ResizeObservers`. And the callbacks can check whether the last remembered size has been recorded or not.

Then webpages can tell that both Firefox and Chromium:

 - Reuse the same `ResizeObserver` instance for updating the last remembered size of all elements that need it.
 - This `ResizeObserver` instance is created the 1st time that an element with `contain-intrinsic-size: auto` and no size containment is laid out.
 - This `ResizeObserver` instance is never removed (during the lifetime of the document).

Are we fine exposing these implementations details? Should we define a more precise timing, e.g. that the last remembered size is set just before invoking the (other) `ResizeObservers` callbacks for that element?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7659 using your GitHub account


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

Received on Monday, 29 August 2022 20:48:49 UTC