Index: Source/core/animation/AnimatableSVGLengthVector.h |
diff --git a/Source/core/animation/AnimatableSVGLength.h b/Source/core/animation/AnimatableSVGLengthVector.h |
similarity index 71% |
copy from Source/core/animation/AnimatableSVGLength.h |
copy to Source/core/animation/AnimatableSVGLengthVector.h |
index 49d7d46ad549a10619a364fcd3458fe30b2b8255..715239cca730ac66ae05c40e8381a603069c612e 100644 |
--- a/Source/core/animation/AnimatableSVGLength.h |
+++ b/Source/core/animation/AnimatableSVGLengthVector.h |
@@ -28,50 +28,49 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef AnimatableSVGLength_h |
-#define AnimatableSVGLength_h |
+#ifndef AnimatableSVGLengthVector_h |
+#define AnimatableSVGLengthVector_h |
#include "core/animation/AnimatableValue.h" |
#include "core/svg/SVGLength.h" |
namespace WebCore { |
-class AnimatableSVGLength: public AnimatableValue { |
+class AnimatableSVGLengthVector: public AnimatableValue { |
public: |
- virtual ~AnimatableSVGLength() { } |
+ virtual ~AnimatableSVGLengthVector() { } |
- static PassRefPtr<AnimatableSVGLength> create(const SVGLength& length) |
+ static PassRefPtr<AnimatableSVGLengthVector> create(const Vector<SVGLength>& lengths) |
{ |
- return adoptRef(new AnimatableSVGLength(length)); |
+ return adoptRef(new AnimatableSVGLengthVector(lengths)); |
} |
- const SVGLength& toSVGLength() const |
+ const Vector<SVGLength>& toSVGLengthVector() const |
{ |
- return m_length; |
+ return m_lengths; |
} |
-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) |
+ AnimatableSVGLengthVector(const Vector<SVGLength>& lengths) |
+ : m_lengths(lengths) |
{ |
} |
- virtual AnimatableType type() const { return TypeSVGLength; } |
+ virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const OVERRIDE; |
+ virtual PassRefPtr<AnimatableValue> addWith(const AnimatableValue*) const OVERRIDE; |
virtual bool equalTo(const AnimatableValue*) const OVERRIDE; |
- SVGLength m_length; |
+ virtual AnimatableType type() const { return TypeSVGLengthVector; } |
+ |
+ Vector<SVGLength> m_lengths; |
}; |
-inline const AnimatableSVGLength* toAnimatableSVGLength(const AnimatableValue* value) |
+inline const AnimatableSVGLengthVector* toAnimatableSVGLengthVector(const AnimatableValue* value) |
{ |
- ASSERT_WITH_SECURITY_IMPLICATION(value && value->isSVGLength()); |
- return static_cast<const AnimatableSVGLength*>(value); |
+ ASSERT_WITH_SECURITY_IMPLICATION(value && value->isSVGLengthVector()); |
+ return static_cast<const AnimatableSVGLengthVector*>(value); |
} |
} // namespace WebCore |
-#endif // AnimatableSVGLength_h |
+#endif // AnimatableSVGLengthVector_h |