Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp

Issue 2757543002: Ensure baseComputedStyle optimisation is cleared during registered custom property animations (Closed)
Patch Set: comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/PropertyRegistration.idl ('k') | third_party/WebKit/Source/web/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
index e24d082b9a7b9a1162313d500b848fe9c182c6a9..844f7eee7ff1bc31047cc829eb29e8e0d5ef26f4 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
@@ -612,12 +612,17 @@ static const ComputedStyle* calculateBaseComputedStyle(
static void updateBaseComputedStyle(StyleResolverState& state,
Element* animatingElement) {
- if (!animatingElement || state.isAnimatingCustomProperties())
+ if (!animatingElement)
return;
ElementAnimations* elementAnimations = animatingElement->elementAnimations();
- if (elementAnimations)
- elementAnimations->updateBaseComputedStyle(state.style());
+ if (elementAnimations) {
+ if (state.isAnimatingCustomProperties()) {
+ elementAnimations->clearBaseComputedStyle();
suzyh_UTC10 (ex-contributor) 2017/03/17 03:03:13 Sanity-check question: Is it possible instead to n
alancutter (OOO until 2018) 2017/03/17 03:36:50 I did think of that, to not set the baseComputedSt
+ } else {
+ elementAnimations->updateBaseComputedStyle(state.style());
+ }
+ }
}
PassRefPtr<ComputedStyle> StyleResolver::styleForElement(
« no previous file with comments | « third_party/WebKit/Source/core/css/PropertyRegistration.idl ('k') | third_party/WebKit/Source/web/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698