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

Unified Diff: third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp

Issue 2105743002: Optimize style recalc when adding @keyframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test review issues Created 4 years, 6 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
Index: third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
diff --git a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
index 58abde39e0139fbef8d75db520e6ac09c5d213d4..e8527a843ad0a47a2fbb619a4aa42543b3d45db2 100644
--- a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
@@ -295,8 +295,10 @@ void CSSAnimations::calculateAnimationUpdate(CSSAnimationUpdate& update, const E
timing.timingFunction = Timing::defaults().timingFunction;
StyleRuleKeyframes* keyframesRule = resolver->findKeyframesRule(elementForScoping, name);
- if (!keyframesRule)
+ if (!keyframesRule) {
+ element.document().styleEngine().setHasUnresolvedKeyframesRule();
continue; // Cancel the animation if there's no style rule for it.
+ }
const RunningAnimation* existingAnimation = nullptr;
size_t existingAnimationIndex = 0;

Powered by Google App Engine
This is Rietveld 408576698