| 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/css/CSSTimingData.h" | 5 #include "core/animation/css/CSSTimingData.h" |
| 6 | 6 |
| 7 #include "core/animation/Timing.h" | 7 #include "core/animation/Timing.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| 11 CSSTimingData::CSSTimingData() { | 11 CSSTimingData::CSSTimingData() { |
| 12 m_delayList.append(initialDelay()); | 12 m_delayList.push_back(initialDelay()); |
| 13 m_durationList.append(initialDuration()); | 13 m_durationList.push_back(initialDuration()); |
| 14 m_timingFunctionList.append(initialTimingFunction()); | 14 m_timingFunctionList.push_back(initialTimingFunction()); |
| 15 } | 15 } |
| 16 | 16 |
| 17 CSSTimingData::CSSTimingData(const CSSTimingData& other) | 17 CSSTimingData::CSSTimingData(const CSSTimingData& other) |
| 18 : m_delayList(other.m_delayList), | 18 : m_delayList(other.m_delayList), |
| 19 m_durationList(other.m_durationList), | 19 m_durationList(other.m_durationList), |
| 20 m_timingFunctionList(other.m_timingFunctionList) {} | 20 m_timingFunctionList(other.m_timingFunctionList) {} |
| 21 | 21 |
| 22 Timing CSSTimingData::convertToTiming(size_t index) const { | 22 Timing CSSTimingData::convertToTiming(size_t index) const { |
| 23 Timing timing; | 23 Timing timing; |
| 24 timing.startDelay = getRepeated(m_delayList, index); | 24 timing.startDelay = getRepeated(m_delayList, index); |
| 25 timing.iterationDuration = getRepeated(m_durationList, index); | 25 timing.iterationDuration = getRepeated(m_durationList, index); |
| 26 timing.timingFunction = getRepeated(m_timingFunctionList, index); | 26 timing.timingFunction = getRepeated(m_timingFunctionList, index); |
| 27 timing.assertValid(); | 27 timing.assertValid(); |
| 28 return timing; | 28 return timing; |
| 29 } | 29 } |
| 30 | 30 |
| 31 } // namespace blink | 31 } // namespace blink |
| OLD | NEW |