Index: Source/core/svg/SVGPatternElement.cpp |
diff --git a/Source/core/svg/SVGPatternElement.cpp b/Source/core/svg/SVGPatternElement.cpp |
index 0a3bb400dc493e942e9be1fcd7d79c5522ab8f29..be09559d981082d735967377d24f690e080b5b92 100644 |
--- a/Source/core/svg/SVGPatternElement.cpp |
+++ b/Source/core/svg/SVGPatternElement.cpp |
@@ -34,12 +34,10 @@ namespace WebCore { |
// Animated property definitions |
DEFINE_ANIMATED_ENUMERATION(SVGPatternElement, SVGNames::patternUnitsAttr, PatternUnits, patternUnits, SVGUnitTypes::SVGUnitType) |
DEFINE_ANIMATED_ENUMERATION(SVGPatternElement, SVGNames::patternContentUnitsAttr, PatternContentUnits, patternContentUnits, SVGUnitTypes::SVGUnitType) |
-DEFINE_ANIMATED_TRANSFORM_LIST(SVGPatternElement, SVGNames::patternTransformAttr, PatternTransform, patternTransform) |
BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGPatternElement) |
REGISTER_LOCAL_ANIMATED_PROPERTY(patternUnits) |
REGISTER_LOCAL_ANIMATED_PROPERTY(patternContentUnits) |
- REGISTER_LOCAL_ANIMATED_PROPERTY(patternTransform) |
REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) |
END_REGISTER_ANIMATED_PROPERTIES |
@@ -53,6 +51,7 @@ inline SVGPatternElement::SVGPatternElement(Document& document) |
, m_viewBox(SVGAnimatedRect::create(this, SVGNames::viewBoxAttr)) |
, m_preserveAspectRatio(SVGAnimatedPreserveAspectRatio::create(this, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio::create())) |
, m_href(SVGAnimatedString::create(this, XLinkNames::hrefAttr, SVGString::create())) |
+ , m_patternTransform(SVGAnimatedTransformList::create(this, SVGNames::patternTransformAttr, SVGTransformList::create())) |
, m_patternUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) |
, m_patternContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE) |
{ |
@@ -65,6 +64,7 @@ inline SVGPatternElement::SVGPatternElement(Document& document) |
addToPropertyMap(m_viewBox); |
addToPropertyMap(m_preserveAspectRatio); |
addToPropertyMap(m_href); |
+ addToPropertyMap(m_patternTransform); |
registerAnimatedPropertiesForSVGPatternElement(); |
} |
@@ -108,11 +108,7 @@ void SVGPatternElement::parseAttribute(const QualifiedName& name, const AtomicSt |
setPatternContentUnitsBaseValue(propertyValue); |
return; |
} else if (name == SVGNames::patternTransformAttr) { |
- SVGTransformList newList; |
- newList.parse(value); |
- detachAnimatedPatternTransformListWrappers(newList.size()); |
- setPatternTransformBaseValue(newList); |
- return; |
+ m_patternTransform->setBaseValueAsString(value, parseError); |
} else if (name == SVGNames::xAttr) |
m_x->setBaseValueAsString(value, AllowNegativeLengths, parseError); |
else if (name == SVGNames::yAttr) |
@@ -193,9 +189,9 @@ static void setPatternAttributes(const SVGPatternElement* element, PatternAttrib |
if (!attributes.hasPatternContentUnits() && element->patternContentUnitsSpecified()) |
attributes.setPatternContentUnits(element->patternContentUnitsCurrentValue()); |
- if (!attributes.hasPatternTransform() && element->patternTransformSpecified()) { |
+ if (!attributes.hasPatternTransform() && element->patternTransform()->isSpecified()) { |
AffineTransform transform; |
- element->patternTransformCurrentValue().concatenate(transform); |
+ element->patternTransform()->currentValue()->concatenate(transform); |
attributes.setPatternTransform(transform); |
} |
@@ -231,7 +227,7 @@ void SVGPatternElement::collectPatternAttributes(PatternAttributes& attributes) |
AffineTransform SVGPatternElement::localCoordinateSpaceTransform(SVGElement::CTMScope) const |
{ |
AffineTransform matrix; |
- patternTransformCurrentValue().concatenate(matrix); |
+ m_patternTransform->currentValue()->concatenate(matrix); |
return matrix; |
} |