| Index: Source/core/svg/SVGPathUtilities.cpp
|
| diff --git a/Source/core/svg/SVGPathUtilities.cpp b/Source/core/svg/SVGPathUtilities.cpp
|
| index 0842fe8efc625314d576a7f170503d4b3dd6c4bb..0da2181f6f899ee9163470a7b5b05144d7c4fc5f 100644
|
| --- a/Source/core/svg/SVGPathUtilities.cpp
|
| +++ b/Source/core/svg/SVGPathUtilities.cpp
|
| @@ -103,46 +103,43 @@ bool addToSVGPathByteStream(SVGPathByteStream& fromStream, const SVGPathByteStre
|
| return blender.addAnimatedPath(repeatCount);
|
| }
|
|
|
| -bool getSVGPathSegAtLengthFromSVGPathByteStream(const SVGPathByteStream& stream, float length, unsigned& pathSeg)
|
| +unsigned getSVGPathSegAtLengthFromSVGPathByteStream(const SVGPathByteStream& stream, float length)
|
| {
|
| if (stream.isEmpty())
|
| - return false;
|
| + return 0;
|
|
|
| PathTraversalState traversalState(PathTraversalState::TraversalSegmentAtLength);
|
| SVGPathTraversalStateBuilder builder(traversalState, length);
|
| SVGPathByteStreamSource source(stream);
|
| SVGPathParser parser(&source, &builder);
|
| - bool ok = parser.parsePathDataFromSource(NormalizedParsing);
|
| - pathSeg = builder.pathSegmentIndex();
|
| - return ok;
|
| + parser.parsePathDataFromSource(NormalizedParsing);
|
| + return builder.pathSegmentIndex();
|
| }
|
|
|
| -bool getTotalLengthOfSVGPathByteStream(const SVGPathByteStream& stream, float& totalLength)
|
| +float getTotalLengthOfSVGPathByteStream(const SVGPathByteStream& stream)
|
| {
|
| if (stream.isEmpty())
|
| - return false;
|
| + return 0;
|
|
|
| PathTraversalState traversalState(PathTraversalState::TraversalTotalLength);
|
| SVGPathTraversalStateBuilder builder(traversalState);
|
| SVGPathByteStreamSource source(stream);
|
| SVGPathParser parser(&source, &builder);
|
| - bool ok = parser.parsePathDataFromSource(NormalizedParsing);
|
| - totalLength = builder.totalLength();
|
| - return ok;
|
| + parser.parsePathDataFromSource(NormalizedParsing);
|
| + return builder.totalLength();
|
| }
|
|
|
| -bool getPointAtLengthOfSVGPathByteStream(const SVGPathByteStream& stream, float length, FloatPoint& point)
|
| +FloatPoint getPointAtLengthOfSVGPathByteStream(const SVGPathByteStream& stream, float length)
|
| {
|
| if (stream.isEmpty())
|
| - return false;
|
| + return FloatPoint();
|
|
|
| PathTraversalState traversalState(PathTraversalState::TraversalPointAtLength);
|
| SVGPathTraversalStateBuilder builder(traversalState, length);
|
| SVGPathByteStreamSource source(stream);
|
| SVGPathParser parser(&source, &builder);
|
| - bool ok = parser.parsePathDataFromSource(NormalizedParsing);
|
| - point = builder.currentPoint();
|
| - return ok;
|
| + parser.parsePathDataFromSource(NormalizedParsing);
|
| + return builder.currentPoint();
|
| }
|
|
|
| }
|
|
|