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

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

Issue 1544673003: Refactor propagation of parsing errors for SVG attributes (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/SVGIntegerOptionalInteger.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGIntegerOptionalInteger.cpp b/third_party/WebKit/Source/core/svg/SVGIntegerOptionalInteger.cpp
index 16c02de8f26d2157fa3e0a979fec76d32104284f..b064168d72a4b5e2afdc0a79b1cd35c27b872d55 100644
--- a/third_party/WebKit/Source/core/svg/SVGIntegerOptionalInteger.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGIntegerOptionalInteger.cpp
@@ -76,16 +76,18 @@ String SVGIntegerOptionalInteger::valueAsString() const
return String::number(m_firstInteger->value()) + " " + String::number(m_secondInteger->value());
}
-void SVGIntegerOptionalInteger::setValueAsString(const String& value, ExceptionState& exceptionState)
+SVGParsingError SVGIntegerOptionalInteger::setValueAsString(const String& value)
{
float x, y;
+ SVGParsingError parseStatus = NoError;
if (!parseNumberOptionalNumber(value, x, y)) {
- exceptionState.throwDOMException(SyntaxError, "The value provided ('" + value + "') is invalid.");
+ parseStatus = ParsingAttributeFailedError;
x = y = 0;
}
m_firstInteger->setValue(x);
m_secondInteger->setValue(y);
+ return parseStatus;
}
void SVGIntegerOptionalInteger::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement*)

Powered by Google App Engine
This is Rietveld 408576698