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

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

Issue 1153943003: Add foundation for removing AnimatableValues from StyleInterpolation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review changes Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/animation/CSSValueAnimationType.cpp ('k') | Source/core/animation/Interpolation.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef InterpolableValue_h 5 #ifndef InterpolableValue_h
6 #define InterpolableValue_h 6 #define InterpolableValue_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/animation/animatable/AnimatableValue.h" 9 #include "core/animation/animatable/AnimatableValue.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
(...skipping 14 matching lines...) Expand all
25 virtual PassOwnPtrWillBeRawPtr<InterpolableValue> clone() const = 0; 25 virtual PassOwnPtrWillBeRawPtr<InterpolableValue> clone() const = 0;
26 26
27 DEFINE_INLINE_VIRTUAL_TRACE() { } 27 DEFINE_INLINE_VIRTUAL_TRACE() { }
28 28
29 private: 29 private:
30 virtual void interpolate(const InterpolableValue& to, const double progress, InterpolableValue& result) const = 0; 30 virtual void interpolate(const InterpolableValue& to, const double progress, InterpolableValue& result) const = 0;
31 virtual void add(const InterpolableValue& rhs, InterpolableValue& result) co nst = 0; 31 virtual void add(const InterpolableValue& rhs, InterpolableValue& result) co nst = 0;
32 virtual void multiply(double scalar, InterpolableValue& result) const = 0; 32 virtual void multiply(double scalar, InterpolableValue& result) const = 0;
33 33
34 friend class Interpolation; 34 friend class Interpolation;
35 friend class PairwisePrimitiveInterpolation;
35 36
36 // Keep interpolate private, but allow calls within the hierarchy without 37 // Keep interpolate private, but allow calls within the hierarchy without
37 // knowledge of type. 38 // knowledge of type.
38 friend class DeferredLegacyStyleInterpolation; 39 friend class DeferredLegacyStyleInterpolation;
39 friend class InterpolableNumber; 40 friend class InterpolableNumber;
40 friend class InterpolableBool; 41 friend class InterpolableBool;
41 friend class InterpolableList; 42 friend class InterpolableList;
42 43
43 friend class AnimationInterpolableValueTest; 44 friend class AnimationInterpolableValueTest;
44 }; 45 };
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 }; 177 };
177 178
178 DEFINE_TYPE_CASTS(InterpolableNumber, InterpolableValue, value, value->isNumber( ), value.isNumber()); 179 DEFINE_TYPE_CASTS(InterpolableNumber, InterpolableValue, value, value->isNumber( ), value.isNumber());
179 DEFINE_TYPE_CASTS(InterpolableBool, InterpolableValue, value, value->isBool(), v alue.isBool()); 180 DEFINE_TYPE_CASTS(InterpolableBool, InterpolableValue, value, value->isBool(), v alue.isBool());
180 DEFINE_TYPE_CASTS(InterpolableList, InterpolableValue, value, value->isList(), v alue.isList()); 181 DEFINE_TYPE_CASTS(InterpolableList, InterpolableValue, value, value->isList(), v alue.isList());
181 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, InterpolableValue, value, value-> isAnimatableValue(), value.isAnimatableValue()); 182 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, InterpolableValue, value, value-> isAnimatableValue(), value.isAnimatableValue());
182 183
183 } 184 }
184 185
185 #endif 186 #endif
OLDNEW
« no previous file with comments | « Source/core/animation/CSSValueAnimationType.cpp ('k') | Source/core/animation/Interpolation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698