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

Unified Diff: third_party/WebKit/Source/core/animation/animatable/AnimatablePath.h

Issue 1473963004: CSS animation for SVG presentation attribute 'd' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Oilpan Created 5 years 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/animatable/AnimatablePath.h
diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatablePath.h b/third_party/WebKit/Source/core/animation/animatable/AnimatablePath.h
new file mode 100644
index 0000000000000000000000000000000000000000..27c38a6f4c6adfbf9065db6f5a431de38cc1fec1
--- /dev/null
+++ b/third_party/WebKit/Source/core/animation/animatable/AnimatablePath.h
@@ -0,0 +1,43 @@
+// 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 AnimatablePath_h
+#define AnimatablePath_h
+
+#include "core/CoreExport.h"
+#include "core/animation/animatable/AnimatableValue.h"
+#include "core/css/CSSPathValue.h"
+
+namespace blink {
+
+class CORE_EXPORT AnimatablePath final : public AnimatableValue {
+public:
+ ~AnimatablePath() override { }
+ static PassRefPtr<AnimatablePath> create(PassRefPtrWillBeRawPtr<CSSPathValue> pathValue)
+ {
+ return adoptRef(new AnimatablePath(pathValue));
+ }
+
+ CSSPathValue* pathValue() const { return m_pathValue.get(); }
+
+protected:
+ PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const override;
+ bool usesDefaultInterpolationWith(const AnimatableValue*) const override;
+
+private:
+ explicit AnimatablePath(PassRefPtrWillBeRawPtr<CSSPathValue> pathValue)
+ : m_pathValue(pathValue)
+ {
+ ASSERT(m_pathValue);
+ }
+ AnimatableType type() const override { return TypePath; }
+ bool equalTo(const AnimatableValue*) const override;
+ const RefPtrWillBePersistent<CSSPathValue> m_pathValue;
+};
+
+DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatablePath, isPath());
+
+} // namespace blink
+
+#endif // AnimatablePath_h

Powered by Google App Engine
This is Rietveld 408576698