| 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 993675de9cf557c2e3ecbdf056578fe7ce6e8438..4f18c0424e8547800fcc4ab410743ca465b8a134 100644
|
| --- a/third_party/WebKit/Source/core/svg/SVGGeometryElement.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/SVGGeometryElement.cpp
|
| @@ -39,10 +39,39 @@
|
|
|
| namespace blink {
|
|
|
| +class SVGAnimatedPathLength final : public SVGAnimatedNumber {
|
| + public:
|
| + static SVGAnimatedPathLength* create(SVGGeometryElement* 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(SVGGeometryElement* contextElement)
|
| + : SVGAnimatedNumber(contextElement,
|
| + SVGNames::pathLengthAttr,
|
| + SVGNumber::create()) {}
|
| +};
|
| +
|
| SVGGeometryElement::SVGGeometryElement(const QualifiedName& tagName,
|
| Document& document,
|
| ConstructionType constructionType)
|
| - : SVGGraphicsElement(tagName, document, constructionType) {}
|
| + : SVGGraphicsElement(tagName, document, constructionType),
|
| + m_pathLength(SVGAnimatedPathLength::create(this)) {
|
| + addToPropertyMap(m_pathLength);
|
| +}
|
| +
|
| +DEFINE_TRACE(SVGGeometryElement) {
|
| + visitor->trace(m_pathLength);
|
| + SVGGraphicsElement::trace(visitor);
|
| +}
|
|
|
| bool SVGGeometryElement::isPointInFill(SVGPointTearOff* point) const {
|
| document().updateStyleAndLayoutIgnorePendingStylesheets();
|
|
|