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

Unified Diff: Source/WebCore/svg/SVGAnimateTransformElement.cpp

Issue 7443008: Revert 91274 - Merge 91148 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 5 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 | « LayoutTests/svg/animations/svgtransform-animation-discrete-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « LayoutTests/svg/animations/svgtransform-animation-discrete-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698