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

Unified Diff: third_party/WebKit/Source/core/animation/CSSTimeInterpolationType.h

Issue 2694103009: Support animating <time> custom properties (Closed)
Patch Set: Undo git fail Created 3 years, 10 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/CSSTimeInterpolationType.h
diff --git a/third_party/WebKit/Source/core/animation/CSSTimeInterpolationType.h b/third_party/WebKit/Source/core/animation/CSSTimeInterpolationType.h
new file mode 100644
index 0000000000000000000000000000000000000000..4f868e77e215a2d91897fc4caaeae5d968e767ee
--- /dev/null
+++ b/third_party/WebKit/Source/core/animation/CSSTimeInterpolationType.h
@@ -0,0 +1,58 @@
+// Copyright 2017 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 CSSTimeInterpolationType_h
+#define CSSTimeInterpolationType_h
+
+#include "core/animation/CSSInterpolationType.h"
+
+namespace blink {
+
+class CSSTimeInterpolationType : public CSSInterpolationType {
+ public:
+ CSSTimeInterpolationType(PropertyHandle property)
+ : CSSInterpolationType(property) {
+ DCHECK(property.isCSSCustomProperty());
+ }
+
+ InterpolationValue maybeConvertNeutral(const InterpolationValue& underlying,
+ ConversionCheckers&) const final;
+ InterpolationValue maybeConvertValue(const CSSValue&,
+ const StyleResolverState*,
+ ConversionCheckers&) const final;
+
+ const CSSValue* createCSSValue(const InterpolableValue&,
+ const NonInterpolableValue*,
+ const StyleResolverState&) const final;
+
+ private:
+ // These methods only apply to CSSInterpolationTypes used by standard CSS
+ // properties.
+ // CSSTimeInterpolationType is only accessible via registered custom CSS
+ // properties.
+ InterpolationValue maybeConvertStandardPropertyUnderlyingValue(
+ const ComputedStyle&) const final {
+ NOTREACHED();
+ return nullptr;
+ }
+ void applyStandardPropertyValue(const InterpolableValue&,
+ const NonInterpolableValue*,
+ StyleResolverState&) const final {
+ NOTREACHED();
+ }
+ InterpolationValue maybeConvertInitial(const StyleResolverState&,
+ ConversionCheckers&) const final {
+ NOTREACHED();
+ return nullptr;
+ }
+ InterpolationValue maybeConvertInherit(const StyleResolverState&,
+ ConversionCheckers&) const final {
+ NOTREACHED();
+ return nullptr;
+ }
+};
+
+} // namespace blink
+
+#endif // CSSTimeInterpolationType_h

Powered by Google App Engine
This is Rietveld 408576698