Chromium Code Reviews| 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/TimingInput.h" | 5 #include "core/animation/TimingInput.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "core/animation/AnimationInputHelpers.h" | 8 #include "core/animation/AnimationInputHelpers.h" |
| 9 #include "core/animation/KeyframeEffectOptions.h" | 9 #include "core/animation/KeyframeEffectOptions.h" |
| 10 | 10 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 | 123 |
| 124 if (!setIterationStart(timingOutput, timingInput.iterationStart(), exception State)) | 124 if (!setIterationStart(timingOutput, timingInput.iterationStart(), exception State)) |
| 125 return false; | 125 return false; |
| 126 | 126 |
| 127 if (!setIterationCount(timingOutput, timingInput.iterations(), exceptionStat e)) | 127 if (!setIterationCount(timingOutput, timingInput.iterations(), exceptionStat e)) |
| 128 return false; | 128 return false; |
| 129 | 129 |
| 130 if (!setIterationDuration(timingOutput, timingInput.duration(), exceptionSta te)) | 130 if (!setIterationDuration(timingOutput, timingInput.duration(), exceptionSta te)) |
| 131 return false; | 131 return false; |
| 132 | 132 |
| 133 setPlaybackRate(timingOutput, timingInput.playbackRate()); | 133 setPlaybackRate(timingOutput, 1.0); |
|
alancutter (OOO until 2018)
2016/08/09 03:45:48
TODO remove Timing::playbackRate.
| |
| 134 setPlaybackDirection(timingOutput, timingInput.direction()); | 134 setPlaybackDirection(timingOutput, timingInput.direction()); |
| 135 | 135 |
| 136 if (!setTimingFunction(timingOutput, timingInput.easing(), document, excepti onState)) | 136 if (!setTimingFunction(timingOutput, timingInput.easing(), document, excepti onState)) |
| 137 return false; | 137 return false; |
| 138 | 138 |
| 139 timingOutput.assertValid(); | 139 timingOutput.assertValid(); |
| 140 | 140 |
| 141 return true; | 141 return true; |
| 142 } | 142 } |
| 143 | 143 |
| 144 bool TimingInput::convert(double duration, Timing& timingOutput, ExceptionState& exceptionState) | 144 bool TimingInput::convert(double duration, Timing& timingOutput, ExceptionState& exceptionState) |
| 145 { | 145 { |
| 146 ASSERT(timingOutput == Timing::defaults()); | 146 ASSERT(timingOutput == Timing::defaults()); |
| 147 return setIterationDuration(timingOutput, UnrestrictedDoubleOrString::fromUn restrictedDouble(duration), exceptionState); | 147 return setIterationDuration(timingOutput, UnrestrictedDoubleOrString::fromUn restrictedDouble(duration), exceptionState); |
| 148 } | 148 } |
| 149 | 149 |
| 150 } // namespace blink | 150 } // namespace blink |
| OLD | NEW |