| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 class PLATFORM_EXPORT LinearTimingFunction FINAL : public TimingFunction { | 72 class PLATFORM_EXPORT LinearTimingFunction FINAL : public TimingFunction { |
| 73 public: | 73 public: |
| 74 static LinearTimingFunction* shared() | 74 static LinearTimingFunction* shared() |
| 75 { | 75 { |
| 76 DEFINE_STATIC_REF(LinearTimingFunction, linear, (adoptRef(new LinearTimi
ngFunction()))); | 76 DEFINE_STATIC_REF(LinearTimingFunction, linear, (adoptRef(new LinearTimi
ngFunction()))); |
| 77 return linear; | 77 return linear; |
| 78 } | 78 } |
| 79 | 79 |
| 80 virtual ~LinearTimingFunction() { } | 80 virtual ~LinearTimingFunction() { } |
| 81 | 81 |
| 82 virtual String toString() const OVERRIDE; | 82 virtual String toString() const override; |
| 83 | 83 |
| 84 virtual double evaluate(double fraction, double) const OVERRIDE; | 84 virtual double evaluate(double fraction, double) const override; |
| 85 | 85 |
| 86 virtual void range(double* minValue, double* maxValue) const OVERRIDE; | 86 virtual void range(double* minValue, double* maxValue) const override; |
| 87 private: | 87 private: |
| 88 LinearTimingFunction() | 88 LinearTimingFunction() |
| 89 : TimingFunction(LinearFunction) | 89 : TimingFunction(LinearFunction) |
| 90 { | 90 { |
| 91 } | 91 } |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 class PLATFORM_EXPORT CubicBezierTimingFunction FINAL : public TimingFunction { | 94 class PLATFORM_EXPORT CubicBezierTimingFunction FINAL : public TimingFunction { |
| 95 public: | 95 public: |
| 96 enum SubType { | 96 enum SubType { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 return easeInOut; | 130 return easeInOut; |
| 131 } | 131 } |
| 132 default: | 132 default: |
| 133 ASSERT_NOT_REACHED(); | 133 ASSERT_NOT_REACHED(); |
| 134 return 0; | 134 return 0; |
| 135 } | 135 } |
| 136 } | 136 } |
| 137 | 137 |
| 138 virtual ~CubicBezierTimingFunction() { } | 138 virtual ~CubicBezierTimingFunction() { } |
| 139 | 139 |
| 140 virtual String toString() const OVERRIDE; | 140 virtual String toString() const override; |
| 141 | 141 |
| 142 virtual double evaluate(double fraction, double accuracy) const OVERRIDE; | 142 virtual double evaluate(double fraction, double accuracy) const override; |
| 143 virtual void range(double* minValue, double* maxValue) const OVERRIDE; | 143 virtual void range(double* minValue, double* maxValue) const override; |
| 144 | 144 |
| 145 double x1() const { return m_x1; } | 145 double x1() const { return m_x1; } |
| 146 double y1() const { return m_y1; } | 146 double y1() const { return m_y1; } |
| 147 double x2() const { return m_x2; } | 147 double x2() const { return m_x2; } |
| 148 double y2() const { return m_y2; } | 148 double y2() const { return m_y2; } |
| 149 | 149 |
| 150 SubType subType() const { return m_subType; } | 150 SubType subType() const { return m_subType; } |
| 151 | 151 |
| 152 private: | 152 private: |
| 153 explicit CubicBezierTimingFunction(SubType subType, double x1, double y1, do
uble x2, double y2) | 153 explicit CubicBezierTimingFunction(SubType subType, double x1, double y1, do
uble x2, double y2) |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 return end; | 195 return end; |
| 196 default: | 196 default: |
| 197 ASSERT_NOT_REACHED(); | 197 ASSERT_NOT_REACHED(); |
| 198 return end; | 198 return end; |
| 199 } | 199 } |
| 200 } | 200 } |
| 201 | 201 |
| 202 | 202 |
| 203 virtual ~StepsTimingFunction() { } | 203 virtual ~StepsTimingFunction() { } |
| 204 | 204 |
| 205 virtual String toString() const OVERRIDE; | 205 virtual String toString() const override; |
| 206 | 206 |
| 207 virtual double evaluate(double fraction, double) const OVERRIDE; | 207 virtual double evaluate(double fraction, double) const override; |
| 208 | 208 |
| 209 virtual void range(double* minValue, double* maxValue) const OVERRIDE; | 209 virtual void range(double* minValue, double* maxValue) const override; |
| 210 int numberOfSteps() const { return m_steps; } | 210 int numberOfSteps() const { return m_steps; } |
| 211 StepAtPosition stepAtPosition() const { return m_stepAtPosition; } | 211 StepAtPosition stepAtPosition() const { return m_stepAtPosition; } |
| 212 | 212 |
| 213 private: | 213 private: |
| 214 StepsTimingFunction(int steps, StepAtPosition stepAtPosition) | 214 StepsTimingFunction(int steps, StepAtPosition stepAtPosition) |
| 215 : TimingFunction(StepsFunction) | 215 : TimingFunction(StepsFunction) |
| 216 , m_steps(steps) | 216 , m_steps(steps) |
| 217 , m_stepAtPosition(stepAtPosition) | 217 , m_stepAtPosition(stepAtPosition) |
| 218 { | 218 { |
| 219 } | 219 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 235 value->type() == TimingFunction::typeName##Function, \ | 235 value->type() == TimingFunction::typeName##Function, \ |
| 236 value.type() == TimingFunction::typeName##Function) | 236 value.type() == TimingFunction::typeName##Function) |
| 237 | 237 |
| 238 DEFINE_TIMING_FUNCTION_TYPE_CASTS(Linear); | 238 DEFINE_TIMING_FUNCTION_TYPE_CASTS(Linear); |
| 239 DEFINE_TIMING_FUNCTION_TYPE_CASTS(CubicBezier); | 239 DEFINE_TIMING_FUNCTION_TYPE_CASTS(CubicBezier); |
| 240 DEFINE_TIMING_FUNCTION_TYPE_CASTS(Steps); | 240 DEFINE_TIMING_FUNCTION_TYPE_CASTS(Steps); |
| 241 | 241 |
| 242 } // namespace blink | 242 } // namespace blink |
| 243 | 243 |
| 244 #endif // TimingFunction_h | 244 #endif // TimingFunction_h |
| OLD | NEW |