| Index: Source/core/animation/AnimatableStrokeDasharrayList.cpp
|
| diff --git a/Source/core/animation/AnimatableStrokeDasharrayList.cpp b/Source/core/animation/AnimatableStrokeDasharrayList.cpp
|
| index 1b6f55c0e48a4972c4397f5222ca23e2dc7a1b75..47ea8af8564da97adb04680ecf28c78db77af4a7 100644
|
| --- a/Source/core/animation/AnimatableStrokeDasharrayList.cpp
|
| +++ b/Source/core/animation/AnimatableStrokeDasharrayList.cpp
|
| @@ -36,21 +36,25 @@
|
|
|
| namespace WebCore {
|
|
|
| -AnimatableStrokeDasharrayList::AnimatableStrokeDasharrayList(const Vector<SVGLength>& lengths)
|
| +AnimatableStrokeDasharrayList::AnimatableStrokeDasharrayList(PassRefPtr<SVGLengthList> passLengths)
|
| {
|
| - for (size_t i = 0; i < lengths.size(); ++i)
|
| - m_values.append(AnimatableSVGLength::create(lengths[i]));
|
| + RefPtr<SVGLengthList> lengths = passLengths;
|
| + SVGLengthList::ConstIterator it = lengths->begin();
|
| + SVGLengthList::ConstIterator itEnd = lengths->end();
|
| + for (; it != itEnd; ++it)
|
| + m_values.append(AnimatableSVGLength::create(*it));
|
| }
|
|
|
| -Vector<SVGLength> AnimatableStrokeDasharrayList::toSVGLengthVector() const
|
| +PassRefPtr<SVGLengthList> AnimatableStrokeDasharrayList::toSVGLengthList() const
|
| {
|
| - Vector<SVGLength> lengths(m_values.size());
|
| + RefPtr<SVGLengthList> lengths = SVGLengthList::create();
|
| for (size_t i = 0; i < m_values.size(); ++i) {
|
| - lengths[i] = toAnimatableSVGLength(m_values[i].get())->toSVGLength();
|
| - if (lengths[i].valueInSpecifiedUnits() < 0)
|
| - lengths[i].setValueInSpecifiedUnits(0);
|
| + RefPtr<SVGLength> length = toAnimatableSVGLength(m_values[i].get())->toSVGLength();
|
| + if (length->valueInSpecifiedUnits() < 0)
|
| + length->setValueInSpecifiedUnits(0);
|
| + lengths->append(length);
|
| }
|
| - return lengths;
|
| + return lengths.release();
|
| }
|
|
|
| bool AnimatableStrokeDasharrayList::usesDefaultInterpolationWith(const AnimatableValue* value) const
|
| @@ -71,7 +75,7 @@ PassRefPtr<AnimatableValue> AnimatableStrokeDasharrayList::interpolateTo(const A
|
| if (from.isEmpty() && to.isEmpty())
|
| return takeConstRef(this);
|
| if (from.isEmpty() || to.isEmpty()) {
|
| - DEFINE_STATIC_REF(AnimatableSVGLength, zeroPixels, AnimatableSVGLength::create(SVGLength()).leakRef());
|
| + DEFINE_STATIC_REF(AnimatableSVGLength, zeroPixels, AnimatableSVGLength::create(SVGLength::create()).leakRef());
|
| if (from.isEmpty()) {
|
| from.append(zeroPixels);
|
| from.append(zeroPixels);
|
|
|