OSDN Git Service

Merge WebKit at r71558: Initial merge by git.
[android-x86/external-webkit.git] / WebCore / svg / SVGPathElement.h
index 718f05b..91d55b1 100644 (file)
@@ -23,6 +23,7 @@
 
 #if ENABLE(SVG)
 #include "SVGAnimatedPathData.h"
+#include "SVGAnimatedPropertyMacros.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGLangSpace.h"
 #include "SVGStyledTransformableElement.h"
@@ -50,19 +51,18 @@ namespace WebCore {
     class SVGPathSegCurvetoCubicSmoothRel;
     class SVGPathSegCurvetoQuadraticSmoothAbs;
     class SVGPathSegCurvetoQuadraticSmoothRel;
+
     class SVGPathElement : public SVGStyledTransformableElement,
                            public SVGTests,
                            public SVGLangSpace,
                            public SVGExternalResourcesRequired,
                            public SVGAnimatedPathData {
     public:
-        SVGPathElement(const QualifiedName&, Document*);
-        virtual ~SVGPathElement();
+        static PassRefPtr<SVGPathElement> create(const QualifiedName&, Document*);
         
-        virtual bool isValid() const { return SVGTests::isValid(); }
         float getTotalLength();
         FloatPoint getPointAtLength(float distance);
-        unsigned long getPathSegAtLength(float distance, ExceptionCode&);
+        unsigned long getPathSegAtLength(float distance);
 
         static PassRefPtr<SVGPathSegClosePath> createSVGPathSegClosePath();
         static PassRefPtr<SVGPathSegMovetoAbs> createSVGPathSegMovetoAbs(float x, float y);
@@ -90,21 +90,25 @@ namespace WebCore {
         virtual SVGPathSegList* animatedPathSegList() const;
         virtual SVGPathSegList* animatedNormalizedPathSegList() const;
 
+        virtual void toPathData(Path&) const;
+
+    private:
+        SVGPathElement(const QualifiedName&, Document*);
+
+        virtual bool isValid() const { return SVGTests::isValid(); }
+
         virtual void parseMappedAttribute(Attribute*);
         virtual void svgAttributeChanged(const QualifiedName&);
         virtual void synchronizeProperty(const QualifiedName&);
 
-        virtual Path toPathData() const;
-
         virtual bool supportsMarkers() const { return true; }
 
-    private:
         mutable RefPtr<SVGPathSegList> m_pathSegList;
 
-        DECLARE_ANIMATED_PROPERTY(SVGPathElement, SVGNames::pathLengthAttr, float, PathLength, pathLength)
+        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPathElement, SVGNames::pathLengthAttr, float, PathLength, pathLength)
 
         // SVGExternalResourcesRequired
-        DECLARE_ANIMATED_PROPERTY(SVGPathElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPathElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
     };
 
 } // namespace WebCore