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

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

Issue 1471943003: Introduce SVGPathQuery to hold SVG path query methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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
Index: third_party/WebKit/Source/core/svg/SVGPathElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGPathElement.cpp b/third_party/WebKit/Source/core/svg/SVGPathElement.cpp
index 94b22165159e02ad9d8de000a9ad1fec3e481ea4..676146dab788cb9592c3eaf4fcaf2b641047589f 100644
--- a/third_party/WebKit/Source/core/svg/SVGPathElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGPathElement.cpp
@@ -24,7 +24,7 @@
#include "core/layout/svg/LayoutSVGPath.h"
#include "core/svg/SVGDocumentExtensions.h"
#include "core/svg/SVGMPathElement.h"
-#include "core/svg/SVGPathUtilities.h"
+#include "core/svg/SVGPathQuery.h"
#include "core/svg/SVGPointTearOff.h"
namespace blink {
@@ -81,18 +81,18 @@ Path SVGPathElement::asPath() const
float SVGPathElement::getTotalLength()
{
- return getTotalLengthOfSVGPathByteStream(pathByteStream());
+ return SVGPathQuery(pathByteStream()).getTotalLength();
}
PassRefPtrWillBeRawPtr<SVGPointTearOff> SVGPathElement::getPointAtLength(float length)
{
- FloatPoint point = getPointAtLengthOfSVGPathByteStream(pathByteStream(), length);
+ FloatPoint point = SVGPathQuery(pathByteStream()).getPointAtLength(length);
return SVGPointTearOff::create(SVGPoint::create(point), 0, PropertyIsNotAnimVal);
}
unsigned SVGPathElement::getPathSegAtLength(float length)
{
- return getSVGPathSegAtLengthFromSVGPathByteStream(pathByteStream(), length);
+ return SVGPathQuery(pathByteStream()).getPathSegIndexAtLength(length);
}
void SVGPathElement::svgAttributeChanged(const QualifiedName& attrName)
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathConsumer.h ('k') | third_party/WebKit/Source/core/svg/SVGPathParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698