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

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngine.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
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/StyleEngine.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index b7cccd69a0808c85471a3698915ce9c4f613368e..80728018d5fcf036180b8a15f05f172f64ace92f 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -28,6 +28,7 @@
#include "core/dom/StyleEngine.h"
#include "core/HTMLNames.h"
+#include "core/animation/AnimationTimeline.h"
#include "core/css/CSSDefaultStyleSheets.h"
#include "core/css/CSSFontSelector.h"
#include "core/css/CSSStyleSheet.h"
@@ -743,6 +744,17 @@ void StyleEngine::ensureFullscreenUAStyle()
m_resolver->resetRuleFeatures();
}
+void StyleEngine::keyframesRulesAdded()
+{
+ if (m_hasUnresolvedKeyframesRule) {
+ m_hasUnresolvedKeyframesRule = false;
+ document().setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleSheetChange));
+ return;
+ }
+
+ document().timeline().invalidateKeyframeEffects();
+}
+
DEFINE_TRACE(StyleEngine)
{
visitor->trace(m_document);
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698