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

Unified 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: Add missing header file Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/animation/NonInterpolableValue.h
diff --git a/Source/core/animation/NonInterpolableValue.h b/Source/core/animation/NonInterpolableValue.h
new file mode 100644
index 0000000000000000000000000000000000000000..a1a0fb64b73b58b51beb3b8da663b2357e55fdd3
--- /dev/null
+++ b/Source/core/animation/NonInterpolableValue.h
@@ -0,0 +1,34 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NonInterpolableValue_h
+#define NonInterpolableValue_h
+
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class NonInterpolableValue : public RefCountedWillBeGarbageCollectedFinalized<NonInterpolableValue> {
+public:
+ typedef const void* Type;
+ virtual Type type() const = 0;
+
+ virtual ~NonInterpolableValue() { }
+
+ DEFINE_INLINE_VIRTUAL_TRACE() { }
+};
+
+#define DECLARE_NON_INTERPOLABLE_VALUE_TYPE() \
shans 2015/05/28 05:48:14 This requires a very clear documented statement of
alancutter (OOO until 2018) 2015/06/01 07:35:29 Done.
+ static Type staticType; \
+ virtual Type type() const { return staticType; }
+
+#define DEFINE_NON_INTERPOLABLE_VALUE_TYPE(T) \
+ NonInterpolableValue::Type T::staticType = &T::staticType;
+
+#define DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(T) \
+ DEFINE_TYPE_CASTS(T, NonInterpolableValue, value, value->type() == T::staticType, value.type() == T::staticType);
+
+} // namespace blink
+
+#endif // NonInterpolableValue_h

Powered by Google App Engine
This is Rietveld 408576698