Re: [csswg-drafts] [css-contain][css-sizing] `content-visibility: auto` kinda broken by not using last remembered size with `contain: size` (#7807)

Typically we deliver resize observations after we have decided whether the element skips its contents. Funny enough I have a Blink patch that I'm working on for an unrelated reason that ensures this https://chromium-review.googlesource.com/c/chromium/src/+/3926103. 

I don't think the content-visibility spec says either way when we should decide that the element skips the contents, other than when it should synchronously do so and when it should be asynchronous

This could cause an element to be observed briefly but it shouldn't get to the point of actually dispatching the callback since it would be unregistered in the subsequent iteration when we determine the element is not locked.

Also you're right that even if we can't guarantee that, then we can always have a callback check this, although I'd prefer to avoid it. Did you have a case in mind where we wouldn't know at style time (or whenever we register for resize observation) whether or not the element skips its contents?


-- 
GitHub Notification of comment by vmpstr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7807#issuecomment-1263060591 using your GitHub account


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

Received on Friday, 30 September 2022 03:29:17 UTC