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

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

Issue 305033004: SVG: Remove&inline |invokeMethodOnAllTargetProperties| (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAnimatedTypeAnimator.cpp
diff --git a/Source/core/svg/SVGAnimatedTypeAnimator.cpp b/Source/core/svg/SVGAnimatedTypeAnimator.cpp
index 2cdb0295e2e11a40ae3008a17137047e3e50807c..e0ce52d69c57c71381930309ba70fa7ffe1724e5 100644
--- a/Source/core/svg/SVGAnimatedTypeAnimator.cpp
+++ b/Source/core/svg/SVGAnimatedTypeAnimator.cpp
@@ -156,19 +156,6 @@ void SVGAnimatedTypeAnimator::calculateFromAndByValues(RefPtr<SVGPropertyBase>&
namespace {
-typedef void (SVGAnimatedPropertyBase::*SVGAnimatedPropertyMethod)();
-
-void invokeMethodOnAllTargetProperties(const WillBeHeapVector<RawPtrWillBeMember<SVGElement> >& list, const QualifiedName& attributeName, SVGAnimatedPropertyMethod method)
-{
- WillBeHeapVector<RawPtrWillBeMember<SVGElement> >::const_iterator it = list.begin();
- WillBeHeapVector<RawPtrWillBeMember<SVGElement> >::const_iterator itEnd = list.end();
- for (; it != itEnd; ++it) {
- RefPtr<SVGAnimatedPropertyBase> animatedProperty = (*it)->propertyFromAttribute(attributeName);
- if (animatedProperty)
- (animatedProperty.get()->*method)();
- }
-}
-
void setAnimatedValueOnAllTargetProperties(const WillBeHeapVector<RawPtrWillBeMember<SVGElement> >& list, const QualifiedName& attributeName, PassRefPtr<SVGPropertyBase> passValue)
{
RefPtr<SVGPropertyBase> value = passValue;
@@ -207,7 +194,13 @@ void SVGAnimatedTypeAnimator::stopAnimValAnimation(const WillBeHeapVector<RawPtr
ASSERT(isAnimatingSVGDom());
SVGElement::InstanceUpdateBlocker blocker(m_contextElement);
- invokeMethodOnAllTargetProperties(list, m_animatedProperty->attributeName(), &SVGAnimatedPropertyBase::animationEnded);
+ WillBeHeapVector<RawPtrWillBeMember<SVGElement> >::const_iterator it = list.begin();
+ WillBeHeapVector<RawPtrWillBeMember<SVGElement> >::const_iterator itEnd = list.end();
+ for (; it != itEnd; ++it) {
+ RefPtr<SVGAnimatedPropertyBase> animatedProperty = (*it)->propertyFromAttribute(m_animatedProperty->attributeName());
+ if (animatedProperty)
+ animatedProperty->animationEnded();
+ }
}
PassRefPtr<SVGPropertyBase> SVGAnimatedTypeAnimator::resetAnimValToBaseVal(const WillBeHeapVector<RawPtrWillBeMember<SVGElement> >& list)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698