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

Side by Side Diff: Source/core/animation/DoubleStyleInterpolation.cpp

Issue 1265853003: CSSValue Immediates: Immediates from all CSSPrimitiveValue constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@tagged_ptrs_base
Patch Set: Created 5 years, 4 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 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 "config.h" 5 #include "config.h"
6 #include "core/animation/DoubleStyleInterpolation.h" 6 #include "core/animation/DoubleStyleInterpolation.h"
7 7
8 #include "core/css/CSSCalculationValue.h" 8 #include "core/css/CSSCalculationValue.h"
9 #include "core/css/resolver/StyleBuilder.h" 9 #include "core/css/resolver/StyleBuilder.h"
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 return true; 120 return true;
121 } 121 }
122 122
123 } // namespace 123 } // namespace
124 124
125 PassRefPtrWillBeRawPtr<CSSValue> DoubleStyleInterpolation::interpolableValueToMo tionRotation(InterpolableValue* value, bool flag) 125 PassRefPtrWillBeRawPtr<CSSValue> DoubleStyleInterpolation::interpolableValueToMo tionRotation(InterpolableValue* value, bool flag)
126 { 126 {
127 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ; 127 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ;
128 if (flag) 128 if (flag)
129 list->append(CSSPrimitiveValue::createIdentifier(CSSValueAuto)); 129 list->append(CSSPrimitiveValue::create(CSSValueAuto));
130 ASSERT(value->isNumber()); 130 ASSERT(value->isNumber());
131 list->append(CSSPrimitiveValue::create(toInterpolableNumber(value)->value(), CSSPrimitiveValue::CSS_DEG)); 131 list->append(CSSPrimitiveValue::create(toInterpolableNumber(value)->value(), CSSPrimitiveValue::CSS_DEG));
132 return list.release(); 132 return list.release();
133 } 133 }
134 134
135 PassOwnPtrWillBeRawPtr<InterpolableValue> DoubleStyleInterpolation::motionRotati onToInterpolableValue(const CSSValue& value) 135 PassOwnPtrWillBeRawPtr<InterpolableValue> DoubleStyleInterpolation::motionRotati onToInterpolableValue(const CSSValue& value)
136 { 136 {
137 float rotation; 137 float rotation;
138 MotionRotationType rotationType; 138 MotionRotationType rotationType;
139 extractMotionRotation(value, &rotation, &rotationType); 139 extractMotionRotation(value, &rotation, &rotationType);
(...skipping 11 matching lines...) Expand all
151 || startRotationType != endRotationType) 151 || startRotationType != endRotationType)
152 return nullptr; 152 return nullptr;
153 153
154 return adoptRefWillBeNoop(new DoubleStyleInterpolation( 154 return adoptRefWillBeNoop(new DoubleStyleInterpolation(
155 motionRotationToInterpolableValue(start), 155 motionRotationToInterpolableValue(start),
156 motionRotationToInterpolableValue(end), 156 motionRotationToInterpolableValue(end),
157 id, true, InterpolationRange::RangeAll, startRotationType == MotionRotat ionAuto)); 157 id, true, InterpolationRange::RangeAll, startRotationType == MotionRotat ionAuto));
158 } 158 }
159 159
160 } 160 }
OLDNEW
« no previous file with comments | « Source/core/animation/ColorStyleInterpolationTest.cpp ('k') | Source/core/animation/DoubleStyleInterpolationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698