-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CSSTransition] Do not list up all properties for transition: all
https://bugs.webkit.org/show_bug.cgi?id=261917 rdar://115861030 Reviewed by Antti Koivisto. When `transition: all ...` CSS rule is applied, we end up listing all animatable properties. This is incredibly costly since there are so many CSS properties. And all properties are queried, checked equality via very slow virtual function. Many hash table lookups etc. We found that we are using massive amount of time in this transitioning in Speedometer3/NewsSite-Next / NewsSite-Nuxt. But in almost all cases, almost all properties are not related at all. In this patch, we do RenderStyle comparison and collect all affected CSS properties candidate which needs to be visited in updateCSSTransitions. We can conservatively say "this property needs to be visited". But if we know that this is totally equal, then we can skip that. We cannot use RenderStyle::diff for this purpose. It is highly tailored to rendering purpose. And a lof of properties changes are not reported when it is unrelated to layout (but it is necessary for updateCSSTransitions). Example is `top` / `left`. So instead, we have more tailored path collecting necessary properties in this patch. With this patch, we always collect all possible affected properties. So we no longer need to list up all animatable properties. It results in 0.7% progression in Speedometer3. * Source/WebCore/dom/Element.cpp: (WebCore::Element::hasAnimations const): * Source/WebCore/dom/Element.h: * Source/WebCore/dom/ElementRareData.h: (WebCore::ElementRareData::hasAnimations const): * Source/WebCore/style/Styleable.cpp: (WebCore::Styleable::updateCSSTransitions const): Canonical link: https://commits.webkit.org/268412@main
- Loading branch information
1 parent
abab8aa
commit 66eb8a0
Showing
11 changed files
with
926 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.