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

Unified Diff: Source/core/dom/Element.cpp

Issue 110123005: Web Animations CSS: Record if style recalc is for animation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Ignore new interrupted immediately test when testing legacy animations engine Created 7 years 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 | « Source/core/dom/Element.h ('k') | Source/core/dom/Node.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 36485390723f6e64708292b3bc8c29698978ce23..1dec7bd36ca948ff5c4ae4e393a9308081ff5cbc 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1534,6 +1534,11 @@ void Element::recalcStyle(StyleRecalcChange change, Text* nextTextSibling)
ElementRareData* data = elementRareData();
data->resetStyleState();
data->clearComputedStyle();
+
+ if (change >= Inherit) {
+ if (ActiveAnimations* activeAnimations = data->activeAnimations())
+ activeAnimations->setAnimationStyleChange(false);
+ }
}
if (parentRenderStyle())
change = recalcOwnStyle(change);
@@ -1723,6 +1728,21 @@ void Element::didAffectSelector(AffectedSelectorMask mask)
elementShadow->didAffectSelector(mask);
}
+void Element::setAnimationStyleChange(bool animationStyleChange)
+{
+ if (ActiveAnimations* activeAnimations = elementRareData()->activeAnimations())
+ activeAnimations->setAnimationStyleChange(animationStyleChange);
+}
+
+void Element::setNeedsAnimationStyleRecalc()
+{
+ if (styleChangeType() != NoStyleChange)
+ return;
+
+ setNeedsStyleRecalc(LocalStyleChange, StyleChangeFromRenderer);
+ setAnimationStyleChange(true);
+}
+
PassRefPtr<ShadowRoot> Element::createShadowRoot(ExceptionState& exceptionState)
{
if (alwaysCreateUserAgentShadowRoot())
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698