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/CSSTransitionData.h" | 5 #include "core/animation/css/CSSTransitionData.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 CSSTransitionData::CSSTransitionData() { | 11 CSSTransitionData::CSSTransitionData() { |
12 m_propertyList.append(initialProperty()); | 12 m_propertyList.push_back(initialProperty()); |
13 } | 13 } |
14 | 14 |
15 CSSTransitionData::CSSTransitionData(const CSSTransitionData& other) | 15 CSSTransitionData::CSSTransitionData(const CSSTransitionData& other) |
16 : CSSTimingData(other), m_propertyList(other.m_propertyList) {} | 16 : CSSTimingData(other), m_propertyList(other.m_propertyList) {} |
17 | 17 |
18 bool CSSTransitionData::transitionsMatchForStyleRecalc( | 18 bool CSSTransitionData::transitionsMatchForStyleRecalc( |
19 const CSSTransitionData& other) const { | 19 const CSSTransitionData& other) const { |
20 return m_propertyList == other.m_propertyList; | 20 return m_propertyList == other.m_propertyList; |
21 } | 21 } |
22 | 22 |
23 Timing CSSTransitionData::convertToTiming(size_t index) const { | 23 Timing CSSTransitionData::convertToTiming(size_t index) const { |
24 DCHECK_LT(index, m_propertyList.size()); | 24 DCHECK_LT(index, m_propertyList.size()); |
25 // Note that the backwards fill part is required for delay to work. | 25 // Note that the backwards fill part is required for delay to work. |
26 Timing timing = CSSTimingData::convertToTiming(index); | 26 Timing timing = CSSTimingData::convertToTiming(index); |
27 timing.fillMode = Timing::FillMode::NONE; | 27 timing.fillMode = Timing::FillMode::NONE; |
28 return timing; | 28 return timing; |
29 } | 29 } |
30 | 30 |
31 } // namespace blink | 31 } // namespace blink |
OLD | NEW |