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

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

Issue 2886373002: Replace CSSTransitionData::Create(CSSTransition) with clone method. (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | third_party/WebKit/Source/core/style/StyleRareNonInheritedData.cpp » ('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 <memory> 8 #include <memory>
9 #include "core/CSSPropertyNames.h" 9 #include "core/CSSPropertyNames.h"
10 #include "core/animation/css/CSSTimingData.h" 10 #include "core/animation/css/CSSTimingData.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 TransitionPropertyType property_type; 48 TransitionPropertyType property_type;
49 CSSPropertyID unresolved_property; 49 CSSPropertyID unresolved_property;
50 AtomicString property_string; 50 AtomicString property_string;
51 }; 51 };
52 52
53 static std::unique_ptr<CSSTransitionData> Create() { 53 static std::unique_ptr<CSSTransitionData> Create() {
54 return WTF::WrapUnique(new CSSTransitionData); 54 return WTF::WrapUnique(new CSSTransitionData);
55 } 55 }
56 56
57 static std::unique_ptr<CSSTransitionData> Create( 57 std::unique_ptr<CSSTransitionData> Clone() {
58 const CSSTransitionData& transition_data) { 58 return WTF::WrapUnique(new CSSTransitionData(*this));
59 return WTF::WrapUnique(new CSSTransitionData(transition_data));
60 } 59 }
61 60
62 bool TransitionsMatchForStyleRecalc(const CSSTransitionData& other) const; 61 bool TransitionsMatchForStyleRecalc(const CSSTransitionData& other) const;
63 62
64 Timing ConvertToTiming(size_t index) const; 63 Timing ConvertToTiming(size_t index) const;
65 64
66 const Vector<TransitionProperty>& PropertyList() const { 65 const Vector<TransitionProperty>& PropertyList() const {
67 return property_list_; 66 return property_list_;
68 } 67 }
69 Vector<TransitionProperty>& PropertyList() { return property_list_; } 68 Vector<TransitionProperty>& PropertyList() { return property_list_; }
70 69
71 static TransitionProperty InitialProperty() { 70 static TransitionProperty InitialProperty() {
72 return TransitionProperty(CSSPropertyAll); 71 return TransitionProperty(CSSPropertyAll);
73 } 72 }
74 73
75 private: 74 private:
76 CSSTransitionData(); 75 CSSTransitionData();
77 explicit CSSTransitionData(const CSSTransitionData&); 76 explicit CSSTransitionData(const CSSTransitionData&);
78 77
79 Vector<TransitionProperty> property_list_; 78 Vector<TransitionProperty> property_list_;
80 }; 79 };
81 80
82 } // namespace blink 81 } // namespace blink
83 82
84 #endif // CSSTransitionData_h 83 #endif // CSSTransitionData_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/StyleRareNonInheritedData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698