- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Tue, 02 Aug 2022 14:02:50 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `Last Rememberd Size unclear when auto`, and agreed to the following: * `RESOLVED: At ResizeObserver time, forget an element's last remembered size if it is currently out of the document` <details><summary>The full IRC log of that discussion</summary> <fantasai> Subtopic: Last Rememberd Size unclear when auto<br> <fantasai> github: https://github.com/w3c/csswg-drafts/issues/7516<br> <fantasai> oriol: spec says that when we store last remembered size, this survives box destruction, e.g. if you add 'display: none', the element will keep storing this last remembered size<br> <fantasai> oriol: my question here is if the element is removed from the tree<br> <fantasai> oriol: and then later re-inserted<br> <fantasai> oriol: will it still have its last remembered size from the previous position in the tree?<br> <fantasai> oriol: should we remove the last remembered size?<br> <fantasai> TabAtkins: I suggest whatever is easiest to implement<br> <emilio> https://github.com/w3c/csswg-drafts/issues/7532<br> <emilio> github: https://github.com/w3c/csswg-drafts/issues/7532<br> <fantasai> ...<br> <fantasai> TabAtkins: Rossen made the point that moving the element is done by removing the item ...<br> <fantasai> TabAtkins: but if you're e.g. re-ordering a list, you might want to keep that info<br> <iank_> yeah there are lots of cases for moving things around, and it should keep the same last size.<br> <emilio> q+<br> <fantasai> TabAtkins: The common case for removing from document and re-inserting is moving it around<br> <fantasai> TabAtkins: and the common case of that is re-ordering within a list of similar items<br> <fantasai> TabAtkins: so my suggestion is to keep the last remembered size until normal things remove it<br> <Rossen_> ack emilio<br> <fantasai> emilio: You can move things around, given how specced right now<br> <ydaniv> Is removing from layout tree much different from being removed completely from the DOM?<br> <fantasai> emilio: that means that if you move it, by the time you ??, it will already have a box<br> <fantasai> emilio: when we fire ResizeObserver calllback, if you move an element, it will have a new box and a new position in the tree<br> <fantasai> emilio: do we want to clear it if it's not in the document or doesn't have a box, i.e. when you fire the ResizeObserver event<br> <fantasai> emilio: [missed]<br> <fantasai> emilio: Deciding at the time of ResizeObserver doesn't prevent the moving case from working<br> <fantasai> TabAtkins: if you remove it from the tree, hold onto it a bit, ResizeObserver fires, and then you don't have a remembered size at that point<br> <fantasai> TabAtkins: when the ResizeObserver timing happens (well-defined), if the element is outside the document, we clear the last remember size<br> <fantasai> TabAtkins: because we forget the size in some cases at ResizeObserver timing<br> <fantasai> Rossen_: what do we do for animations?<br> <fantasai> TabAtkins: they're tied to the box<br> <fantasai> TabAtkins: but these are tied specifically to the element itself<br> <fantasai> TabAtkins: is there an implementation concern?<br> <fantasai> emilio: no<br> <fantasai> TabAtkins: I could lean either way<br> <fantasai> Rossen_: Oriol, do you have an opinion<br> <fantasai> oriol: No strong opinion, just wondering about it<br> <fantasai> oriol: I suppose we can leave it to not do anything special<br> <fantasai> oriol: Styles might change if you move it, or the old size might be strange in the new position<br> <fantasai> oriol: but can also be fine<br> <fantasai> oriol: so no strong opinion<br> <ydaniv> q+<br> <fantasai> iank_: The reason not to tie it to the box is that we have a lot of features that will switch out of the box<br> <fantasai> iank_: e.g. ?? will be very common fro an element to have potentially different boxes associated<br> <TabAtkins> s/??/like when using CQ, it/<br> <fantasai> ydaniv: c-i-s is only interesteding if you have content-visibility and still out of view, right?<br> <fantasai> ydaniv: so by the time that the element is in view, it doesn't really play any part, right?<br> <fantasai> oriol: it can play a part if you first lay out the element normally and it can store its size, and then you add content-visilbity: hidden, the it can be in the screen and keep its contents, and it will use its last remembered size<br> <Rossen_> ack ydaniv<br> <fantasai> oriol: we resovled this last week<br> <fantasai> TabAtkins: that's the exact weirdo case this is designed for<br> <fantasai> Rossen_: Ok, regardless if it's weird or not, we need to make it more predictable<br> <fantasai> Rossen_: if we specify that it fires, the previous size<br> <fantasai> Rossen_: would there be any objections?<br> <fantasai> TabAtkins: I think I lean very slightly towards it forgetting its size<br> <fantasai> TabAtkins: if you're stashing away, not just doing a move<br> <flackr> q_<br> <flackr> q+<br> <fantasai> TabAtkins: it's much less clear that the new context you're putting it into would be similar<br> <flackr> q-<br> <fantasai> TabAtkins: so I lean towards forgetting if it's out of document<br> <fantasai> Rossen_: when you last checked this, did you check what implementations did?<br> <fantasai> oriol: ???<br> <fantasai> oriol: and in Gecko haven't landed implementation<br> <vmpstr> s/???/Chromium never seems to remove last remembered size/<br> <fantasai> flackr: For ?? scroller recycling element, I think we'd see this happen, and you'd want to forget the size, because you're changing the content before re-inserting<br> <flackr> s/??/virtual<br> <fantasai> Rossen_: so then the proposed resolution is that the element will forget its last size<br> <fantasai> TabAtkins: at normal ResizeObserver timing<br> <fantasai> vmpstr: then if removed and then re-aded, then it's ??????<br> <fantasai> TabAtkins: At ResizeObserver time, you also check if it is in the document<br> <fantasai> TabAtkins: if not, forget the size<br> <vmpstr> s/??????/keeps its size if it happened before the resize observer timing/<br> <TabAtkins> RESOLVED: At ResizeObserver time, forget an element's last remembered size if it is currently out of the document<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7532#issuecomment-1202640447 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 14:02:52 UTC