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

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

Issue 751323002: Simplify SVGPathByteStream-based path-query functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | « no previous file | Source/core/svg/SVGPathUtilities.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGPathElement.cpp
diff --git a/Source/core/svg/SVGPathElement.cpp b/Source/core/svg/SVGPathElement.cpp
index b26d619e6b60a1bdadbd39a38cbcb890cbe1e54b..78b4a316975250abc81115dc97477ccd5da20bf0 100644
--- a/Source/core/svg/SVGPathElement.cpp
+++ b/Source/core/svg/SVGPathElement.cpp
@@ -68,23 +68,18 @@ DEFINE_NODE_FACTORY(SVGPathElement)
float SVGPathElement::getTotalLength()
{
- float totalLength = 0;
- getTotalLengthOfSVGPathByteStream(*pathByteStream(), totalLength);
- return totalLength;
+ return getTotalLengthOfSVGPathByteStream(*pathByteStream());
}
PassRefPtrWillBeRawPtr<SVGPointTearOff> SVGPathElement::getPointAtLength(float length)
{
- FloatPoint point;
- getPointAtLengthOfSVGPathByteStream(*pathByteStream(), length, point);
+ FloatPoint point = getPointAtLengthOfSVGPathByteStream(*pathByteStream(), length);
return SVGPointTearOff::create(SVGPoint::create(point), 0, PropertyIsNotAnimVal);
}
unsigned SVGPathElement::getPathSegAtLength(float length)
{
- unsigned pathSeg = 0;
- getSVGPathSegAtLengthFromSVGPathByteStream(*pathByteStream(), length, pathSeg);
- return pathSeg;
+ return getSVGPathSegAtLengthFromSVGPathByteStream(*pathByteStream(), length);
}
PassRefPtrWillBeRawPtr<SVGPathSegClosePath> SVGPathElement::createSVGPathSegClosePath()
« no previous file with comments | « no previous file | Source/core/svg/SVGPathUtilities.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698