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

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

Issue 302643004: [SVG2] Allow leading and trailing whitespace in svg attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@relax_todouble_wtf
Patch Set: split tests to combat slow xp trybots Created 6 years, 6 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 | « Source/core/svg/SVGAnimationElement.cpp ('k') | Source/core/svg/SVGLength.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGInteger.cpp
diff --git a/Source/core/svg/SVGInteger.cpp b/Source/core/svg/SVGInteger.cpp
index c91da72424a97f9f1ce59266d1e7c223cbb6046b..2fc7e9a187a97e06ff93c2f5cafee2aa2b6da47b 100644
--- a/Source/core/svg/SVGInteger.cpp
+++ b/Source/core/svg/SVGInteger.cpp
@@ -30,6 +30,7 @@
#include "config.h"
#include "core/svg/SVGInteger.h"
+#include "core/html/parser/HTMLParserIdioms.h"
#include "core/svg/SVGAnimationElement.h"
@@ -66,7 +67,7 @@ void SVGInteger::setValueAsString(const String& string, ExceptionState& exceptio
}
bool valid = true;
- m_value = string.toIntStrict(&valid);
+ m_value = stripLeadingAndTrailingHTMLSpaces(string).toIntStrict(&valid);
if (!valid) {
exceptionState.throwDOMException(SyntaxError, "The value provided ('" + string + "') is invalid.");
« no previous file with comments | « Source/core/svg/SVGAnimationElement.cpp ('k') | Source/core/svg/SVGLength.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698