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

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

Issue 148173018: [SVG] SVGAnimatedString{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove if 0 Created 6 years, 11 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/svg/SVGString.cpp
diff --git a/Source/core/rendering/svg/SVGPathData.h b/Source/core/svg/SVGString.cpp
similarity index 52%
copy from Source/core/rendering/svg/SVGPathData.h
copy to Source/core/svg/SVGString.cpp
index 4a62897488357a165ed75dd669fbb1a13098ee7b..59411b887900aa969f1bef430158ae279376f75f 100644
--- a/Source/core/rendering/svg/SVGPathData.h
+++ b/Source/core/svg/SVGString.cpp
@@ -17,16 +17,32 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef SVGPathData_h
-#define SVGPathData_h
+#include "config.h"
+#include "core/svg/SVGString.h"
+
+#include "core/svg/SVGAnimateElement.h"
namespace WebCore {
-class SVGElement;
-class Path;
+void SVGString::add(PassRefPtr<NewSVGPropertyBase>, SVGElement*)
+{
+ ASSERT_NOT_REACHED();
+}
+
+void SVGString::calculateAnimatedValue(SVGAnimationElement* animationElement, float percentage, unsigned repeatCount, PassRefPtr<NewSVGPropertyBase> from, PassRefPtr<NewSVGPropertyBase> to, PassRefPtr<NewSVGPropertyBase>, SVGElement*)
+{
+ ASSERT(animationElement);
+
+ String fromString = toSVGString(from)->m_value;
+ String toString = toSVGString(to)->m_value;
-void updatePathFromGraphicsElement(SVGElement*, Path&);
+ animationElement->animateDiscreteType<String>(percentage, fromString, toString, m_value);
+}
-};
+float SVGString::calculateDistance(PassRefPtr<NewSVGPropertyBase>, SVGElement*)
+{
+ // No paced animations for strings.
haraken 2014/01/29 05:18:00 It's confusing to me which elements can animate an
kouhei (in TOK) 2014/01/30 08:18:56 "Paced" animations are not supported, but normal d
haraken 2014/01/30 11:00:09 Makes sense. Then we might want to have isPacedAni
+ return -1;
+}
-#endif // SVGPathData_h
+}

Powered by Google App Engine
This is Rietveld 408576698