| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 template <class T> | 127 template <class T> |
| 128 static PassRefPtrWillBeRawPtr<T> takeConstRef(const T* value) { return PassR
efPtrWillBeRawPtr<T>(const_cast<T*>(value)); } | 128 static PassRefPtrWillBeRawPtr<T> takeConstRef(const T* value) { return PassR
efPtrWillBeRawPtr<T>(const_cast<T*>(value)); } |
| 129 | 129 |
| 130 private: | 130 private: |
| 131 virtual AnimatableType type() const = 0; | 131 virtual AnimatableType type() const = 0; |
| 132 // Implementations can assume that the object being compared has the same ty
pe as the object this is called on | 132 // Implementations can assume that the object being compared has the same ty
pe as the object this is called on |
| 133 virtual bool equalTo(const AnimatableValue*) const = 0; | 133 virtual bool equalTo(const AnimatableValue*) const = 0; |
| 134 | 134 |
| 135 virtual double distanceTo(const AnimatableValue*) const; | 135 virtual double distanceTo(const AnimatableValue*) const; |
| 136 | 136 |
| 137 friend class KeyframeEffectModel; | 137 template <class Keyframe> friend class KeyframeEffectModel; |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 #define DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(thisType, predicate) \ | 140 #define DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(thisType, predicate) \ |
| 141 DEFINE_TYPE_CASTS(thisType, AnimatableValue, value, value->predicate, value.
predicate) | 141 DEFINE_TYPE_CASTS(thisType, AnimatableValue, value, value->predicate, value.
predicate) |
| 142 | 142 |
| 143 } // namespace WebCore | 143 } // namespace WebCore |
| 144 | 144 |
| 145 #endif // AnimatableValue_h | 145 #endif // AnimatableValue_h |
| OLD | NEW |