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

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

Issue 2386013002: Hoist target element null-checks out of SVGAnimateElement::calculate* (Closed)
Patch Set: Created 4 years, 2 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 | « third_party/WebKit/Source/core/svg/SVGAnimateMotionElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp b/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
index 76645345a9786e441d438af36fff1fa94f73bd0c..089185dbd7dcdb72a9f054c1b1cd01a3468c19ae 100644
--- a/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
@@ -573,7 +573,8 @@ void SVGAnimationElement::startedActiveInterval() {
if (!isValid())
return;
-
+ if (!targetElement())
+ return;
if (!hasValidAttributeType())
return;
@@ -649,7 +650,7 @@ void SVGAnimationElement::startedActiveInterval() {
void SVGAnimationElement::updateAnimation(float percent,
unsigned repeatCount,
SVGSMILElement* resultElement) {
- if (!m_animationValid)
+ if (!m_animationValid || !targetElement())
return;
float effectivePercent;
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGAnimateMotionElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698