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

Unified Diff: Source/core/animation/ActiveAnimations.cpp

Issue 635203003: Skip rule matching during animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moved baseRenderStyle handling into ActiveAnimations Created 6 years, 2 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 | « Source/core/animation/ActiveAnimations.h ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/ActiveAnimations.cpp
diff --git a/Source/core/animation/ActiveAnimations.cpp b/Source/core/animation/ActiveAnimations.cpp
index 586de09c0a5368685d59bb9d04f755fa34cc107a..0b8a87b55d365941e09d15e1c5db89d3c7a5d3c8 100644
--- a/Source/core/animation/ActiveAnimations.cpp
+++ b/Source/core/animation/ActiveAnimations.cpp
@@ -35,6 +35,11 @@
namespace blink {
+ActiveAnimations::ActiveAnimations()
+ : m_animationStyleChange(false)
+{
+}
+
ActiveAnimations::~ActiveAnimations()
{
#if !ENABLE(OILPAN)
@@ -85,4 +90,26 @@ void ActiveAnimations::trace(Visitor* visitor)
#endif
}
+const RenderStyle* ActiveAnimations::baseRenderStyle() const
+{
+#if !ENABLE(ASSERT)
+ if (isAnimationStyleChange())
+ return m_baseRenderStyle.get();
+#endif
+ return nullptr;
+}
+
+void ActiveAnimations::updateBaseRenderStyle(const RenderStyle* renderStyle)
+{
+ if (!isAnimationStyleChange()) {
+ m_baseRenderStyle = nullptr;
+ return;
+ }
+#if ENABLE(ASSERT)
+ if (m_baseRenderStyle && renderStyle)
+ ASSERT(*m_baseRenderStyle == *renderStyle);
+#endif
+ m_baseRenderStyle = RenderStyle::clone(renderStyle);
+}
+
} // namespace blink
« no previous file with comments | « Source/core/animation/ActiveAnimations.h ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698