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

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

Issue 380213002: An empty SVG path string is not in error (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: TestExpectations. Created 6 years, 5 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 | « Source/core/svg/SVGPathParser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGPathUtilities.cpp
diff --git a/Source/core/svg/SVGPathUtilities.cpp b/Source/core/svg/SVGPathUtilities.cpp
index 51cce510a81211991784a81b950ba050c2953bfb..ecf61b170370e83820074ef87e3bc9a0259c7bf3 100644
--- a/Source/core/svg/SVGPathUtilities.cpp
+++ b/Source/core/svg/SVGPathUtilities.cpp
@@ -98,7 +98,7 @@ static SVGPathBlender* globalSVGPathBlender()
bool buildPathFromString(const String& d, Path& result)
{
if (d.isEmpty())
- return false;
+ return true;
SVGPathBuilder* builder = globalSVGPathBuilder(result);
@@ -113,7 +113,7 @@ bool buildPathFromByteStream(const SVGPathByteStream* stream, Path& result)
{
ASSERT(stream);
if (stream->isEmpty())
- return false;
+ return true;
SVGPathBuilder* builder = globalSVGPathBuilder(result);
@@ -128,7 +128,7 @@ bool buildStringFromByteStream(const SVGPathByteStream* stream, String& result,
{
ASSERT(stream);
if (stream->isEmpty())
- return false;
+ return true;
SVGPathStringBuilder* builder = globalSVGPathStringBuilder();
@@ -145,7 +145,7 @@ bool buildSVGPathByteStreamFromString(const String& d, SVGPathByteStream* result
ASSERT(result);
result->clear();
if (d.isEmpty())
- return false;
+ return true;
// 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());
@@ -167,7 +167,7 @@ bool addToSVGPathByteStream(SVGPathByteStream* fromStream, const SVGPathByteStre
ASSERT(fromStream);
ASSERT(byStream);
if (fromStream->isEmpty() || byStream->isEmpty())
- return false;
+ return true;
SVGPathByteStreamBuilder* builder = globalSVGPathByteStreamBuilder(fromStream);
« no previous file with comments | « Source/core/svg/SVGPathParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698