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

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

Issue 2236193002: WIP: Implement CSS transitions on top of InterpolationTypes instead of AnimatableValues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_environmentStyle
Patch Set: Created 4 years, 4 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 #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 16 matching lines...) Expand all
27 27
28 virtual bool equals(const InterpolableValue&) const = 0; 28 virtual bool equals(const InterpolableValue&) const = 0;
29 virtual std::unique_ptr<InterpolableValue> clone() const = 0; 29 virtual std::unique_ptr<InterpolableValue> clone() const = 0;
30 virtual std::unique_ptr<InterpolableValue> cloneAndZero() const = 0; 30 virtual std::unique_ptr<InterpolableValue> cloneAndZero() const = 0;
31 virtual void scale(double scale) = 0; 31 virtual void scale(double scale) = 0;
32 virtual void scaleAndAdd(double scale, const InterpolableValue& other) = 0; 32 virtual void scaleAndAdd(double scale, const InterpolableValue& other) = 0;
33 33
34 private: 34 private:
35 virtual void interpolate(const InterpolableValue& to, const double progress, InterpolableValue& result) const = 0; 35 virtual void interpolate(const InterpolableValue& to, const double progress, InterpolableValue& result) const = 0;
36 36
37 friend class Interpolation; 37 friend class StyleInterpolation;
38 friend class PairwisePrimitiveInterpolation; 38 friend class PairwisePrimitiveInterpolation;
39 39
40 // Keep interpolate private, but allow calls within the hierarchy without 40 // Keep interpolate private, but allow calls within the hierarchy without
41 // knowledge of type. 41 // knowledge of type.
42 friend class InterpolableNumber; 42 friend class InterpolableNumber;
43 friend class InterpolableBool; 43 friend class InterpolableBool;
44 friend class InterpolableList; 44 friend class InterpolableList;
45 45
46 friend class AnimationInterpolableValueTest; 46 friend class AnimationInterpolableValueTest;
47 }; 47 };
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 }; 189 };
190 190
191 DEFINE_TYPE_CASTS(InterpolableNumber, InterpolableValue, value, value->isNumber( ), value.isNumber()); 191 DEFINE_TYPE_CASTS(InterpolableNumber, InterpolableValue, value, value->isNumber( ), value.isNumber());
192 DEFINE_TYPE_CASTS(InterpolableBool, InterpolableValue, value, value->isBool(), v alue.isBool()); 192 DEFINE_TYPE_CASTS(InterpolableBool, InterpolableValue, value, value->isBool(), v alue.isBool());
193 DEFINE_TYPE_CASTS(InterpolableList, InterpolableValue, value, value->isList(), v alue.isList()); 193 DEFINE_TYPE_CASTS(InterpolableList, InterpolableValue, value, value->isList(), v alue.isList());
194 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, InterpolableValue, value, value-> isAnimatableValue(), value.isAnimatableValue()); 194 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, InterpolableValue, value, value-> isAnimatableValue(), value.isAnimatableValue());
195 195
196 } // namespace blink 196 } // namespace blink
197 197
198 #endif 198 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698