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

Side by Side Diff: third_party/WebKit/Source/platform/animation/TimingFunction.cpp

Issue 2025503002: Revert of Expand WTF::StringView's API to be more like StringPiece. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 "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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/testing/UnionTypesTest.cpp ('k') | third_party/WebKit/Source/platform/exported/WebString.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698