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

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

Issue 1153943003: Add foundation for removing AnimatableValues from StyleInterpolation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: PassOwnPtr 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NonInterpolableValue_h
6 #define NonInterpolableValue_h
7
8 #include "platform/heap/Handle.h"
9
10 namespace blink {
11
12 class NonInterpolableValue : public RefCountedWillBeGarbageCollectedFinalized<No nInterpolableValue> {
13 public:
14 virtual ~NonInterpolableValue() { }
15
16 typedef const void* Type;
17 virtual Type type() const = 0;
18
19 DEFINE_INLINE_VIRTUAL_TRACE() { }
20 };
21
22 // These macros provide safe downcasts of NonInterpolableValue subclasses with d ebug assertions.
23 // See DefaultAnimationType for example usage.
24 #define DECLARE_NON_INTERPOLABLE_VALUE_TYPE() \
25 static Type staticType; \
26 virtual Type type() const { return staticType; }
27
28 #define DEFINE_NON_INTERPOLABLE_VALUE_TYPE(T) \
29 NonInterpolableValue::Type T::staticType = &T::staticType;
30
31 #define DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(T) \
32 DEFINE_TYPE_CASTS(T, NonInterpolableValue, value, value->type() == T::static Type, value.type() == T::staticType);
33
34 } // namespace blink
35
36 #endif // NonInterpolableValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698