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

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

Issue 1418663004: SVG animateMotion paths that only cause offsets are no longer ignored (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/SVGAnimateMotionElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimateMotionElement.cpp b/third_party/WebKit/Source/core/svg/SVGAnimateMotionElement.cpp
index bbd4503917039afa145ae4895cbb7616053e24cc..72dd2ff5a56a989da8cc5fd1c4d4f4ea9d0e1f45 100644
--- a/third_party/WebKit/Source/core/svg/SVGAnimateMotionElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGAnimateMotionElement.cpp
@@ -253,15 +253,12 @@ void SVGAnimateMotionElement::calculateAnimatedValue(float percentage, unsigned
float positionOnPath = m_animationPath.length() * percentage;
FloatPoint position;
float angle;
- bool ok = m_animationPath.pointAndNormalAtLength(positionOnPath, position, angle);
- if (!ok)
- return;
+ m_animationPath.pointAndNormalAtLength(positionOnPath, position, angle);
// Handle accumulate="sum".
if (isAccumulated() && repeatCount) {
- FloatPoint positionAtEndOfDuration = m_animationPath.pointAtLength(m_animationPath.length(), ok);
- if (ok)
- position.move(positionAtEndOfDuration.x() * repeatCount, positionAtEndOfDuration.y() * repeatCount);
+ FloatPoint positionAtEndOfDuration = m_animationPath.pointAtLength(m_animationPath.length());
+ position.move(positionAtEndOfDuration.x() * repeatCount, positionAtEndOfDuration.y() * repeatCount);
}
transform->translate(position.x(), position.y());
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.cpp ('k') | third_party/WebKit/Source/platform/graphics/Path.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698