mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-31 05:39:55 +00:00
The entire subtree of an element with display:none is irrelevant for purposes of layout and/or paint invalidation. We now simply ignore invalidation triggers inside such subtrees. This avoids a *lot* of redundant busywork when running CSS animations inside not-even-rendered content. As an example, this avoids repainting YouTube embeds repeatedly due to animating-but-hidden progress indicators. Note that the subtree *root* (i.e the `display:none` element itself) still gets to trigger invalidation, since we may need to rebuild the layout tree when the `display` property changes.
152 KiB
152 KiB