Re: [csswg-drafts] [css-contain-2] content-visibility should pause css animations in subtree (#5611)

I'm trying to understand the proposed changes as they relate to the content-visibility spec here. What would be the proposed change roughly speaking (if any)? Is the following a fair summary?

* Any animation state is up to date as far as script can tell (via getAnimations, getComputedStyle, or observing the animation effects on layout)
* If script does not access anything that causes a style update, then there are also no animation related events that fire
* These events are deferred until the animation is created / caught up which happens when style is cleaned (by script only?)

I'll be honest, it sounds a little harder to think about (for me) than other proposals that keep the clocks frozen and prevent any animations from being created or destroyed. Something like the following

* When content-visibility skips the contents, the list of animations in the subtree does not change even if style changes in a way that would cause this list to change.
* These animations updates are deferred until the subtree is no longer skipped
* Existing animations' clocks are frozen so no animationend events can fire while the subtree is skipped. The clocks catch up to "current time" when no longer skipped

Now that I write this out, I think the only difference is that I'm proposing that all these things happen "when the content-visibility no longer skips the contents" vs "when style is cleaned for whatever reason" 

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


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

Received on Monday, 19 October 2020 20:39:37 UTC