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

Unified Diff: third_party/WebKit/Source/core/svg/SVGStringList.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/SVGStringList.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGStringList.cpp b/third_party/WebKit/Source/core/svg/SVGStringList.cpp
index 565070c7cd811eeeb86303a26319e4d364dc44c5..120a4d383ffe9607107b376ddbc61a93ab7ee0dd 100644
--- a/third_party/WebKit/Source/core/svg/SVGStringList.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGStringList.cpp
@@ -102,12 +102,14 @@ void SVGStringList::parseInternal(const CharType*& ptr, const CharType* end)
}
}
-void SVGStringList::setValueAsString(const String& data, ExceptionState&)
+SVGParsingError SVGStringList::setValueAsString(const String& data)
{
// FIXME: Add more error checking and reporting.
m_values.clear();
+
if (data.isEmpty())
- return;
+ return NoError;
+
if (data.is8Bit()) {
const LChar* ptr = data.characters8();
const LChar* end = ptr + data.length();
@@ -117,6 +119,7 @@ void SVGStringList::setValueAsString(const String& data, ExceptionState&)
const UChar* end = ptr + data.length();
parseInternal(ptr, end);
}
+ return NoError;
}
String SVGStringList::valueAsString() const

Powered by Google App Engine
This is Rietveld 408576698