| Index: Source/core/animation/AnimatableStrokeDasharrayList.h
|
| diff --git a/Source/core/animation/AnimatableSVGLength.h b/Source/core/animation/AnimatableStrokeDasharrayList.h
|
| similarity index 63%
|
| copy from Source/core/animation/AnimatableSVGLength.h
|
| copy to Source/core/animation/AnimatableStrokeDasharrayList.h
|
| index 49d7d46ad549a10619a364fcd3458fe30b2b8255..af5c9f19cb1bd2e1fa9eb632d3df2b562050ce09 100644
|
| --- a/Source/core/animation/AnimatableSVGLength.h
|
| +++ b/Source/core/animation/AnimatableStrokeDasharrayList.h
|
| @@ -28,50 +28,45 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef AnimatableSVGLength_h
|
| -#define AnimatableSVGLength_h
|
| +#ifndef AnimatableStrokeDasharrayList_h
|
| +#define AnimatableStrokeDasharrayList_h
|
|
|
| -#include "core/animation/AnimatableValue.h"
|
| +#include "core/animation/AnimatableRepeatable.h"
|
| #include "core/svg/SVGLength.h"
|
|
|
| namespace WebCore {
|
|
|
| -class AnimatableSVGLength: public AnimatableValue {
|
| +class AnimatableStrokeDasharrayList: public AnimatableRepeatable {
|
| public:
|
| - virtual ~AnimatableSVGLength() { }
|
| + virtual ~AnimatableStrokeDasharrayList() { }
|
|
|
| - static PassRefPtr<AnimatableSVGLength> create(const SVGLength& length)
|
| + static PassRefPtr<AnimatableStrokeDasharrayList> create(const Vector<SVGLength>& lengths)
|
| {
|
| - return adoptRef(new AnimatableSVGLength(length));
|
| + return adoptRef(new AnimatableStrokeDasharrayList(lengths));
|
| }
|
|
|
| - const SVGLength& toSVGLength() const
|
| - {
|
| - return m_length;
|
| - }
|
| + Vector<SVGLength> toSVGLengthVector() const;
|
|
|
| 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)
|
| + AnimatableStrokeDasharrayList(const Vector<SVGLength>&);
|
| + // This will consume the vector passed into it.
|
| + AnimatableStrokeDasharrayList(Vector<RefPtr<AnimatableValue> >& values)
|
| + : AnimatableRepeatable(values)
|
| {
|
| }
|
|
|
| - virtual AnimatableType type() const { return TypeSVGLength; }
|
| - virtual bool equalTo(const AnimatableValue*) const OVERRIDE;
|
| -
|
| - SVGLength m_length;
|
| + virtual AnimatableType type() const { return TypeStrokeDasharrayList; }
|
| };
|
|
|
| -inline const AnimatableSVGLength* toAnimatableSVGLength(const AnimatableValue* value)
|
| +inline const AnimatableStrokeDasharrayList* toAnimatableStrokeDasharrayList(const AnimatableValue* value)
|
| {
|
| - ASSERT_WITH_SECURITY_IMPLICATION(value && value->isSVGLength());
|
| - return static_cast<const AnimatableSVGLength*>(value);
|
| + ASSERT_WITH_SECURITY_IMPLICATION(value && value->isStrokeDasharrayList());
|
| + return static_cast<const AnimatableStrokeDasharrayList*>(value);
|
| }
|
|
|
| } // namespace WebCore
|
|
|
| -#endif // AnimatableSVGLength_h
|
| +#endif // AnimatableStrokeDasharrayList_h
|
|
|