Chromium Code Reviews| 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..021274b5f901f806f03b514ac394610f64203cd1 |
| --- /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(PassRefPtr<CSSPathValue> pathValue) |
|
fs
2015/12/15 11:52:53
PassRefPtrWillBeRawPtr I think. Same for all the o
Eric Willigers
2015/12/15 22:33:55
Done.
|
| + { |
| + 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(PassRefPtr<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 |