W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2020

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

From: vmpstr via GitHub <sysbot+gh@w3.org>
Date: Thu, 03 Dec 2020 15:48:38 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-738092091-1607010517-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:31:36 UTC