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

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

Issue 1642463004: Extended error reporting for SVG path parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/SVGParsingError.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGParsingError.cpp b/third_party/WebKit/Source/core/svg/SVGParsingError.cpp
index da2345ddc9f97f47dccb3a273603c990d72bf5a7..9602b5ffaffba4f244cf17c3b34b44bc964b84dd 100644
--- a/third_party/WebKit/Source/core/svg/SVGParsingError.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGParsingError.cpp
@@ -28,14 +28,20 @@ std::pair<const char*, const char*> messageForStatus(SVGParseStatus status)
switch (status) {
case SVGParseStatus::TrailingGarbage:
return std::make_pair("Trailing garbage, ", ".");
+ case SVGParseStatus::ExpectedArcFlag:
+ return std::make_pair("Expected path flag ('0' or '1'), ", ".");
f(malita) 2016/01/27 14:51:13 Nit: "Expected arc flag"? Or maybe you're planning
fs 2016/01/27 14:57:56 Yes, I think I had intended to say "arc flag" here
case SVGParseStatus::ExpectedBoolean:
return std::make_pair("Expected 'true' or 'false', ", ".");
case SVGParseStatus::ExpectedEnumeration:
return std::make_pair("Unrecognized enumerated value, ", ".");
case SVGParseStatus::ExpectedLength:
return std::make_pair("Expected length, ", ".");
+ case SVGParseStatus::ExpectedMoveToCommand:
+ return std::make_pair("Expected moveto path command ('M' or 'm'), ", ".");
case SVGParseStatus::ExpectedNumber:
return std::make_pair("Expected number, ", ".");
+ case SVGParseStatus::ExpectedPathCommand:
+ return std::make_pair("Expected path command, ", ".");
case SVGParseStatus::NegativeValue:
return std::make_pair("A negative value is not valid. (", ")");
case SVGParseStatus::ParsingFailed:

Powered by Google App Engine
This is Rietveld 408576698