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

Unified Diff: third_party/WebKit/Source/core/animation/StackableInterpolation.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/StackableInterpolation.h
diff --git a/third_party/WebKit/Source/core/animation/StackableInterpolation.h b/third_party/WebKit/Source/core/animation/StackableInterpolation.h
new file mode 100644
index 0000000000000000000000000000000000000000..f60a98729a79cf85d54ea315d987136869c4e32e
--- /dev/null
+++ b/third_party/WebKit/Source/core/animation/StackableInterpolation.h
@@ -0,0 +1,33 @@
+// Copyright 2016 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 StackableInterpolation_h
+#define StackableInterpolation_h
+
+#include "core/animation/Interpolation.h"
+
+namespace blink {
+
+class InterpolationEnvironment;
+class TypedInterpolationValue;
+class UnderlyingValueOwner;
+
+class StackableInterpolation : public Interpolation {
+public:
+ static void applyStack(const ActiveInterpolations&, InterpolationEnvironment&);
+
+ virtual bool isStackableInterpolation() const { return true; }
+
+protected:
+ virtual std::unique_ptr<TypedInterpolationValue> maybeConvertUnderlyingValue(const InterpolationEnvironment&) const = 0;
+ virtual const TypedInterpolationValue* ensureValidInterpolation(const InterpolationEnvironment&, const UnderlyingValueOwner&) const = 0;
+ virtual void setFlagIfInheritUsed(InterpolationEnvironment&) const {}
+ virtual double underlyingFraction() const = 0;
+};
+
+DEFINE_TYPE_CASTS(StackableInterpolation, Interpolation, value, value->isStackableInterpolation(), value.isStackableInterpolation());
+
+} // namespace blink
+
+#endif // StackableInterpolation_h

Powered by Google App Engine
This is Rietveld 408576698