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 #include "platform/animation/TimingFunction.h" | 5 #include "platform/animation/TimingFunction.h" |
6 | 6 |
7 #include "platform/animation/CubicBezierControlPoints.h" | 7 #include "platform/animation/CubicBezierControlPoints.h" |
8 #include "wtf/MathExtras.h" | 8 #include "wtf/MathExtras.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 case StepPosition::END: | 120 case StepPosition::END: |
121 positionString = "end"; | 121 positionString = "end"; |
122 break; | 122 break; |
123 } | 123 } |
124 | 124 |
125 StringBuilder builder; | 125 StringBuilder builder; |
126 if (this->numberOfSteps() == 1) { | 126 if (this->numberOfSteps() == 1) { |
127 builder.append("step-"); | 127 builder.append("step-"); |
128 builder.append(positionString); | 128 builder.append(positionString); |
129 } else { | 129 } else { |
130 builder.append("steps("); | 130 builder.append("steps(" + String::numberToStringECMAScript(this->numberO
fSteps()) + ", "); |
131 builder.append(String::numberToStringECMAScript(this->numberOfSteps())); | |
132 builder.append(", "); | |
133 builder.append(positionString); | 131 builder.append(positionString); |
134 builder.append(')'); | 132 builder.append(')'); |
135 } | 133 } |
136 return builder.toString(); | 134 return builder.toString(); |
137 } | 135 } |
138 | 136 |
139 void StepsTimingFunction::range(double* minValue, double* maxValue) const | 137 void StepsTimingFunction::range(double* minValue, double* maxValue) const |
140 { | 138 { |
141 *minValue = 0; | 139 *minValue = 0; |
142 *maxValue = 1; | 140 *maxValue = 1; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 return false; | 207 return false; |
210 } | 208 } |
211 | 209 |
212 // No need to define specific operator!= as they can all come via this function. | 210 // No need to define specific operator!= as they can all come via this function. |
213 bool operator!=(const TimingFunction& lhs, const TimingFunction& rhs) | 211 bool operator!=(const TimingFunction& lhs, const TimingFunction& rhs) |
214 { | 212 { |
215 return !(lhs == rhs); | 213 return !(lhs == rhs); |
216 } | 214 } |
217 | 215 |
218 } // namespace blink | 216 } // namespace blink |
OLD | NEW |