Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: Source/core/animation/css/CSSTransitionData.h

Issue 1096963002: Make UseCounters work on aliased properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/animation/css/CSSAnimations.cpp ('k') | Source/core/css/CSSProperties.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class CSSTransitionData final : public CSSTimingData { 14 class CSSTransitionData final : public CSSTimingData {
15 public: 15 public:
16 enum TransitionPropertyType { 16 enum TransitionPropertyType {
17 TransitionNone, 17 TransitionNone,
18 TransitionSingleProperty, 18 TransitionSingleProperty,
19 TransitionUnknown, 19 TransitionUnknown,
20 TransitionAll 20 TransitionAll
21 }; 21 };
22 22
23 // FIXME: We shouldn't allow 'none' to be used alongside other properties. 23 // FIXME: We shouldn't allow 'none' to be used alongside other properties.
24 struct TransitionProperty { 24 struct TransitionProperty {
25 TransitionProperty(CSSPropertyID id) 25 TransitionProperty(CSSPropertyID id)
26 : propertyType(TransitionSingleProperty) 26 : propertyType(TransitionSingleProperty)
27 , propertyId(id) 27 , unresolvedProperty(id)
28 { 28 {
29 ASSERT(id != CSSPropertyInvalid); 29 ASSERT(id != CSSPropertyInvalid);
30 } 30 }
31 31
32 TransitionProperty(const String& string) 32 TransitionProperty(const String& string)
33 : propertyType(TransitionUnknown) 33 : propertyType(TransitionUnknown)
34 , propertyId(CSSPropertyInvalid) 34 , unresolvedProperty(CSSPropertyInvalid)
35 , propertyString(string) 35 , propertyString(string)
36 { 36 {
37 } 37 }
38 38
39 TransitionProperty(TransitionPropertyType type) 39 TransitionProperty(TransitionPropertyType type)
40 : propertyType(type) 40 : propertyType(type)
41 , propertyId(CSSPropertyInvalid) 41 , unresolvedProperty(CSSPropertyInvalid)
42 { 42 {
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 && unresolvedProperty == other.unresolvedProperty && propertyString == other.propertyString; }
47 47
48 TransitionPropertyType propertyType; 48 TransitionPropertyType propertyType;
49 CSSPropertyID propertyId; 49 CSSPropertyID unresolvedProperty;
50 String propertyString; 50 String propertyString;
51 }; 51 };
52 52
53 static PassOwnPtr<CSSTransitionData> create() 53 static PassOwnPtr<CSSTransitionData> create()
54 { 54 {
55 return adoptPtr(new CSSTransitionData); 55 return adoptPtr(new CSSTransitionData);
56 } 56 }
57 57
58 static PassOwnPtr<CSSTransitionData> create(const CSSTransitionData& transit ionData) 58 static PassOwnPtr<CSSTransitionData> create(const CSSTransitionData& transit ionData)
59 { 59 {
(...skipping 12 matching lines...) Expand all
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
OLDNEW
« no previous file with comments | « Source/core/animation/css/CSSAnimations.cpp ('k') | Source/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698