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

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

Issue 635203003: Skip rule matching during animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: ASSERT that the cached animation base RenderStyle is correct 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
Index: Source/core/animation/ActiveAnimations.h
diff --git a/Source/core/animation/ActiveAnimations.h b/Source/core/animation/ActiveAnimations.h
index 64d665b61ae56b85ce6b4cd9e47914812bef4e0e..1c29d4a33fecd069803d684cd9fe1f78c11deac9 100644
--- a/Source/core/animation/ActiveAnimations.h
+++ b/Source/core/animation/ActiveAnimations.h
@@ -33,6 +33,7 @@
#include "core/animation/AnimationStack.h"
#include "core/animation/css/CSSAnimations.h"
+#include "core/rendering/style/RenderStyle.h"
#include "wtf/HashCountedSet.h"
#include "wtf/HashMap.h"
#include "wtf/RefPtr.h"
@@ -75,6 +76,17 @@ public:
void updateAnimationFlags(RenderStyle&);
void setAnimationStyleChange(bool animationStyleChange) { m_animationStyleChange = animationStyleChange; }
+ bool isAnimationStyleChange() const { return m_animationStyleChange; }
+
+ const RenderStyle* baseRenderStyle() const { return m_baseRenderStyle.get(); }
+ void setBaseRenderStyle(PassRefPtr<RenderStyle> renderStyle)
esprehn 2014/10/13 18:19:33 Can we make this out of line instead? Then we don'
rune 2014/10/13 21:31:48 Done.
+ {
+#if ENABLE(ASSERT)
+ if (m_baseRenderStyle && renderStyle)
+ ASSERT(*m_baseRenderStyle == *renderStyle);
+#endif
+ m_baseRenderStyle = renderStyle;
+ }
#if !ENABLE(OILPAN)
void addAnimation(Animation* animation) { m_animations.append(animation); }
@@ -84,12 +96,11 @@ public:
void trace(Visitor*);
private:
- bool isAnimationStyleChange() const { return m_animationStyleChange; }
-
AnimationStack m_defaultStack;
CSSAnimations m_cssAnimations;
AnimationPlayerCountedSet m_players;
bool m_animationStyleChange;
+ RefPtr<RenderStyle> m_baseRenderStyle;
#if !ENABLE(OILPAN)
// FIXME: Oilpan: This is to avoid a reference cycle that keeps Elements alive
« no previous file with comments | « no previous file | Source/core/css/resolver/StyleResolver.cpp » ('j') | Source/core/css/resolver/StyleResolver.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698