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

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: Rebased 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 ac4174a99979dee637be416d28c072496aeea7dd..2fb0f4d37bf4fae17a2444dab37f935129d109b3 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();
+ } 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