| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/animation/AnimationEffectTiming.h" | 5 #include "core/animation/AnimationEffectTiming.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" |
| 7 #include "bindings/core/v8/UnionTypesCore.h" | 8 #include "bindings/core/v8/UnionTypesCore.h" |
| 8 #include "core/animation/AnimationEffect.h" | 9 #include "core/animation/AnimationEffect.h" |
| 9 #include "core/animation/KeyframeEffect.h" | 10 #include "core/animation/KeyframeEffect.h" |
| 10 #include "platform/animation/TimingFunction.h" | 11 #include "platform/animation/TimingFunction.h" |
| 11 | 12 |
| 12 namespace blink { | 13 namespace blink { |
| 13 | 14 |
| 14 AnimationEffectTiming* AnimationEffectTiming::create(AnimationEffect* parent) | 15 AnimationEffectTiming* AnimationEffectTiming::create(AnimationEffect* parent) |
| 15 { | 16 { |
| 16 return new AnimationEffectTiming(parent); | 17 return new AnimationEffectTiming(parent); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 m_parent->updateSpecifiedTiming(timing); | 121 m_parent->updateSpecifiedTiming(timing); |
| 121 } | 122 } |
| 122 | 123 |
| 123 void AnimationEffectTiming::setDirection(String direction) | 124 void AnimationEffectTiming::setDirection(String direction) |
| 124 { | 125 { |
| 125 Timing timing = m_parent->specifiedTiming(); | 126 Timing timing = m_parent->specifiedTiming(); |
| 126 TimingInput::setPlaybackDirection(timing, direction); | 127 TimingInput::setPlaybackDirection(timing, direction); |
| 127 m_parent->updateSpecifiedTiming(timing); | 128 m_parent->updateSpecifiedTiming(timing); |
| 128 } | 129 } |
| 129 | 130 |
| 130 void AnimationEffectTiming::setEasing(String easing) | 131 void AnimationEffectTiming::setEasing(String easing, ExceptionState& exceptionSt
ate) |
| 131 { | 132 { |
| 132 Timing timing = m_parent->specifiedTiming(); | 133 Timing timing = m_parent->specifiedTiming(); |
| 133 // The AnimationEffectTiming might not be attached to a document at this | 134 // The AnimationEffectTiming might not be attached to a document at this |
| 134 // point, so we pass nullptr in to setTimingFunction. This means that these | 135 // point, so we pass nullptr in to setTimingFunction. This means that these |
| 135 // calls are not considered in the WebAnimationsEasingAsFunction* | 136 // calls are not considered in the WebAnimationsEasingAsFunction* |
| 136 // UseCounters, but the bug we are tracking there does not come through | 137 // UseCounters, but the bug we are tracking there does not come through |
| 137 // this interface. | 138 // this interface. |
| 138 TimingInput::setTimingFunction(timing, easing, nullptr); | 139 if (TimingInput::setTimingFunction(timing, easing, nullptr, exceptionState)) |
| 139 m_parent->updateSpecifiedTiming(timing); | 140 m_parent->updateSpecifiedTiming(timing); |
| 140 } | 141 } |
| 141 | 142 |
| 142 DEFINE_TRACE(AnimationEffectTiming) | 143 DEFINE_TRACE(AnimationEffectTiming) |
| 143 { | 144 { |
| 144 visitor->trace(m_parent); | 145 visitor->trace(m_parent); |
| 145 } | 146 } |
| 146 | 147 |
| 147 } // namespace blink | 148 } // namespace blink |
| OLD | NEW |