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

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

Issue 1882003002: include RefCounted.h where needed, only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile fix Created 4 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 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 NonInterpolableValue_h 5 #ifndef NonInterpolableValue_h
6 #define NonInterpolableValue_h 6 #define NonInterpolableValue_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "wtf/RefCounted.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 // Represents components of a PropertySpecificKeyframe's value that either do no t change or 50% flip when interpolating with an adjacent value. 12 // Represents components of a PropertySpecificKeyframe's value that either do no t change or 50% flip when interpolating with an adjacent value.
13 class NonInterpolableValue : public RefCounted<NonInterpolableValue> { 13 class NonInterpolableValue : public RefCounted<NonInterpolableValue> {
14 public: 14 public:
15 virtual ~NonInterpolableValue() { } 15 virtual ~NonInterpolableValue() { }
16 16
17 typedef const void* Type; 17 typedef const void* Type;
18 virtual Type getType() const = 0; 18 virtual Type getType() const = 0;
19 }; 19 };
20 20
21 // These macros provide safe downcasts of NonInterpolableValue subclasses with d ebug assertions. 21 // These macros provide safe downcasts of NonInterpolableValue subclasses with d ebug assertions.
22 // See CSSValueInterpolationType.cpp for example usage. 22 // See CSSValueInterpolationType.cpp for example usage.
23 #define DECLARE_NON_INTERPOLABLE_VALUE_TYPE() \ 23 #define DECLARE_NON_INTERPOLABLE_VALUE_TYPE() \
24 static Type staticType; \ 24 static Type staticType; \
25 Type getType() const final { return staticType; } 25 Type getType() const final { return staticType; }
26 26
27 #define DEFINE_NON_INTERPOLABLE_VALUE_TYPE(T) \ 27 #define DEFINE_NON_INTERPOLABLE_VALUE_TYPE(T) \
28 NonInterpolableValue::Type T::staticType = &T::staticType; 28 NonInterpolableValue::Type T::staticType = &T::staticType;
29 29
30 #define DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(T) \ 30 #define DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(T) \
31 DEFINE_TYPE_CASTS(T, NonInterpolableValue, value, value->getType() == T::sta ticType, value.getType() == T::staticType); 31 DEFINE_TYPE_CASTS(T, NonInterpolableValue, value, value->getType() == T::sta ticType, value.getType() == T::staticType);
32 32
33 } // namespace blink 33 } // namespace blink
34 34
35 #endif // NonInterpolableValue_h 35 #endif // NonInterpolableValue_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/Keyframe.h ('k') | third_party/WebKit/Source/core/clipboard/DataTransfer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698