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

Unified Diff: Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp

Issue 153883003: [SVG] SVGAnimatedTransform{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove m_zoomAndPan Created 6 years, 10 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
« no previous file with comments | « Source/core/svg/SVGAnimateTransformElement.cpp ('k') | Source/core/svg/SVGAnimatedTransformList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp
diff --git a/Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp b/Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp
index 328f82262c385129629adf617e16e0b2df08598a..f7bbdcef827962e0ea198b96d92ccc30e0bb172d 100644
--- a/Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp
+++ b/Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp
@@ -31,14 +31,17 @@
#include "config.h"
#include "core/svg/SVGAnimatedNewPropertyAnimator.h"
+#include "core/svg/SVGAnimateTransformElement.h"
#include "core/svg/SVGAnimatedColor.h"
#include "core/svg/SVGAnimationElement.h"
+#include "core/svg/SVGColor.h"
#include "core/svg/SVGElementInstance.h"
#include "core/svg/SVGLength.h"
#include "core/svg/SVGLengthList.h"
#include "core/svg/SVGNumber.h"
#include "core/svg/SVGPointList.h"
#include "core/svg/SVGString.h"
+#include "core/svg/SVGTransformList.h"
namespace WebCore {
@@ -61,9 +64,18 @@ SVGAnimatedNewPropertyAnimator::~SVGAnimatedNewPropertyAnimator()
PassRefPtr<NewSVGPropertyBase> SVGAnimatedNewPropertyAnimator::createPropertyForAnimation(const String& value)
{
if (isAnimatingSVGDom()) {
- ASSERT(m_animatedProperty);
-
// SVG DOM animVal animation code-path.
+
+ if (m_type == AnimatedTransformList) {
+ // TransformList must be animated via <animateTransform>,
+ // and its {from,by,to} attribute values needs to be parsed w.r.t. its "type" attribute.
+ // Spec: http://www.w3.org/TR/SVG/single-page.html#animate-AnimateTransformElement
+ ASSERT(m_animationElement);
+ SVGTransformType transformType = toSVGAnimateTransformElement(m_animationElement)->transformType();
+ return SVGTransformList::create(transformType, value);
+ }
+
+ ASSERT(m_animatedProperty);
return m_animatedProperty->currentValueBase()->cloneForAnimation(value);
}
@@ -104,6 +116,8 @@ PassRefPtr<NewSVGPropertyBase> SVGAnimatedNewPropertyAnimator::createPropertyFor
case AnimatedPoint:
case AnimatedPoints:
case AnimatedRect:
+ case AnimatedTransform:
+ case AnimatedTransformList:
ASSERT_NOT_REACHED();
// These properties are not yet migrated to NewProperty implementation. see http://crbug.com/308818
@@ -114,7 +128,6 @@ PassRefPtr<NewSVGPropertyBase> SVGAnimatedNewPropertyAnimator::createPropertyFor
case AnimatedPath:
case AnimatedPreserveAspectRatio:
case AnimatedStringList:
- case AnimatedTransformList:
ASSERT_NOT_REACHED();
case AnimatedUnknown:
« no previous file with comments | « Source/core/svg/SVGAnimateTransformElement.cpp ('k') | Source/core/svg/SVGAnimatedTransformList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698