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

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

Issue 1746283002: Rename enums/functions that collide in chromium style in platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: get-names-13-platform: . Created 4 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 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 break; 246 break;
247 default: 247 default:
248 ASSERT_NOT_REACHED(); 248 ASSERT_NOT_REACHED();
249 break; 249 break;
250 } 250 }
251 } 251 }
252 252
253 String StepsTimingFunction::toString() const 253 String StepsTimingFunction::toString() const
254 { 254 {
255 const char* positionString = nullptr; 255 const char* positionString = nullptr;
256 switch (stepAtPosition()) { 256 switch (getStepAtPosition()) {
257 case Start: 257 case Start:
258 positionString = "start"; 258 positionString = "start";
259 break; 259 break;
260 case Middle: 260 case Middle:
261 positionString = "middle"; 261 positionString = "middle";
262 break; 262 break;
263 case End: 263 case End:
264 positionString = "end"; 264 positionString = "end";
265 break; 265 break;
266 } 266 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 361
362 return lhs.subType() == ctf.subType(); 362 return lhs.subType() == ctf.subType();
363 } 363 }
364 364
365 bool operator==(const StepsTimingFunction& lhs, const TimingFunction& rhs) 365 bool operator==(const StepsTimingFunction& lhs, const TimingFunction& rhs)
366 { 366 {
367 if (rhs.type() != TimingFunction::StepsFunction) 367 if (rhs.type() != TimingFunction::StepsFunction)
368 return false; 368 return false;
369 369
370 const StepsTimingFunction& stf = toStepsTimingFunction(rhs); 370 const StepsTimingFunction& stf = toStepsTimingFunction(rhs);
371 return (lhs.numberOfSteps() == stf.numberOfSteps()) && (lhs.stepAtPosition() == stf.stepAtPosition()); 371 return (lhs.numberOfSteps() == stf.numberOfSteps()) && (lhs.getStepAtPositio n() == stf.getStepAtPosition());
372 } 372 }
373 373
374 // The generic operator== *must* come after the 374 // The generic operator== *must* come after the
375 // non-generic operator== otherwise it will end up calling itself. 375 // non-generic operator== otherwise it will end up calling itself.
376 bool operator==(const TimingFunction& lhs, const TimingFunction& rhs) 376 bool operator==(const TimingFunction& lhs, const TimingFunction& rhs)
377 { 377 {
378 switch (lhs.type()) { 378 switch (lhs.type()) {
379 case TimingFunction::LinearFunction: { 379 case TimingFunction::LinearFunction: {
380 const LinearTimingFunction& linear = toLinearTimingFunction(lhs); 380 const LinearTimingFunction& linear = toLinearTimingFunction(lhs);
381 return (linear == rhs); 381 return (linear == rhs);
(...skipping 12 matching lines...) Expand all
394 return false; 394 return false;
395 } 395 }
396 396
397 // No need to define specific operator!= as they can all come via this function. 397 // No need to define specific operator!= as they can all come via this function.
398 bool operator!=(const TimingFunction& lhs, const TimingFunction& rhs) 398 bool operator!=(const TimingFunction& lhs, const TimingFunction& rhs)
399 { 399 {
400 return !(lhs == rhs); 400 return !(lhs == rhs);
401 } 401 }
402 402
403 } // namespace blink 403 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/animation/TimingFunction.h ('k') | third_party/WebKit/Source/platform/audio/Panner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698