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 d65a378887c3fa87b332ce1d6a6c3683e3ff56a3..c2bd58a427f52c2760aadb2823a5ec30c3da4e04 100644 |
--- a/third_party/WebKit/Source/core/svg/SVGPathElement.cpp |
+++ b/third_party/WebKit/Source/core/svg/SVGPathElement.cpp |
@@ -30,37 +30,13 @@ |
namespace blink { |
-class SVGAnimatedPathLength final : public SVGAnimatedNumber { |
- public: |
- static SVGAnimatedPathLength* create(SVGPathElement* contextElement) { |
- return new SVGAnimatedPathLength(contextElement); |
- } |
- |
- SVGParsingError setBaseValueAsString(const String& value) override { |
- SVGParsingError parseStatus = |
- SVGAnimatedNumber::setBaseValueAsString(value); |
- if (parseStatus == SVGParseStatus::NoError && baseValue()->value() < 0) |
- parseStatus = SVGParseStatus::NegativeValue; |
- return parseStatus; |
- } |
- |
- private: |
- explicit SVGAnimatedPathLength(SVGPathElement* contextElement) |
- : SVGAnimatedNumber(contextElement, |
- SVGNames::pathLengthAttr, |
- SVGNumber::create()) {} |
-}; |
- |
inline SVGPathElement::SVGPathElement(Document& document) |
: SVGGeometryElement(SVGNames::pathTag, document), |
- m_pathLength(SVGAnimatedPathLength::create(this)), |
m_path(SVGAnimatedPath::create(this, SVGNames::dAttr, CSSPropertyD)) { |
- addToPropertyMap(m_pathLength); |
addToPropertyMap(m_path); |
} |
DEFINE_TRACE(SVGPathElement) { |
- visitor->trace(m_pathLength); |
visitor->trace(m_path); |
SVGGeometryElement::trace(visitor); |
} |
@@ -81,18 +57,8 @@ const StylePath* SVGPathElement::stylePath() const { |
return m_path->currentValue()->stylePath(); |
} |
-float SVGPathElement::pathLengthScaleFactor() const { |
- if (!pathLength()->isSpecified()) |
- return 1; |
- float authorPathLength = pathLength()->currentValue()->value(); |
- if (authorPathLength < 0) |
- return 1; |
- if (!authorPathLength) |
- return 0; |
- float computedPathLength = stylePath()->length(); |
- if (!computedPathLength) |
- return 1; |
- return computedPathLength / authorPathLength; |
+float SVGPathElement::computePathLength() const { |
+ return stylePath()->length(); |
} |
Path SVGPathElement::asPath() const { |