Index: third_party/WebKit/Source/core/svg/SVGGeometryElement.cpp |
diff --git a/third_party/WebKit/Source/core/svg/SVGGeometryElement.cpp b/third_party/WebKit/Source/core/svg/SVGGeometryElement.cpp |
index b407cd3430fa89e4aca61633346ad55de39867f7..993675de9cf557c2e3ecbdf056578fe7ce6e8438 100644 |
--- a/third_party/WebKit/Source/core/svg/SVGGeometryElement.cpp |
+++ b/third_party/WebKit/Source/core/svg/SVGGeometryElement.cpp |
@@ -87,6 +87,24 @@ void SVGGeometryElement::toClipPath(Path& path) const { |
path.setWindRule(layoutObject()->style()->svgStyle().clipRule()); |
} |
+float SVGGeometryElement::getTotalLength() { |
+ document().updateStyleAndLayoutIgnorePendingStylesheets(); |
+ |
+ if (!layoutObject()) |
+ return 0; |
+ return asPath().length(); |
+} |
+ |
+SVGPointTearOff* SVGGeometryElement::getPointAtLength(float length) { |
+ document().updateStyleAndLayoutIgnorePendingStylesheets(); |
+ |
+ FloatPoint point; |
+ if (layoutObject()) |
+ point = asPath().pointAtLength(length); |
+ return SVGPointTearOff::create(SVGPoint::create(point), 0, |
+ PropertyIsNotAnimVal); |
+} |
+ |
LayoutObject* SVGGeometryElement::createLayoutObject(const ComputedStyle&) { |
// By default, any subclass is expected to do path-based drawing. |
return new LayoutSVGPath(this); |