Index: Source/WebCore/svg/SVGAnimateTransformElement.cpp |
=================================================================== |
--- Source/WebCore/svg/SVGAnimateTransformElement.cpp (revision 91278) |
+++ Source/WebCore/svg/SVGAnimateTransformElement.cpp (working copy) |
@@ -114,15 +114,15 @@ |
ASSERT_NOT_REACHED(); |
} |
-static PassRefPtr<SVGAnimatedTransformList> animatedTransformListFor(SVGElement* element) |
+static SVGTransformList* transformListFor(SVGElement* element) |
{ |
ASSERT(element); |
if (element->isStyledTransformable()) |
- return static_cast<SVGStyledTransformableElement*>(element)->transformAnimated(); |
+ return &static_cast<SVGStyledTransformableElement*>(element)->transform(); |
if (element->hasTagName(SVGNames::textTag)) |
- return static_cast<SVGTextElement*>(element)->transformAnimated(); |
+ return &static_cast<SVGTextElement*>(element)->transform(); |
if (element->hasTagName(SVGNames::linearGradientTag) || element->hasTagName(SVGNames::radialGradientTag)) |
- return static_cast<SVGGradientElement*>(element)->gradientTransformAnimated(); |
+ return &static_cast<SVGGradientElement*>(element)->gradientTransform(); |
// FIXME: Handle patternTransform, which is obviously missing! |
return 0; |
} |
@@ -139,10 +139,8 @@ |
} |
if (baseValue.isEmpty()) { |
- if (RefPtr<SVGAnimatedTransformList> list = animatedTransformListFor(targetElement)) { |
- list->detachListWrappers(0); |
- list->values().clear(); |
- } |
+ if (SVGTransformList* list = transformListFor(targetElement)) |
+ list->clear(); |
} else |
targetElement->setAttribute(SVGNames::transformAttr, baseValue); |
} |
@@ -152,20 +150,17 @@ |
SVGElement* targetElement = this->targetElement(); |
if (!targetElement || determineAnimatedAttributeType(targetElement) == AnimatedUnknown) |
return; |
- RefPtr<SVGAnimatedTransformList> animatedList = animatedTransformListFor(targetElement); |
- ASSERT(animatedList); |
+ SVGTransformList* transformList = transformListFor(targetElement); |
+ ASSERT(transformList); |
- if (!isAdditive()) { |
- animatedList->detachListWrappers(0); |
- animatedList->values().clear(); |
- } |
+ if (!isAdditive()) |
+ transformList->clear(); |
if (isAccumulated() && repeat) { |
SVGTransform accumulatedTransform = SVGTransformDistance(m_fromTransform, m_toTransform).scaledDistance(repeat).addToSVGTransform(SVGTransform()); |
transformList->append(accumulatedTransform); |
} |
SVGTransform transform = SVGTransformDistance(m_fromTransform, m_toTransform).scaledDistance(percentage).addToSVGTransform(m_fromTransform); |
- animatedList->values().append(transform); |
- animatedList->wrappers().append(RefPtr<SVGPropertyTearOff<SVGTransform> >()); |
+ transformList->append(transform); |
} |
bool SVGAnimateTransformElement::calculateFromAndToValues(const String& fromString, const String& toString) |
@@ -211,10 +206,9 @@ |
} |
// ...except in case where we have additional instances in <use> trees. |
- RefPtr<SVGAnimatedTransformList> animatedList = animatedTransformListFor(targetElement); |
- if (!animatedList) |
+ SVGTransformList* transformList = transformListFor(targetElement); |
+ if (!transformList) |
return; |
- SVGTransformList* transformList = &animatedList->values(); |
const HashSet<SVGElementInstance*>& instances = targetElement->instancesForElement(); |
const HashSet<SVGElementInstance*>::const_iterator end = instances.end(); |