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

Unified Diff: Source/core/svg/SVGGradientElement.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/SVGGradientElement.h ('k') | Source/core/svg/SVGGraphicsElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGGradientElement.cpp
diff --git a/Source/core/svg/SVGGradientElement.cpp b/Source/core/svg/SVGGradientElement.cpp
index 0c90ec64874a9da1740bcb35eebaa737741649ff..e79a28b8ff4c731ebfb92f5872def70cc8d07b22 100644
--- a/Source/core/svg/SVGGradientElement.cpp
+++ b/Source/core/svg/SVGGradientElement.cpp
@@ -48,20 +48,19 @@ template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGSpreadMe
}
// Animated property definitions
-DEFINE_ANIMATED_TRANSFORM_LIST(SVGGradientElement, SVGNames::gradientTransformAttr, GradientTransform, gradientTransform)
-
BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGradientElement)
- REGISTER_LOCAL_ANIMATED_PROPERTY(gradientTransform)
REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
END_REGISTER_ANIMATED_PROPERTIES
SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document& document)
: SVGElement(tagName, document)
, SVGURIReference(this)
+ , m_gradientTransform(SVGAnimatedTransformList::create(this, SVGNames::gradientTransformAttr, SVGTransformList::create()))
, m_spreadMethod(SVGAnimatedEnumeration<SVGSpreadMethodType>::create(this, SVGNames::spreadMethodAttr, SVGSpreadMethodPad))
, m_gradientUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(this, SVGNames::gradientUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX))
{
ScriptWrappable::init(this);
+ addToPropertyMap(m_gradientTransform);
addToPropertyMap(m_spreadMethod);
addToPropertyMap(m_gradientUnits);
registerAnimatedPropertiesForSVGGradientElement();
@@ -86,17 +85,11 @@ void SVGGradientElement::parseAttribute(const QualifiedName& name, const AtomicS
return;
}
- if (name == SVGNames::gradientTransformAttr) {
- SVGTransformList newList;
- newList.parse(value);
- detachAnimatedGradientTransformListWrappers(newList.size());
- setGradientTransformBaseValue(newList);
- return;
- }
-
SVGParsingError parseError = NoError;
- if (name == SVGNames::gradientUnitsAttr)
+ if (name == SVGNames::gradientTransformAttr)
+ m_gradientTransform->setBaseValueAsString(value, parseError);
+ else if (name == SVGNames::gradientUnitsAttr)
m_gradientUnits->setBaseValueAsString(value, parseError);
else if (name == SVGNames::spreadMethodAttr)
m_spreadMethod->setBaseValueAsString(value, parseError);
« no previous file with comments | « Source/core/svg/SVGGradientElement.h ('k') | Source/core/svg/SVGGraphicsElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698