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

The CSS Working Group just discussed `Batching and flushing of style/layout info`.

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: Batching and flushing of style/layout info<br>
&lt;fantasai> s/statuses/ready-to-ship list/<br>
&lt;dbaron>  github: https://github.com/w3c/csswg-drafts/issues/5115<br>
&lt;dbaron> github: https://github.com/w3c/csswg-drafts/issues/5115<br>
&lt;TabAtkins> Rossen_: this was brought up as part of a longstanding TAG review of the html event loop<br>
&lt;TabAtkins> Rossen_: as we looked at last week's TAG f2f, Tess and I were looking over all the issues, what was discussed between whatwg and tag and here<br>
&lt;TabAtkins> Rossen_: This was the most relevant issue, defining when styles are batched and flushed<br>
&lt;TabAtkins> Rossen_: wanted to bring it up to the WG to review<br>
&lt;TabAtkins> Rossen_: For us to encourage and define how batching/flushing takes place<br>
&lt;Rossen_> q?<br>
&lt;TabAtkins> Rossen_: I was hoping to hear from tab or dbaron or emilio on this topi<br>
&lt;fantasai> TabAtkins: My conclusion is, as I commented in the thread, knowing exactly how and where styles et batched and flushed is something that I do not know very well<br>
&lt;fantasai> TabAtkins: and I don't anticipate other authors knowing either<br>
&lt;fantasai> TabAtkins: So we should make this implicit, with as minimal manual effort as possible<br>
&lt;fantasai> TabAtkins: Anywhere we leave it up to authors, it will inevitably get messed up<br>
&lt;Rossen_> ack dbaron<br>
&lt;fantasai> dbaron: I think my original suggestion was pretty wrong<br>
&lt;fantasai> dbaron: I think the question is it's not entirely clear to me what the right thin to do about it is<br>
&lt;fantasai> dbaron: I think one possibility is that we might be able to write some wording that says, the following steps happen whenever X happens, unless explicitly specified otherwise<br>
&lt;fantasai> dbaron: the question is whether we can write that clearly enough that it's actually correct<br>
&lt;fantasai> dbaron: because there may be places, there are algorithms like interesctionobserver and resizingobserver<br>
&lt;ChrisLilley> q+<br>
&lt;fantasai> dbaron: that would need to say something explicitly<br>
&lt;fantasai> dbaron: What's not clear to me is whether other algorithms need to say something explicit<br>
&lt;fantasai> dbaron: needs someone to sit down and spend a few days trying to figure it out<br>
&lt;fantasai> dbaron: I've been intending to do since filing the issue<br>
&lt;fantasai> dbaron: Given that, I shouldn't maybe make any promises<br>
&lt;emilio> q+<br>
&lt;fantasai> dbaron: it's quite substantive<br>
&lt;Rossen_> ack ChrisLilley<br>
&lt;fantasai> ChrisLilley: Happens whenever is insufficiently precise<br>
&lt;fantasai> ChrisLilley: it has to happen immediately before or immediately after<br>
&lt;fantasai> dbaron: I meant that<br>
&lt;fantasai> emilio: I wanted to say, this problem has gotten more complicated than it needs to be<br>
&lt;fantasai> emilio: due to some new features<br>
&lt;fantasai> emilio: This containment feature, content-visibility<br>
&lt;fantasai> emilio: Prevents flashing of style and layout in some cases, in some subtrees<br>
&lt;fantasai> emilio: display-locking<br>
&lt;fantasai> emilio: and same for a bunch of other APIs<br>
&lt;fantasai> emilio: getComputedStyle, updating style on the element you're queryign<br>
&lt;fantasai> emilio: can cause potentially visible side-effect, e.g. not updating transitions in other parts of the page<br>
&lt;fantasai> emilio: very trick<br>
&lt;Rossen_> q?<br>
&lt;Rossen_> ack emilio<br>
&lt;fantasai> emilio: defining precisely when an element does style updates, I don't think it's possible<br>
&lt;fantasai> emilio: ...<br>
&lt;fantasai> emilio: It's not a great spot to be in<br>
&lt;dbaron> s/I meant that/I meant before/<br>
&lt;fantasai> Rossen_: Just to drive this forward<br>
&lt;fantasai> Rossen_: One way is for us to undefine this, and precisely channeling a little of what Tab was saying, is to say this is not to be defined<br>
&lt;fantasai> Rossen_: and move on<br>
&lt;fantasai> Rossen_: which would allow at least us in TAG to close the event loop issue<br>
&lt;fantasai> Rossen_: and say we don't have a well-specified event loop<br>
&lt;fantasai> Rossen_: which most of the platform depends on<br>
&lt;fantasai> Rossen_: but you get what you get<br>
&lt;fantasai> Rossen_: that's an unsatisfying place to be in<br>
&lt;fantasai> Rossen_: I think authors, both feature authors and spec authors, would like a bit more specificity or visibility into at least what would cause a forced flush<br>
&lt;fantasai> Rossen_: if we can define some of the really big landmines that ought to be avoided if possible<br>
&lt;fantasai> Rossen_: that would be a good step in the right direction<br>
&lt;fantasai> Rossen_: so at least as ppl add their ??, they might not get a clear picture of batching<br>
&lt;fantasai> Rossen_: but if you get a place when forcing flush<br>
&lt;fantasai> Rossen_: can avoid it<br>
&lt;fantasai> Rossen_: We can't currently do that<br>
&lt;fantasai> Rossen_: ...<br>
&lt;fantasai> Rossen_: If we can't get to that sort of granularity, at that abstract level<br>
&lt;fantasai> Rossen_: that's unsatisfying state to be in<br>
&lt;fantasai> emilio: Might be useful to get all the engines to gether, see what the different optimizations are, and see if we can come up with a way to define a minimum common denominator that we can all agree on<br>
&lt;fantasai> emilio: Then there's also the work of going through all the APIs<br>
&lt;fantasai> emilio: but hopefully getting tricky parts agreed on can help<br>
&lt;fantasai> emilio: I agree that it's really unfortunate if we don't end up having it consistently applying<br>
&lt;fantasai> Rossen_: Emilio, can you organize this?<br>
&lt;fantasai> emilio: I can try. Between me and dbaron maybe we can get it done<br>
&lt;fantasai> Rossen_: OK, so this is a good point to take a break<br>
</details>


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


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

Received on Monday, 1 August 2022 14:24:16 UTC