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

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

Issue 1541923002: Make SVGElement::propertyFromAttribute return raw pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
Index: third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.cpp b/third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.cpp
index 18b00eda145af1fef763398ed80d8440de7b1c49..e625e7eac3439353fe9a85a0ebf444e7ff1fa682 100644
--- a/third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.cpp
@@ -169,8 +169,7 @@ void setAnimatedValueOnAllTargetProperties(const SVGElementInstances& list, cons
RefPtrWillBeRawPtr<SVGPropertyBase> value = passValue;
for (SVGElement* elementInstance : list) {
- RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> animatedProperty = elementInstance->propertyFromAttribute(attributeName);
- if (animatedProperty)
+ if (SVGAnimatedPropertyBase* animatedProperty = elementInstance->propertyFromAttribute(attributeName))
animatedProperty->setAnimatedValue(value);
}
}
@@ -204,8 +203,7 @@ void SVGAnimatedTypeAnimator::stopAnimValAnimation(const SVGElementInstances& li
SVGElement::InstanceUpdateBlocker blocker(m_contextElement);
for (SVGElement* elementInstance : list) {
- RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> animatedProperty = elementInstance->propertyFromAttribute(m_animatedProperty->attributeName());
- if (animatedProperty)
+ if (SVGAnimatedPropertyBase* animatedProperty = elementInstance->propertyFromAttribute(m_animatedProperty->attributeName()))
animatedProperty->animationEnded();
}
}
« no previous file with comments | « third_party/WebKit/Source/core/animation/StringKeyframe.cpp ('k') | third_party/WebKit/Source/core/svg/SVGCircleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698