Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(436)

Unified Diff: Source/core/animation/AnimatableStrokeDasharrayList.h

Issue 26292004: Web Animations CSS: Support animation of stroke-dasharray property (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « Source/core/animation/AnimatableRepeatable.cpp ('k') | Source/core/animation/AnimatableStrokeDasharrayList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698