Index: Source/core/animation/css/CSSAnimations.cpp |
diff --git a/Source/core/animation/css/CSSAnimations.cpp b/Source/core/animation/css/CSSAnimations.cpp |
index 48c7f5cd54caf7f8c7b706297278be2066d5daa3..493ae473deb86d8f27baadb9b1bd3d2361ffcc19 100644 |
--- a/Source/core/animation/css/CSSAnimations.cpp |
+++ b/Source/core/animation/css/CSSAnimations.cpp |
@@ -65,7 +65,7 @@ using PropertySet = HashSet<CSSPropertyID>; |
namespace { |
-static PassRefPtrWillBeRawPtr<StringKeyframeEffectModel> createKeyframeEffectModel(StyleResolver* resolver, const Element* animatingElement, Element& element, const ComputedStyle* style, const ComputedStyle* parentStyle, const AtomicString& name, TimingFunction* defaultTimingFunction) |
+static PassRefPtrWillBeRawPtr<StringKeyframeEffectModel> createKeyframeEffectModel(StyleResolver* resolver, const Element* animatingElement, Element& element, const ComputedStyle* style, const ComputedStyle* parentStyle, const AtomicString& name, TimingFunction* defaultTimingFunction, size_t animationIndex) |
{ |
// When the animating element is null, use its parent for scoping purposes. |
const Element* elementForScoping = animatingElement ? animatingElement : &element; |
@@ -173,6 +173,8 @@ static PassRefPtrWillBeRawPtr<StringKeyframeEffectModel> createKeyframeEffectMod |
RefPtrWillBeRawPtr<StringKeyframeEffectModel> model = StringKeyframeEffectModel::create(keyframes, &keyframes[0]->easing()); |
model->forceConversionsToAnimatableValues(element, style); |
+ if (animationIndex > 0 && model->hasSyntheticKeyframes()) |
+ UseCounter::count(elementForScoping->document(), UseCounter::CSSAnimationsStackedNeutralKeyframe); |
return model; |
} |
@@ -261,7 +263,7 @@ void CSSAnimations::calculateAnimationUpdate(CSSAnimationUpdate* update, const E |
if (keyframesRule != runningAnimation->styleRule || keyframesRule->version() != runningAnimation->styleRuleVersion || runningAnimation->specifiedTiming != specifiedTiming) { |
ASSERT(!isAnimationStyleChange); |
update->updateAnimation(animationName, animation, InertEffect::create( |
- createKeyframeEffectModel(resolver, animatingElement, element, &style, parentStyle, animationName, keyframeTimingFunction.get()), |
+ createKeyframeEffectModel(resolver, animatingElement, element, &style, parentStyle, animationName, keyframeTimingFunction.get(), i), |
timing, isPaused, animation->unlimitedCurrentTimeInternal()), specifiedTiming, keyframesRule); |
} else if (!isAnimationStyleChange && animation->effect() && animation->effect()->isAnimation()) { |
EffectModel* model = toKeyframeEffect(animation->effect())->model(); |
@@ -283,7 +285,7 @@ void CSSAnimations::calculateAnimationUpdate(CSSAnimationUpdate* update, const E |
ASSERT(!isAnimationStyleChange); |
update->startAnimation(animationName, InertEffect::create( |
- createKeyframeEffectModel(resolver, animatingElement, element, &style, parentStyle, animationName, keyframeTimingFunction.get()), |
+ createKeyframeEffectModel(resolver, animatingElement, element, &style, parentStyle, animationName, keyframeTimingFunction.get(), i), |
timing, isPaused, 0), specifiedTiming, keyframesRule); |
} |
} |