| Index: third_party/WebKit/Source/core/animation/KeyframeEffect.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/KeyframeEffect.cpp b/third_party/WebKit/Source/core/animation/KeyframeEffect.cpp
|
| index 5d480edfc656d7ccdf24d6886d5609b8ca6e5a16..488143acad3322fafab3882d91f406c778d53ac4 100644
|
| --- a/third_party/WebKit/Source/core/animation/KeyframeEffect.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/KeyframeEffect.cpp
|
| @@ -56,32 +56,31 @@ KeyframeEffect* KeyframeEffect::create(Element* target, EffectModel* model, cons
|
| KeyframeEffect* KeyframeEffect::create(ExecutionContext* executionContext, Element* element, const EffectModelOrDictionarySequenceOrDictionary& effectInput, double duration, ExceptionState& exceptionState)
|
| {
|
| ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
|
| - if (element)
|
| - UseCounter::count(element->document(), UseCounter::AnimationConstructorKeyframeListEffectObjectTiming);
|
| + Document& document = toDocument(*executionContext);
|
| + UseCounter::count(document, UseCounter::AnimationConstructorKeyframeListEffectObjectTiming);
|
| Timing timing;
|
| if (!TimingInput::convert(duration, timing, exceptionState))
|
| return nullptr;
|
| - return create(element, EffectInput::convert(element, effectInput, executionContext, exceptionState), timing);
|
| + return create(element, EffectInput::convert(document, effectInput, executionContext, exceptionState), timing);
|
| }
|
|
|
| KeyframeEffect* KeyframeEffect::create(ExecutionContext* executionContext, Element* element, const EffectModelOrDictionarySequenceOrDictionary& effectInput, const KeyframeEffectOptions& timingInput, ExceptionState& exceptionState)
|
| {
|
| ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
|
| - if (element)
|
| - UseCounter::count(element->document(), UseCounter::AnimationConstructorKeyframeListEffectObjectTiming);
|
| + Document& document = toDocument(*executionContext);
|
| + UseCounter::count(document, UseCounter::AnimationConstructorKeyframeListEffectObjectTiming);
|
| Timing timing;
|
| - Document* document = element ? &element->document() : nullptr;
|
| if (!TimingInput::convert(timingInput, timing, document, exceptionState))
|
| return nullptr;
|
| - return create(element, EffectInput::convert(element, effectInput, executionContext, exceptionState), timing);
|
| + return create(element, EffectInput::convert(document, effectInput, executionContext, exceptionState), timing);
|
| }
|
|
|
| KeyframeEffect* KeyframeEffect::create(ExecutionContext* executionContext, Element* element, const EffectModelOrDictionarySequenceOrDictionary& effectInput, ExceptionState& exceptionState)
|
| {
|
| ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
|
| - if (element)
|
| - UseCounter::count(element->document(), UseCounter::AnimationConstructorKeyframeListEffectNoTiming);
|
| - return create(element, EffectInput::convert(element, effectInput, executionContext, exceptionState), Timing());
|
| + Document& document = toDocument(*executionContext);
|
| + UseCounter::count(document, UseCounter::AnimationConstructorKeyframeListEffectNoTiming);
|
| + return create(element, EffectInput::convert(document, effectInput, executionContext, exceptionState), Timing());
|
| }
|
|
|
| KeyframeEffect::KeyframeEffect(Element* target, EffectModel* model, const Timing& timing, Priority priority, EventDelegate* eventDelegate)
|
|
|