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

Side by Side Diff: third_party/WebKit/Source/core/animation/SizeInterpolationFunctions.cpp

Issue 2761693002: Wrapped PassRefPtrs in move where passed to RefPtr constructor. (Closed)
Patch Set: Added move wraps for multiple instances in 1 line. Created 3 years, 9 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/SizeInterpolationFunctions.h" 5 #include "core/animation/SizeInterpolationFunctions.h"
6 6
7 #include "core/animation/LengthInterpolationFunctions.h" 7 #include "core/animation/LengthInterpolationFunctions.h"
8 #include "core/animation/UnderlyingValueOwner.h" 8 #include "core/animation/UnderlyingValueOwner.h"
9 #include "core/css/CSSIdentifierValue.h" 9 #include "core/css/CSSIdentifierValue.h"
10 #include "core/css/CSSToLengthConversionData.h" 10 #include "core/css/CSSToLengthConversionData.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 private: 44 private:
45 CSSSizeNonInterpolableValue(CSSValueID keyword) 45 CSSSizeNonInterpolableValue(CSSValueID keyword)
46 : m_keyword(keyword), m_lengthNonInterpolableValue(nullptr) { 46 : m_keyword(keyword), m_lengthNonInterpolableValue(nullptr) {
47 DCHECK_NE(keyword, CSSValueInvalid); 47 DCHECK_NE(keyword, CSSValueInvalid);
48 } 48 }
49 49
50 CSSSizeNonInterpolableValue( 50 CSSSizeNonInterpolableValue(
51 PassRefPtr<NonInterpolableValue> lengthNonInterpolableValue) 51 PassRefPtr<NonInterpolableValue> lengthNonInterpolableValue)
52 : m_keyword(CSSValueInvalid), 52 : m_keyword(CSSValueInvalid),
53 m_lengthNonInterpolableValue(lengthNonInterpolableValue) {} 53 m_lengthNonInterpolableValue(std::move(lengthNonInterpolableValue)) {}
54 54
55 CSSValueID m_keyword; 55 CSSValueID m_keyword;
56 RefPtr<NonInterpolableValue> m_lengthNonInterpolableValue; 56 RefPtr<NonInterpolableValue> m_lengthNonInterpolableValue;
57 }; 57 };
58 58
59 DEFINE_NON_INTERPOLABLE_VALUE_TYPE(CSSSizeNonInterpolableValue); 59 DEFINE_NON_INTERPOLABLE_VALUE_TYPE(CSSSizeNonInterpolableValue);
60 DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(CSSSizeNonInterpolableValue); 60 DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(CSSSizeNonInterpolableValue);
61 61
62 static InterpolationValue convertKeyword(CSSValueID keyword) { 62 static InterpolationValue convertKeyword(CSSValueID keyword) {
63 return InterpolationValue(InterpolableList::create(0), 63 return InterpolationValue(InterpolableList::create(0),
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 break; 209 break;
210 } 210 }
211 } 211 }
212 return FillSize( 212 return FillSize(
213 SizeLength, 213 SizeLength,
214 LengthSize(createLength(interpolableValueA, sideA, conversionData), 214 LengthSize(createLength(interpolableValueA, sideA, conversionData),
215 createLength(interpolableValueB, sideB, conversionData))); 215 createLength(interpolableValueB, sideB, conversionData)));
216 } 216 }
217 217
218 } // namespace blink 218 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698