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

Unified Diff: third_party/WebKit/Source/core/svg/SVGNumberList.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/SVGNumberList.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGNumberList.cpp b/third_party/WebKit/Source/core/svg/SVGNumberList.cpp
index c3a5867ccc71c5461cc1da902e640efab709ec90..03f74dfda61f4a8472d5f59b41f3e2fde4336a2d 100644
--- a/third_party/WebKit/Source/core/svg/SVGNumberList.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGNumberList.cpp
@@ -69,11 +69,11 @@ bool SVGNumberList::parse(const CharType*& ptr, const CharType* end)
return true;
}
-void SVGNumberList::setValueAsString(const String& value, ExceptionState& exceptionState)
+SVGParsingError SVGNumberList::setValueAsString(const String& value)
{
if (value.isEmpty()) {
clear();
- return;
+ return NoError;
}
bool valid = false;
@@ -88,10 +88,11 @@ void SVGNumberList::setValueAsString(const String& value, ExceptionState& except
}
if (!valid) {
- exceptionState.throwDOMException(SyntaxError, "Problem parsing number list \""+value+"\"");
// No call to |clear()| here. SVG policy is to use valid items before error.
// Spec: http://www.w3.org/TR/SVG/single-page.html#implnote-ErrorProcessing
+ return ParsingAttributeFailedError;
}
+ return NoError;
}
void SVGNumberList::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement* contextElement)

Powered by Google App Engine
This is Rietveld 408576698