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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 19266007: Web Animations: Introduce ActiveAnimations and AnimationStack (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 6f544242c4d57bf8edacbec294f2b9fa4197967a..6fdd05cfee50af0d931230665ca386563d81ba35 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -37,6 +37,7 @@
#include "XMLNames.h"
#include "core/animation/AnimatableValue.h"
#include "core/animation/Animation.h"
+#include "core/animation/DocumentTimeline.h"
#include "core/css/CSSCalculationValue.h"
#include "core/css/CSSCursorImageValue.h"
#include "core/css/CSSDefaultStyleSheets.h"
@@ -1054,13 +1055,14 @@ void StyleResolver::applyAnimatedProperties(const Element* target)
{
ASSERT(pass != VariableDefinitions);
ASSERT(pass != AnimationProperties);
- if (!target->hasActiveAnimations())
+ AnimationStack animationStack = target->document()->timeline()->animationStack();
+ if (!animationStack.hasActiveAnimations(target))
esprehn 2013/07/17 06:48:01 This requires two hash lookups now for every eleme
dstockwell 2013/07/17 13:10:19 I think we should still proceed with this for now.
return;
- Vector<Animation*>* animations = target->activeAnimations();
+ const Vector<Animation*>& animations = animationStack.activeAnimations(target);
- for (size_t i = 0; i < animations->size(); ++i) {
- RefPtr<Animation> animation = animations->at(i);
+ for (size_t i = 0; i < animations.size(); ++i) {
+ RefPtr<Animation> animation = animations.at(i);
const AnimationEffect::CompositableValueMap* compositableValues = animation->compositableValues();
for (AnimationEffect::CompositableValueMap::const_iterator iter = compositableValues->begin(); iter != compositableValues->end(); ++iter) {
CSSPropertyID property = iter->key;

Powered by Google App Engine
This is Rietveld 408576698