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

Unified Diff: third_party/WebKit/Source/core/svg/SVGPointList.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/SVGPointList.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGPointList.cpp b/third_party/WebKit/Source/core/svg/SVGPointList.cpp
index d1b2ac7b1a0d18efbf23e2b487fc346705b53dd4..117969e37d2f0cf160b167134c0fe688b623c31f 100644
--- a/third_party/WebKit/Source/core/svg/SVGPointList.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGPointList.cpp
@@ -88,11 +88,11 @@ bool SVGPointList::parse(const CharType*& ptr, const CharType* end)
}
}
-void SVGPointList::setValueAsString(const String& value, ExceptionState& exceptionState)
+SVGParsingError SVGPointList::setValueAsString(const String& value)
{
if (value.isEmpty()) {
clear();
- return;
+ return NoError;
}
bool valid = false;
@@ -105,9 +105,7 @@ void SVGPointList::setValueAsString(const String& value, ExceptionState& excepti
const UChar* end = ptr + value.length();
valid = parse(ptr, end);
}
-
- if (!valid)
- exceptionState.throwDOMException(SyntaxError, "Problem parsing points=\""+value+"\"");
+ return valid ? NoError : ParsingAttributeFailedError;
}
void SVGPointList::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement* contextElement)

Powered by Google App Engine
This is Rietveld 408576698