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

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

Issue 148173018: [SVG] SVGAnimatedString{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove debug print 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
« no previous file with comments | « Source/core/svg/SVGAnimatedType.h ('k') | Source/core/svg/SVGAnimationElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAnimatedType.cpp
diff --git a/Source/core/svg/SVGAnimatedType.cpp b/Source/core/svg/SVGAnimatedType.cpp
index de28dfa39d4af7c88a2e4f93147823910c0532a0..6c93bab8eaa2e7d14f2340772252b04e0eb0f7d5 100644
--- a/Source/core/svg/SVGAnimatedType.cpp
+++ b/Source/core/svg/SVGAnimatedType.cpp
@@ -49,9 +49,6 @@ SVGAnimatedType::~SVGAnimatedType()
case AnimatedPath:
delete m_data.path;
break;
- case AnimatedString:
- delete m_data.string;
- break;
case AnimatedTransformList:
delete m_data.transformList;
break;
@@ -66,6 +63,8 @@ SVGAnimatedType::~SVGAnimatedType()
case AnimatedPoints:
case AnimatedPreserveAspectRatio:
case AnimatedRect:
+ case AnimatedString:
+ case AnimatedStringList:
// handled by RefPtr
break;
@@ -120,14 +119,6 @@ PassOwnPtr<SVGAnimatedType> SVGAnimatedType::createPath(PassOwnPtr<SVGPathByteSt
return animatedType.release();
}
-PassOwnPtr<SVGAnimatedType> SVGAnimatedType::createString(String* string)
-{
- ASSERT(string);
- OwnPtr<SVGAnimatedType> animatedType = adoptPtr(new SVGAnimatedType(AnimatedString));
- animatedType->m_data.string = string;
- return animatedType.release();
-}
-
PassOwnPtr<SVGAnimatedType> SVGAnimatedType::createTransformList(SVGTransformList* transformList)
{
ASSERT(transformList);
@@ -147,10 +138,6 @@ PassOwnPtr<SVGAnimatedType> SVGAnimatedType::createNewProperty(PassRefPtr<NewSVG
String SVGAnimatedType::valueAsString()
{
switch (m_type) {
- case AnimatedString:
- ASSERT(m_data.string);
- return *m_data.string;
-
// Below properties have migrated to new property implementation.
case AnimatedColor:
case AnimatedNumber:
@@ -161,6 +148,8 @@ String SVGAnimatedType::valueAsString()
case AnimatedPoints:
case AnimatedPreserveAspectRatio:
case AnimatedRect:
+ case AnimatedString:
+ case AnimatedStringList:
return m_newProperty->valueAsString();
// These types don't appear in the table in SVGElement::cssPropertyToTypeMap() and thus don't need valueAsString() support.
@@ -184,11 +173,6 @@ String SVGAnimatedType::valueAsString()
bool SVGAnimatedType::setValueAsString(const QualifiedName& attrName, const String& value)
{
switch (m_type) {
- case AnimatedString:
- ASSERT(m_data.string);
- *m_data.string = value;
- break;
-
// Below properties have migrated to new property implementation.
case AnimatedColor:
case AnimatedNumber:
@@ -199,6 +183,8 @@ bool SVGAnimatedType::setValueAsString(const QualifiedName& attrName, const Stri
case AnimatedPoints:
case AnimatedPreserveAspectRatio:
case AnimatedRect:
+ case AnimatedString:
+ case AnimatedStringList:
// Always use createForAnimation call path for these implementations.
return false;
« no previous file with comments | « Source/core/svg/SVGAnimatedType.h ('k') | Source/core/svg/SVGAnimationElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698