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

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

Issue 1469323002: SVGPathUtilities tidying (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 907f8d1e587cc76527a958692ddc7093ca5a02e9..c7a26df7a65a41762984e28c7f2e84989a565c64 100644
--- a/third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp
@@ -53,20 +53,19 @@ bool buildPathFromByteStream(const SVGPathByteStream& stream, Path& result)
return parser.parsePathDataFromSource(NormalizedParsing);
}
-bool buildStringFromByteStream(const SVGPathByteStream& stream, String& result, PathParsingMode parsingMode)
+String buildStringFromByteStream(const SVGPathByteStream& stream, PathParsingMode parsingMode)
{
if (stream.isEmpty())
- return true;
+ return String();
SVGPathStringBuilder builder;
SVGPathByteStreamSource source(stream);
SVGPathParser parser(&source, &builder);
- bool ok = parser.parsePathDataFromSource(parsingMode);
- result = builder.result();
- return ok;
+ parser.parsePathDataFromSource(parsingMode);
+ return builder.result();
}
-bool buildSVGPathByteStreamFromString(const String& d, SVGPathByteStream& result, PathParsingMode parsingMode)
+bool buildByteStreamFromString(const String& d, SVGPathByteStream& result)
{
result.clear();
if (d.isEmpty())
@@ -78,7 +77,7 @@ bool buildSVGPathByteStreamFromString(const String& d, SVGPathByteStream& result
SVGPathByteStreamBuilder builder(result);
SVGPathStringSource source(d);
SVGPathParser parser(&source, &builder);
- bool ok = parser.parsePathDataFromSource(parsingMode);
+ bool ok = parser.parsePathDataFromSource(UnalteredParsing);
result.shrinkToFit();
return ok;
}
« 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