[csswg-drafts] define concepts of batching and flushing of style and layout information (#5115)

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

== define concepts of batching and flushing of style and layout information ==
It's not entirely clear what spec this should go in, but I think it is within the CSS Working Group's space.

In whatwg/html#3246 there's a discussion about better specifying the concepts of batching and flushing of style and layout information.  I believe it's desirable to specify this in a good bit more detail than it's specified now, because it has significant effects on things like:
* performance characteristics of APIs
* the order in which various events or notifications fire (which can affect interoperability)

That doesn't mean it should necessarily be specified in all detail.  It might be desirable to leave room for optimizations that don't exist today, such as updating style or layout for part of a document tree rather than all of it -- though those optimizations might also be difficult to do because of compatibility issues (which would suggest that the details they depend on should be specified).

So, in particular, I think some document in the CSS working group needs to define the idea that certain sets of changes can be buffered up rather than being executed immediately, and then it needs to export definitions that other specs can link to for something like **flush style** and **flush layout**.  This can then allow other APIs to say when they do these things, and also allow various other things that send notifications (like `resize` events, `IntersectionObserver`, or `ResizeObserver`) to specify more clearly whether the notifications are triggered by any layout, or only by the primary layout within the [update the rendering](https://html.spec.whatwg.org/multipage/#update-the-rendering) steps.

This would also help make progress on the broader goal of helping other specifications figure out how to integrate with batching/flushing and with the [update the rendering](https://html.spec.whatwg.org/multipage/#update-the-rendering) steps.

(Filed during a breakout at the TAG's virtual face-to-face where @hober and I are discussing w3ctag/design-reviews#489.)

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

Received on Tuesday, 26 May 2020 16:41:42 UTC