Chromium Code Reviews| Index: Source/core/animation/AnimatableShadow.h |
| diff --git a/Source/core/animation/AnimatableSVGLength.h b/Source/core/animation/AnimatableShadow.h |
| similarity index 73% |
| copy from Source/core/animation/AnimatableSVGLength.h |
| copy to Source/core/animation/AnimatableShadow.h |
| index 27dba9a48c1a0909de178272d900270e3d107bd8..23fb59b7a08d5f08e7bd555ba8e897080cf78ac9 100644 |
| --- a/Source/core/animation/AnimatableSVGLength.h |
| +++ b/Source/core/animation/AnimatableShadow.h |
| @@ -28,46 +28,40 @@ |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| -#ifndef AnimatableSVGLength_h |
| -#define AnimatableSVGLength_h |
| +#ifndef AnimatableShadow_h |
| +#define AnimatableShadow_h |
| #include "core/animation/AnimatableValue.h" |
| -#include "core/svg/SVGLength.h" |
| +#include "core/rendering/style/ShadowList.h" |
| namespace WebCore { |
| -class AnimatableSVGLength: public AnimatableValue { |
| +class AnimatableShadow : public AnimatableValue { |
| public: |
| - virtual ~AnimatableSVGLength() { } |
| - |
| - static PassRefPtr<AnimatableSVGLength> create(const SVGLength& length) |
| + virtual ~AnimatableShadow() { } |
| + static PassRefPtr<AnimatableShadow> create(PassRefPtr<ShadowList> shadowList) |
| { |
| - return adoptRef(new AnimatableSVGLength(length)); |
| - } |
| - |
| - const SVGLength& toSVGLength() const |
| - { |
| - return m_length; |
| + return adoptRef(new AnimatableShadow(shadowList)); |
| } |
| + ShadowList* shadowList() const { return m_shadowList.get(); } |
| protected: |
| virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const OVERRIDE; |
| virtual PassRefPtr<AnimatableValue> addWith(const AnimatableValue*) const OVERRIDE; |
| private: |
| - AnimatableSVGLength(const SVGLength& length) |
| - : m_length(length) |
| + explicit AnimatableShadow(PassRefPtr<ShadowList> shadowList) |
| + : m_shadowList(shadowList) |
| { |
| } |
| - |
| - virtual AnimatableType type() const { return TypeSVGLength; } |
| + virtual AnimatableType type() const OVERRIDE { return TypeShadow; } |
| virtual bool equalTo(const AnimatableValue*) const OVERRIDE; |
| - SVGLength m_length; |
| + const RefPtr<ShadowList> m_shadowList; |
|
mithro-old
2013/10/24 01:04:16
Why const?
Timothy Loh
2013/10/24 03:04:54
It doesn't change. Probably the better question is
|
| }; |
| -DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableSVGLength, isSVGLength()); |
| +DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableShadow, isShadow()); |
| } // namespace WebCore |
| -#endif // AnimatableSVGLength_h |
| +#endif // AnimatableShadow_h |