Chromium Code Reviews| 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 c727df720e6836267ced8c74546890918284b8ab..b9b2566d6be448651e12d2cf3cb2e11d2a9c3a42 100644 |
| --- a/third_party/WebKit/Source/core/animation/KeyframeEffect.cpp |
| +++ b/third_party/WebKit/Source/core/animation/KeyframeEffect.cpp |
| @@ -58,15 +58,24 @@ KeyframeEffect* KeyframeEffect::create(ExecutionContext* executionContext, Eleme |
| ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); |
| if (element) |
| UseCounter::count(element->document(), UseCounter::AnimationConstructorKeyframeListEffectObjectTiming); |
| - return create(element, EffectInput::convert(element, effectInput, executionContext, exceptionState), TimingInput::convert(duration)); |
| + Timing timing; |
| + ASSERT(TimingInput::convert(duration, timing)); |
|
alancutter (OOO until 2018)
2016/04/05 04:50:06
ASSERTs don't get compiled into official builds, y
suzyh_UTC10 (ex-contributor)
2016/04/12 08:04:23
Fixed.
|
| + return create(element, EffectInput::convert(element, 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); |
| - return create(element, EffectInput::convert(element, effectInput, executionContext, exceptionState), TimingInput::convert(timingInput)); |
| + Timing timing; |
| + bool success = TimingInput::convert(timingInput, timing, exceptionState); |
| + if (!success || exceptionState.hadException()) |
| + return nullptr; |
| + |
| + return create(element, EffectInput::convert(element, effectInput, executionContext, exceptionState), timing); |
| } |
| + |
| KeyframeEffect* KeyframeEffect::create(ExecutionContext* executionContext, Element* element, const EffectModelOrDictionarySequenceOrDictionary& effectInput, ExceptionState& exceptionState) |
| { |
| ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); |