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 #ifndef CSSTransitionData_h | 5 #ifndef CSSTransitionData_h |
6 #define CSSTransitionData_h | 6 #define CSSTransitionData_h |
7 | 7 |
8 #include "core/CSSPropertyNames.h" | 8 #include "core/CSSPropertyNames.h" |
9 #include "core/animation/css/CSSTimingData.h" | 9 #include "core/animation/css/CSSTimingData.h" |
10 #include "wtf/Vector.h" | 10 #include "wtf/Vector.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 ASSERT(type == TransitionNone || type == TransitionAll); | 43 ASSERT(type == TransitionNone || type == TransitionAll); |
44 } | 44 } |
45 | 45 |
46 bool operator==(const TransitionProperty& other) const { return property
Type == other.propertyType && propertyId == other.propertyId && propertyString =
= other.propertyString; } | 46 bool operator==(const TransitionProperty& other) const { return property
Type == other.propertyType && propertyId == other.propertyId && propertyString =
= other.propertyString; } |
47 | 47 |
48 TransitionPropertyType propertyType; | 48 TransitionPropertyType propertyType; |
49 CSSPropertyID propertyId; | 49 CSSPropertyID propertyId; |
50 String propertyString; | 50 String propertyString; |
51 }; | 51 }; |
52 | 52 |
53 static PassOwnPtrWillBeRawPtr<CSSTransitionData> create() | 53 static PassOwnPtr<CSSTransitionData> create() |
54 { | 54 { |
55 return adoptPtrWillBeNoop(new CSSTransitionData); | 55 return adoptPtr(new CSSTransitionData); |
56 } | 56 } |
57 | 57 |
58 static PassOwnPtrWillBeRawPtr<CSSTransitionData> create(const CSSTransitionD
ata& transitionData) | 58 static PassOwnPtr<CSSTransitionData> create(const CSSTransitionData& transit
ionData) |
59 { | 59 { |
60 return adoptPtrWillBeNoop(new CSSTransitionData(transitionData)); | 60 return adoptPtr(new CSSTransitionData(transitionData)); |
61 } | 61 } |
62 | 62 |
63 bool transitionsMatchForStyleRecalc(const CSSTransitionData& other) const; | 63 bool transitionsMatchForStyleRecalc(const CSSTransitionData& other) const; |
64 | 64 |
65 Timing convertToTiming(size_t index) const; | 65 Timing convertToTiming(size_t index) const; |
66 | 66 |
67 const Vector<TransitionProperty>& propertyList() const { return m_propertyLi
st; } | 67 const Vector<TransitionProperty>& propertyList() const { return m_propertyLi
st; } |
68 Vector<TransitionProperty>& propertyList() { return m_propertyList; } | 68 Vector<TransitionProperty>& propertyList() { return m_propertyList; } |
69 | 69 |
70 static TransitionProperty initialProperty() { return TransitionProperty(Tran
sitionAll); } | 70 static TransitionProperty initialProperty() { return TransitionProperty(Tran
sitionAll); } |
71 | 71 |
72 private: | 72 private: |
73 CSSTransitionData(); | 73 CSSTransitionData(); |
74 explicit CSSTransitionData(const CSSTransitionData&); | 74 explicit CSSTransitionData(const CSSTransitionData&); |
75 | 75 |
76 Vector<TransitionProperty> m_propertyList; | 76 Vector<TransitionProperty> m_propertyList; |
77 }; | 77 }; |
78 | 78 |
79 } // namespace blink | 79 } // namespace blink |
80 | 80 |
81 #endif // CSSTransitionData_h | 81 #endif // CSSTransitionData_h |
OLD | NEW |