Chromium Code Reviews| 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; |