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

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

Issue 11340016: Merge 132724 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 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
Index: Source/WebCore/svg/SVGAnimationElement.cpp
===================================================================
--- Source/WebCore/svg/SVGAnimationElement.cpp (revision 132837)
+++ Source/WebCore/svg/SVGAnimationElement.cpp (working copy)
@@ -39,6 +39,7 @@
#include "SVGNames.h"
#include "SVGParserUtilities.h"
#include "SVGStyledElement.h"
+#include <wtf/MathExtras.h>
namespace WebCore {
@@ -240,6 +241,8 @@
void SVGAnimationElement::beginElementAt(float offset)
{
+ if (isnan(offset))
+ return;
SMILTime elapsed = this->elapsed();
addBeginTime(elapsed, elapsed + offset, SMILTimeWithOrigin::ScriptOrigin);
}
@@ -251,6 +254,8 @@
void SVGAnimationElement::endElementAt(float offset)
{
+ if (isnan(offset))
+ return;
SMILTime elapsed = this->elapsed();
addEndTime(elapsed, elapsed + offset, SMILTimeWithOrigin::ScriptOrigin);
}
« no previous file with comments | « LayoutTests/svg/custom/elementTimeControl-nan-crash-expected.txt ('k') | Source/WebCore/svg/animation/SMILTime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698