| 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 a59e280b41d634f58b3d0468ad9afd61544a92e5..8a26824bbabad397c0903c1a668485173d08e32e 100644
|
| --- a/third_party/WebKit/Source/core/svg/SVGPathElement.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/SVGPathElement.cpp
|
| @@ -24,25 +24,6 @@
|
| #include "core/layout/svg/LayoutSVGPath.h"
|
| #include "core/svg/SVGDocumentExtensions.h"
|
| #include "core/svg/SVGMPathElement.h"
|
| -#include "core/svg/SVGPathSegArcAbs.h"
|
| -#include "core/svg/SVGPathSegArcRel.h"
|
| -#include "core/svg/SVGPathSegClosePath.h"
|
| -#include "core/svg/SVGPathSegCurvetoCubicAbs.h"
|
| -#include "core/svg/SVGPathSegCurvetoCubicRel.h"
|
| -#include "core/svg/SVGPathSegCurvetoCubicSmoothAbs.h"
|
| -#include "core/svg/SVGPathSegCurvetoCubicSmoothRel.h"
|
| -#include "core/svg/SVGPathSegCurvetoQuadraticAbs.h"
|
| -#include "core/svg/SVGPathSegCurvetoQuadraticRel.h"
|
| -#include "core/svg/SVGPathSegCurvetoQuadraticSmoothAbs.h"
|
| -#include "core/svg/SVGPathSegCurvetoQuadraticSmoothRel.h"
|
| -#include "core/svg/SVGPathSegLinetoAbs.h"
|
| -#include "core/svg/SVGPathSegLinetoHorizontalAbs.h"
|
| -#include "core/svg/SVGPathSegLinetoHorizontalRel.h"
|
| -#include "core/svg/SVGPathSegLinetoRel.h"
|
| -#include "core/svg/SVGPathSegLinetoVerticalAbs.h"
|
| -#include "core/svg/SVGPathSegLinetoVerticalRel.h"
|
| -#include "core/svg/SVGPathSegMovetoAbs.h"
|
| -#include "core/svg/SVGPathSegMovetoRel.h"
|
| #include "core/svg/SVGPathUtilities.h"
|
| #include "core/svg/SVGPointTearOff.h"
|
|
|
| @@ -74,16 +55,16 @@ private:
|
| inline SVGPathElement::SVGPathElement(Document& document)
|
| : SVGGeometryElement(SVGNames::pathTag, document)
|
| , m_pathLength(SVGAnimatedPathLength::create(this))
|
| - , m_pathSegList(SVGAnimatedPath::create(this, SVGNames::dAttr))
|
| + , m_path(SVGAnimatedPath::create(this, SVGNames::dAttr))
|
| {
|
| addToPropertyMap(m_pathLength);
|
| - addToPropertyMap(m_pathSegList);
|
| + addToPropertyMap(m_path);
|
| }
|
|
|
| DEFINE_TRACE(SVGPathElement)
|
| {
|
| visitor->trace(m_pathLength);
|
| - visitor->trace(m_pathSegList);
|
| + visitor->trace(m_path);
|
| SVGGeometryElement::trace(visitor);
|
| }
|
|
|
| @@ -92,119 +73,24 @@ DEFINE_NODE_FACTORY(SVGPathElement)
|
| Path SVGPathElement::asPath() const
|
| {
|
| Path path;
|
| - buildPathFromByteStream(*pathByteStream(), path);
|
| + buildPathFromByteStream(pathByteStream(), path);
|
| return path;
|
| }
|
|
|
| float SVGPathElement::getTotalLength()
|
| {
|
| - return getTotalLengthOfSVGPathByteStream(*pathByteStream());
|
| + return getTotalLengthOfSVGPathByteStream(pathByteStream());
|
| }
|
|
|
| PassRefPtrWillBeRawPtr<SVGPointTearOff> SVGPathElement::getPointAtLength(float length)
|
| {
|
| - FloatPoint point = getPointAtLengthOfSVGPathByteStream(*pathByteStream(), length);
|
| + FloatPoint point = getPointAtLengthOfSVGPathByteStream(pathByteStream(), length);
|
| return SVGPointTearOff::create(SVGPoint::create(point), 0, PropertyIsNotAnimVal);
|
| }
|
|
|
| unsigned SVGPathElement::getPathSegAtLength(float length)
|
| {
|
| - return getSVGPathSegAtLengthFromSVGPathByteStream(*pathByteStream(), length);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegClosePath> SVGPathElement::createSVGPathSegClosePath()
|
| -{
|
| - return SVGPathSegClosePath::create(0);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegMovetoAbs> SVGPathElement::createSVGPathSegMovetoAbs(float x, float y)
|
| -{
|
| - return SVGPathSegMovetoAbs::create(0, x, y);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegMovetoRel> SVGPathElement::createSVGPathSegMovetoRel(float x, float y)
|
| -{
|
| - return SVGPathSegMovetoRel::create(0, x, y);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegLinetoAbs> SVGPathElement::createSVGPathSegLinetoAbs(float x, float y)
|
| -{
|
| - return SVGPathSegLinetoAbs::create(0, x, y);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegLinetoRel> SVGPathElement::createSVGPathSegLinetoRel(float x, float y)
|
| -{
|
| - return SVGPathSegLinetoRel::create(0, x, y);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegCurvetoCubicAbs> SVGPathElement::createSVGPathSegCurvetoCubicAbs(float x, float y, float x1, float y1, float x2, float y2)
|
| -{
|
| - return SVGPathSegCurvetoCubicAbs::create(0, x, y, x1, y1, x2, y2);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegCurvetoCubicRel> SVGPathElement::createSVGPathSegCurvetoCubicRel(float x, float y, float x1, float y1, float x2, float y2)
|
| -{
|
| - return SVGPathSegCurvetoCubicRel::create(0, x, y, x1, y1, x2, y2);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegCurvetoQuadraticAbs> SVGPathElement::createSVGPathSegCurvetoQuadraticAbs(float x, float y, float x1, float y1)
|
| -{
|
| - return SVGPathSegCurvetoQuadraticAbs::create(0, x, y, x1, y1);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegCurvetoQuadraticRel> SVGPathElement::createSVGPathSegCurvetoQuadraticRel(float x, float y, float x1, float y1)
|
| -{
|
| - return SVGPathSegCurvetoQuadraticRel::create(0, x, y, x1, y1);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegArcAbs> SVGPathElement::createSVGPathSegArcAbs(float x, float y, float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag)
|
| -{
|
| - return SVGPathSegArcAbs::create(0, x, y, r1, r2, angle, largeArcFlag, sweepFlag);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegArcRel> SVGPathElement::createSVGPathSegArcRel(float x, float y, float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag)
|
| -{
|
| - return SVGPathSegArcRel::create(0, x, y, r1, r2, angle, largeArcFlag, sweepFlag);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegLinetoHorizontalAbs> SVGPathElement::createSVGPathSegLinetoHorizontalAbs(float x)
|
| -{
|
| - return SVGPathSegLinetoHorizontalAbs::create(0, x);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegLinetoHorizontalRel> SVGPathElement::createSVGPathSegLinetoHorizontalRel(float x)
|
| -{
|
| - return SVGPathSegLinetoHorizontalRel::create(0, x);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegLinetoVerticalAbs> SVGPathElement::createSVGPathSegLinetoVerticalAbs(float y)
|
| -{
|
| - return SVGPathSegLinetoVerticalAbs::create(0, y);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegLinetoVerticalRel> SVGPathElement::createSVGPathSegLinetoVerticalRel(float y)
|
| -{
|
| - return SVGPathSegLinetoVerticalRel::create(0, y);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegCurvetoCubicSmoothAbs> SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs(float x, float y, float x2, float y2)
|
| -{
|
| - return SVGPathSegCurvetoCubicSmoothAbs::create(0, x, y, x2, y2);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegCurvetoCubicSmoothRel> SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel(float x, float y, float x2, float y2)
|
| -{
|
| - return SVGPathSegCurvetoCubicSmoothRel::create(0, x, y, x2, y2);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegCurvetoQuadraticSmoothAbs> SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs(float x, float y)
|
| -{
|
| - return SVGPathSegCurvetoQuadraticSmoothAbs::create(0, x, y);
|
| -}
|
| -
|
| -PassRefPtrWillBeRawPtr<SVGPathSegCurvetoQuadraticSmoothRel> SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel(float x, float y)
|
| -{
|
| - return SVGPathSegCurvetoQuadraticSmoothRel::create(0, x, y);
|
| + return getSVGPathSegAtLengthFromSVGPathByteStream(pathByteStream(), length);
|
| }
|
|
|
| void SVGPathElement::svgAttributeChanged(const QualifiedName& attrName)
|
| @@ -255,19 +141,4 @@ void SVGPathElement::removedFrom(ContainerNode* rootParent)
|
| invalidateMPathDependencies();
|
| }
|
|
|
| -void SVGPathElement::pathSegListChanged(ListModification listModification)
|
| -{
|
| - m_pathSegList->baseValue()->clearByteStream();
|
| -
|
| - invalidateSVGAttributes();
|
| -
|
| - SVGElement::InvalidationGuard invalidationGuard(this);
|
| - LayoutSVGShape* layoutObject = toLayoutSVGShape(this->layoutObject());
|
| - if (!layoutObject)
|
| - return;
|
| -
|
| - layoutObject->setNeedsShapeUpdate();
|
| - markForLayoutAndParentResourceInvalidation(layoutObject);
|
| -}
|
| -
|
| } // namespace blink
|
|
|