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

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

Issue 1588993005: Extended error reporting for SVG attribute parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add PLATFORM_EXPORT Created 4 years, 11 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
Index: third_party/WebKit/Source/core/svg/SVGNumber.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGNumber.cpp b/third_party/WebKit/Source/core/svg/SVGNumber.cpp
index a20b3642132510d7a32bb19f55378cb536a33cdb..7bf387971e117ad212cef52eea98289d971d7aa1 100644
--- a/third_party/WebKit/Source/core/svg/SVGNumber.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGNumber.cpp
@@ -70,7 +70,7 @@ SVGParsingError SVGNumber::setValueAsString(const String& string)
{
if (string.isEmpty()) {
m_value = 0;
- return NoError;
+ return SVGParseStatus::NoError;
}
bool valid = false;
@@ -86,9 +86,9 @@ SVGParsingError SVGNumber::setValueAsString(const String& string)
if (!valid) {
m_value = 0;
- return ParsingAttributeFailedError;
+ return SVGParseStatus::ParsingFailed;
}
- return NoError;
+ return SVGParseStatus::NoError;
}
void SVGNumber::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement*)
@@ -120,10 +120,10 @@ PassRefPtrWillBeRawPtr<SVGNumber> SVGNumberAcceptPercentage::clone() const
SVGParsingError SVGNumberAcceptPercentage::setValueAsString(const String& string)
{
if (parseNumberOrPercentage(string, m_value))
- return NoError;
+ return SVGParseStatus::NoError;
m_value = 0;
- return ParsingAttributeFailedError;
+ return SVGParseStatus::ParsingFailed;
}
SVGNumberAcceptPercentage::SVGNumberAcceptPercentage(float value)
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGLengthTearOff.cpp ('k') | third_party/WebKit/Source/core/svg/SVGNumberList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698