| 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(" + String::numberToStringECMAScript(this->numberO
fSteps()) + ", "); | 130 builder.append("steps("); |
| 131 builder.append(String::numberToStringECMAScript(this->numberOfSteps())); |
| 132 builder.append(", "); |
| 131 builder.append(positionString); | 133 builder.append(positionString); |
| 132 builder.append(')'); | 134 builder.append(')'); |
| 133 } | 135 } |
| 134 return builder.toString(); | 136 return builder.toString(); |
| 135 } | 137 } |
| 136 | 138 |
| 137 void StepsTimingFunction::range(double* minValue, double* maxValue) const | 139 void StepsTimingFunction::range(double* minValue, double* maxValue) const |
| 138 { | 140 { |
| 139 *minValue = 0; | 141 *minValue = 0; |
| 140 *maxValue = 1; | 142 *maxValue = 1; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 return false; | 209 return false; |
| 208 } | 210 } |
| 209 | 211 |
| 210 // No need to define specific operator!= as they can all come via this function. | 212 // No need to define specific operator!= as they can all come via this function. |
| 211 bool operator!=(const TimingFunction& lhs, const TimingFunction& rhs) | 213 bool operator!=(const TimingFunction& lhs, const TimingFunction& rhs) |
| 212 { | 214 { |
| 213 return !(lhs == rhs); | 215 return !(lhs == rhs); |
| 214 } | 216 } |
| 215 | 217 |
| 216 } // namespace blink | 218 } // namespace blink |
| OLD | NEW |