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

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

Issue 1642463004: Extended error reporting for SVG path parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: "path flag" -> "arc flag" 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
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathUtilities.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp b/third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp
index 1fde0eb9ecc63e5904b810b67c911b40f5801b11..74a868d10df416453b3078c03898b412b982e15d 100644
--- a/third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp
@@ -62,11 +62,11 @@ String buildStringFromByteStream(const SVGPathByteStream& stream)
return builder.result();
}
-bool buildByteStreamFromString(const String& d, SVGPathByteStream& result)
+SVGParsingError buildByteStreamFromString(const String& d, SVGPathByteStream& result)
{
result.clear();
if (d.isEmpty())
- return true;
+ return SVGParseStatus::NoError;
// The string length is typically a minor overestimate of eventual byte stream size, so it avoids us a lot of reallocs.
result.reserveInitialCapacity(d.length());
@@ -74,9 +74,9 @@ bool buildByteStreamFromString(const String& d, SVGPathByteStream& result)
SVGPathByteStreamBuilder builder(result);
SVGPathStringSource source(d);
SVGPathParser parser(&source, &builder);
- bool ok = parser.parsePathDataFromSource();
+ parser.parsePathDataFromSource();
result.shrinkToFit();
- return ok;
+ return source.parseError();
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathUtilities.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698