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

Unified Diff: third_party/WebKit/Source/core/svg/SVGGeometryElement.h

Issue 2525233002: Move pathLength attribute from SVGPathElement to SVGGeometryElement. (Closed)
Patch Set: Align with review comments Created 4 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/SVGGeometryElement.h
diff --git a/third_party/WebKit/Source/core/svg/SVGGeometryElement.h b/third_party/WebKit/Source/core/svg/SVGGeometryElement.h
index dc2c4a1d80f26c96bf5b99aa5bb4aa96a39eebfa..f2922c3dfbc41c4dc1cd1b809ea494d814f64786 100644
--- a/third_party/WebKit/Source/core/svg/SVGGeometryElement.h
+++ b/third_party/WebKit/Source/core/svg/SVGGeometryElement.h
@@ -31,6 +31,7 @@
#ifndef SVGGeometryElement_h
#define SVGGeometryElement_h
+#include "core/svg/SVGAnimatedNumber.h"
#include "core/svg/SVGGraphicsElement.h"
namespace blink {
@@ -48,9 +49,14 @@ class SVGGeometryElement : public SVGGraphicsElement {
void toClipPath(Path&) const;
+ SVGAnimatedNumber* pathLength() const { return m_pathLength.get(); }
LayoutObject* createLayoutObject(const ComputedStyle&) override;
virtual float getTotalLength();
virtual SVGPointTearOff* getPointAtLength(float distance);
+ float pathLengthScaleFactor() const;
+ virtual float computePathLength() const;
+
+ DECLARE_VIRTUAL_TRACE();
protected:
SVGGeometryElement(const QualifiedName&,
@@ -59,6 +65,8 @@ class SVGGeometryElement : public SVGGraphicsElement {
private:
bool isSVGGeometryElement() const final { return true; }
+
+ Member<SVGAnimatedNumber> m_pathLength;
};
inline bool isSVGGeometryElement(const SVGElement& element) {

Powered by Google App Engine
This is Rietveld 408576698