| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 return nullptr; | 63 return nullptr; |
| 64 return create(element, EffectInput::convert(element, effectInput, executionC
ontext, exceptionState), timing); | 64 return create(element, EffectInput::convert(element, effectInput, executionC
ontext, exceptionState), timing); |
| 65 } | 65 } |
| 66 | 66 |
| 67 KeyframeEffect* KeyframeEffect::create(ExecutionContext* executionContext, Eleme
nt* element, const EffectModelOrDictionarySequenceOrDictionary& effectInput, con
st KeyframeEffectOptions& timingInput, ExceptionState& exceptionState) | 67 KeyframeEffect* KeyframeEffect::create(ExecutionContext* executionContext, Eleme
nt* element, const EffectModelOrDictionarySequenceOrDictionary& effectInput, con
st KeyframeEffectOptions& timingInput, ExceptionState& exceptionState) |
| 68 { | 68 { |
| 69 ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); | 69 ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); |
| 70 if (element) | 70 if (element) |
| 71 UseCounter::count(element->document(), UseCounter::AnimationConstructorK
eyframeListEffectObjectTiming); | 71 UseCounter::count(element->document(), UseCounter::AnimationConstructorK
eyframeListEffectObjectTiming); |
| 72 Timing timing; | 72 Timing timing; |
| 73 if (!TimingInput::convert(timingInput, timing, &element->document(), excepti
onState)) | 73 Document* document = element ? &element->document() : nullptr; |
| 74 if (!TimingInput::convert(timingInput, timing, document, exceptionState)) |
| 74 return nullptr; | 75 return nullptr; |
| 75 return create(element, EffectInput::convert(element, effectInput, executionC
ontext, exceptionState), timing); | 76 return create(element, EffectInput::convert(element, effectInput, executionC
ontext, exceptionState), timing); |
| 76 } | 77 } |
| 77 | 78 |
| 78 KeyframeEffect* KeyframeEffect::create(ExecutionContext* executionContext, Eleme
nt* element, const EffectModelOrDictionarySequenceOrDictionary& effectInput, Exc
eptionState& exceptionState) | 79 KeyframeEffect* KeyframeEffect::create(ExecutionContext* executionContext, Eleme
nt* element, const EffectModelOrDictionarySequenceOrDictionary& effectInput, Exc
eptionState& exceptionState) |
| 79 { | 80 { |
| 80 ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); | 81 ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled()); |
| 81 if (element) | 82 if (element) |
| 82 UseCounter::count(element->document(), UseCounter::AnimationConstructorK
eyframeListEffectNoTiming); | 83 UseCounter::count(element->document(), UseCounter::AnimationConstructorK
eyframeListEffectNoTiming); |
| 83 return create(element, EffectInput::convert(element, effectInput, executionC
ontext, exceptionState), Timing()); | 84 return create(element, EffectInput::convert(element, effectInput, executionC
ontext, exceptionState), Timing()); |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 | 372 |
| 372 DEFINE_TRACE(KeyframeEffect) | 373 DEFINE_TRACE(KeyframeEffect) |
| 373 { | 374 { |
| 374 visitor->trace(m_target); | 375 visitor->trace(m_target); |
| 375 visitor->trace(m_model); | 376 visitor->trace(m_model); |
| 376 visitor->trace(m_sampledEffect); | 377 visitor->trace(m_sampledEffect); |
| 377 AnimationEffect::trace(visitor); | 378 AnimationEffect::trace(visitor); |
| 378 } | 379 } |
| 379 | 380 |
| 380 } // namespace blink | 381 } // namespace blink |
| OLD | NEW |