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

As it stands now, `content-visibility: hidden` tries to avoid doing style in its subtree if possible. A lot of the APIs that need clean style begin from an element within the subtree. For example, getComputedStyle targets an element. It's much easier for us to check by navigating the ancestor chain whether that element is in a content-visibility: hidden subtree, and if so force the style update by "temporarily not blocking style" from that content-visibility: hidden element (a bit of an implementation detail). 

It's harder for us to start from getAnimations({ subtree: true}) and then visit every single descendant to check if it may be blocking style by content-visibility: hidden. Since we may potentially have to do this for every getAnimations({ subtree: call }), I'm worried that this may be a big performance hit as well.

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


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

Received on Thursday, 3 December 2020 15:48:40 UTC