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

Side by Side Diff: Source/core/animation/AnimatableValue.h

Issue 215883005: Web Animations: Introduce String based KeyframeEffectModel (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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 /* 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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/AnimatableValueKeyframe.h » ('j') | Source/core/animation/Interpolation.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698