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

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

Issue 25079006: Update CSSAnimationUpdate and CSSAnimations to handle multiple animations with a given name (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Minor fixes Created 7 years, 3 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 816c94ae9f957585da1a500f60e5cbc3f496fe1d..7d34c1c50d779b90588ebb348dc5f746f498d382 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -1220,20 +1220,22 @@ bool StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Doc
// applyAnimatedProperties(state, resolved);
const Vector<CSSAnimationUpdate::NewAnimation>& newAnimations = update->newAnimations();
for (size_t i = 0; i < newAnimations.size(); ++i) {
- RefPtr<InertAnimation> animation = newAnimations.at(i).animation;
- OwnPtr<AnimationEffect::CompositableValueMap> compositableValues = animation->sample();
- if (!compositableValues)
- continue;
- for (AnimationEffect::CompositableValueMap::const_iterator iter = compositableValues->begin(); iter != compositableValues->end(); ++iter) {
- CSSPropertyID property = iter->key;
- if (!isPropertyForPass<pass>(property))
+ const HashSet<RefPtr<InertAnimation> >& animations = newAnimations.at(i).animations;
+ for (HashSet<RefPtr<InertAnimation> >::const_iterator animationsIter = animations.begin(); animationsIter != animations.end(); ++animationsIter) {
+ OwnPtr<AnimationEffect::CompositableValueMap> compositableValues = (*animationsIter)->sample();
+ if (!compositableValues)
continue;
- RefPtr<AnimatableValue> animatableValue = iter->value->compositeOnto(AnimatableValue::neutralValue());
- if (pass == HighPriorityProperties && property == CSSPropertyLineHeight)
- state.setLineHeightValue(toAnimatableNumber(animatableValue.get())->toCSSValue().get());
- else
- AnimatedStyleBuilder::applyProperty(property, state, animatableValue.get());
- didApply = true;
+ for (AnimationEffect::CompositableValueMap::const_iterator iter = compositableValues->begin(); iter != compositableValues->end(); ++iter) {
+ CSSPropertyID property = iter->key;
+ if (!isPropertyForPass<pass>(property))
+ continue;
+ RefPtr<AnimatableValue> animatableValue = iter->value->compositeOnto(AnimatableValue::neutralValue());
+ if (pass == HighPriorityProperties && property == CSSPropertyLineHeight)
+ state.setLineHeightValue(toAnimatableNumber(animatableValue.get())->toCSSValue().get());
+ else
+ AnimatedStyleBuilder::applyProperty(property, state, animatableValue.get());
+ didApply = true;
+ }
}
}
return didApply;
« Source/core/animation/css/CSSAnimations.cpp ('K') | « Source/core/animation/css/CSSAnimations.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698