[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

zimmermann at webkit.org zimmermann at webkit.org
Wed Dec 22 17:50:47 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ab0da70c56fbe6ba7637a50ec949fc937cd0717b
Author: zimmermann at webkit.org <zimmermann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 1 12:17:12 2010 +0000

    2010-12-01  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Xan Lopez.
    
            Split DECLARE_ANIMATED_PROPERTY* in DECLARE/DEFINE parts for SVGLength
            https://bugs.webkit.org/show_bug.cgi?id=50316
    
            Introduce DECLARE_ANIMATED_LENGTH / DEFINE_ANIMATED_LENGTH, splitting up the original DECLARE_ANIMATED_PROPERTY_NEW macro
            in a part that goes in the .cpp file and another that remains in the header. This avoids having to include SVGNames.h
            in all SVG*Element files.
    
            No functional changes, thus no new tests.
    
            * svg/SVGAnimatedLength.h:
            * svg/SVGCircleElement.cpp:
            * svg/SVGCircleElement.h:
            (WebCore::SVGCircleElement::isValid):
            * svg/SVGCursorElement.cpp:
            * svg/SVGCursorElement.h:
            (WebCore::SVGCursorElement::isValid):
            * svg/SVGEllipseElement.cpp:
            * svg/SVGEllipseElement.h:
            (WebCore::SVGEllipseElement::isValid):
            * svg/SVGFilterElement.cpp:
            * svg/SVGFilterElement.h:
            * svg/SVGFilterPrimitiveStandardAttributes.cpp:
            * svg/SVGFilterPrimitiveStandardAttributes.h:
            * svg/SVGForeignObjectElement.cpp:
            (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
            * svg/SVGForeignObjectElement.h:
            (WebCore::SVGForeignObjectElement::isValid):
            * svg/SVGImageElement.cpp:
            * svg/SVGImageElement.h:
            (WebCore::SVGImageElement::isValid):
            * svg/SVGLineElement.cpp:
            * svg/SVGLineElement.h:
            (WebCore::SVGLineElement::isValid):
            (WebCore::SVGLineElement::supportsMarkers):
            * svg/SVGLinearGradientElement.cpp:
            * svg/SVGLinearGradientElement.h:
            * svg/SVGMarkerElement.cpp:
            (WebCore::SVGMarkerElement::SVGMarkerElement):
            * svg/SVGMarkerElement.h:
            * svg/SVGMaskElement.cpp:
            * svg/SVGMaskElement.h:
            (WebCore::SVGMaskElement::isValid):
            (WebCore::SVGMaskElement::needsPendingResourceHandling):
            * svg/SVGPatternElement.cpp:
            * svg/SVGPatternElement.h:
            (WebCore::SVGPatternElement::isValid):
            (WebCore::SVGPatternElement::needsPendingResourceHandling):
            * svg/SVGRadialGradientElement.cpp:
            * svg/SVGRadialGradientElement.h:
            * svg/SVGRectElement.cpp:
            * svg/SVGRectElement.h:
            (WebCore::SVGRectElement::isValid):
            * svg/SVGSVGElement.cpp:
            (WebCore::SVGSVGElement::SVGSVGElement):
            * svg/SVGSVGElement.h:
            (WebCore::SVGSVGElement::isValid):
            (WebCore::SVGSVGElement::setContainerSize):
            (WebCore::SVGSVGElement::containerSize):
            (WebCore::SVGSVGElement::hasSetContainerSize):
            (WebCore::SVGSVGElement::currentTranslate):
            (WebCore::SVGSVGElement::timeContainer):
            (WebCore::SVGSVGElement::isSVG):
            (WebCore::SVGSVGElement::rendererIsNeeded):
            * svg/SVGTextContentElement.cpp:
            * svg/SVGTextContentElement.h:
            (WebCore::SVGTextContentElement::isValid):
            (WebCore::SVGTextContentElement::isTextContent):
            * svg/SVGTextPathElement.cpp:
            * svg/SVGTextPathElement.h:
            * svg/SVGTextPositioningElement.h:
            * svg/SVGUseElement.cpp:
            * svg/SVGUseElement.h:
            (WebCore::SVGUseElement::isValid):
            (WebCore::SVGUseElement::setUpdatesBlocked):
            (WebCore::SVGUseElement::isPendingResource):
            * svg/properties/SVGAnimatedPropertyMacros.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73016 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 5267fca..02e8411 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,84 @@
+2010-12-01  Nikolas Zimmermann  <nzimmermann at rim.com>
+
+        Reviewed by Xan Lopez.
+
+        Split DECLARE_ANIMATED_PROPERTY* in DECLARE/DEFINE parts for SVGLength
+        https://bugs.webkit.org/show_bug.cgi?id=50316
+
+        Introduce DECLARE_ANIMATED_LENGTH / DEFINE_ANIMATED_LENGTH, splitting up the original DECLARE_ANIMATED_PROPERTY_NEW macro
+        in a part that goes in the .cpp file and another that remains in the header. This avoids having to include SVGNames.h
+        in all SVG*Element files.
+
+        No functional changes, thus no new tests.
+
+        * svg/SVGAnimatedLength.h:
+        * svg/SVGCircleElement.cpp:
+        * svg/SVGCircleElement.h:
+        (WebCore::SVGCircleElement::isValid):
+        * svg/SVGCursorElement.cpp:
+        * svg/SVGCursorElement.h:
+        (WebCore::SVGCursorElement::isValid):
+        * svg/SVGEllipseElement.cpp:
+        * svg/SVGEllipseElement.h:
+        (WebCore::SVGEllipseElement::isValid):
+        * svg/SVGFilterElement.cpp:
+        * svg/SVGFilterElement.h:
+        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
+        * svg/SVGFilterPrimitiveStandardAttributes.h:
+        * svg/SVGForeignObjectElement.cpp:
+        (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
+        * svg/SVGForeignObjectElement.h:
+        (WebCore::SVGForeignObjectElement::isValid):
+        * svg/SVGImageElement.cpp:
+        * svg/SVGImageElement.h:
+        (WebCore::SVGImageElement::isValid):
+        * svg/SVGLineElement.cpp:
+        * svg/SVGLineElement.h:
+        (WebCore::SVGLineElement::isValid):
+        (WebCore::SVGLineElement::supportsMarkers):
+        * svg/SVGLinearGradientElement.cpp:
+        * svg/SVGLinearGradientElement.h:
+        * svg/SVGMarkerElement.cpp:
+        (WebCore::SVGMarkerElement::SVGMarkerElement):
+        * svg/SVGMarkerElement.h:
+        * svg/SVGMaskElement.cpp:
+        * svg/SVGMaskElement.h:
+        (WebCore::SVGMaskElement::isValid):
+        (WebCore::SVGMaskElement::needsPendingResourceHandling):
+        * svg/SVGPatternElement.cpp:
+        * svg/SVGPatternElement.h:
+        (WebCore::SVGPatternElement::isValid):
+        (WebCore::SVGPatternElement::needsPendingResourceHandling):
+        * svg/SVGRadialGradientElement.cpp:
+        * svg/SVGRadialGradientElement.h:
+        * svg/SVGRectElement.cpp:
+        * svg/SVGRectElement.h:
+        (WebCore::SVGRectElement::isValid):
+        * svg/SVGSVGElement.cpp:
+        (WebCore::SVGSVGElement::SVGSVGElement):
+        * svg/SVGSVGElement.h:
+        (WebCore::SVGSVGElement::isValid):
+        (WebCore::SVGSVGElement::setContainerSize):
+        (WebCore::SVGSVGElement::containerSize):
+        (WebCore::SVGSVGElement::hasSetContainerSize):
+        (WebCore::SVGSVGElement::currentTranslate):
+        (WebCore::SVGSVGElement::timeContainer):
+        (WebCore::SVGSVGElement::isSVG):
+        (WebCore::SVGSVGElement::rendererIsNeeded):
+        * svg/SVGTextContentElement.cpp:
+        * svg/SVGTextContentElement.h:
+        (WebCore::SVGTextContentElement::isValid):
+        (WebCore::SVGTextContentElement::isTextContent):
+        * svg/SVGTextPathElement.cpp:
+        * svg/SVGTextPathElement.h:
+        * svg/SVGTextPositioningElement.h:
+        * svg/SVGUseElement.cpp:
+        * svg/SVGUseElement.h:
+        (WebCore::SVGUseElement::isValid):
+        (WebCore::SVGUseElement::setUpdatesBlocked):
+        (WebCore::SVGUseElement::isPendingResource):
+        * svg/properties/SVGAnimatedPropertyMacros.h:
+
 2010-12-01  Anton D'Auria  <adauria at apple.com>
 
         Reviewed by Kevin Decker.
diff --git a/WebCore/svg/SVGAnimatedLength.h b/WebCore/svg/SVGAnimatedLength.h
index 0504fd7..570b2a0 100644
--- a/WebCore/svg/SVGAnimatedLength.h
+++ b/WebCore/svg/SVGAnimatedLength.h
@@ -28,6 +28,13 @@ namespace WebCore {
 
 typedef SVGAnimatedPropertyTearOff<SVGLength> SVGAnimatedLength;
 
+// Helper macros to declare/define a SVGAnimatedLength object
+#define DECLARE_ANIMATED_LENGTH(UpperProperty, LowerProperty) \
+DECLARE_ANIMATED_PROPERTY(SVGAnimatedLength, SVGLength, UpperProperty, LowerProperty)
+
+#define DEFINE_ANIMATED_LENGTH(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
+DEFINE_ANIMATED_PROPERTY(OwnerType, DOMAttribute, DOMAttribute.localName(), SVGAnimatedLength, SVGLength, UpperProperty, LowerProperty)
+
 } // namespace WebCore
 
 #endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGCircleElement.cpp b/WebCore/svg/SVGCircleElement.cpp
index 2aa34b8..1e6af43 100644
--- a/WebCore/svg/SVGCircleElement.cpp
+++ b/WebCore/svg/SVGCircleElement.cpp
@@ -32,6 +32,11 @@
 
 namespace WebCore {
 
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGCircleElement, SVGNames::cxAttr, Cx, cx)
+DEFINE_ANIMATED_LENGTH(SVGCircleElement, SVGNames::cyAttr, Cy, cy)
+DEFINE_ANIMATED_LENGTH(SVGCircleElement, SVGNames::rAttr, R, r)
+
 inline SVGCircleElement::SVGCircleElement(const QualifiedName& tagName, Document* document)
     : SVGStyledTransformableElement(tagName, document)
     , m_cx(LengthModeWidth)
diff --git a/WebCore/svg/SVGCircleElement.h b/WebCore/svg/SVGCircleElement.h
index 5c3a62f..23d5e79 100644
--- a/WebCore/svg/SVGCircleElement.h
+++ b/WebCore/svg/SVGCircleElement.h
@@ -31,33 +31,34 @@
 
 namespace WebCore {
 
-    class SVGCircleElement : public SVGStyledTransformableElement,
-                             public SVGTests,
-                             public SVGLangSpace,
-                             public SVGExternalResourcesRequired {
-    public:
-        static PassRefPtr<SVGCircleElement> create(const QualifiedName&, Document*);
+class SVGCircleElement : public SVGStyledTransformableElement,
+                         public SVGTests,
+                         public SVGLangSpace,
+                         public SVGExternalResourcesRequired {
+public:
+    static PassRefPtr<SVGCircleElement> create(const QualifiedName&, Document*);
 
-    private:
-        SVGCircleElement(const QualifiedName&, Document*);
+private:
+    SVGCircleElement(const QualifiedName&, Document*);
 
-        virtual bool isValid() const { return SVGTests::isValid(); }
+    virtual bool isValid() const { return SVGTests::isValid(); }
 
-        virtual void parseMappedAttribute(Attribute*);
-        virtual void svgAttributeChanged(const QualifiedName&);
-        virtual void synchronizeProperty(const QualifiedName&);
+    virtual void parseMappedAttribute(Attribute*);
+    virtual void svgAttributeChanged(const QualifiedName&);
+    virtual void synchronizeProperty(const QualifiedName&);
 
-        virtual void toPathData(Path&) const;
+    virtual void toPathData(Path&) const;
 
-        virtual bool selfHasRelativeLengths() const;
+    virtual bool selfHasRelativeLengths() const;
 
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGCircleElement, SVGNames::cxAttr, SVGLength, Cx, cx)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGCircleElement, SVGNames::cyAttr, SVGLength, Cy, cy)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGCircleElement, SVGNames::rAttr, SVGLength, R, r)
+    // Animated property declarations
+    DECLARE_ANIMATED_LENGTH(Cx, cx)
+    DECLARE_ANIMATED_LENGTH(Cy, cy)
+    DECLARE_ANIMATED_LENGTH(R, r)
 
-        // SVGExternalResourcesRequired
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGCircleElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
-    };
+    // SVGExternalResourcesRequired
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGCircleElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGCursorElement.cpp b/WebCore/svg/SVGCursorElement.cpp
index d3d7d86..175478d 100644
--- a/WebCore/svg/SVGCursorElement.cpp
+++ b/WebCore/svg/SVGCursorElement.cpp
@@ -30,6 +30,10 @@
 
 namespace WebCore {
 
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGCursorElement, SVGNames::xAttr, X, x)
+DEFINE_ANIMATED_LENGTH(SVGCursorElement, SVGNames::yAttr, Y, y)
+
 inline SVGCursorElement::SVGCursorElement(const QualifiedName& tagName, Document* document)
     : SVGElement(tagName, document)
     , m_x(LengthModeWidth)
diff --git a/WebCore/svg/SVGCursorElement.h b/WebCore/svg/SVGCursorElement.h
index d3bcb8b..d83fba5 100644
--- a/WebCore/svg/SVGCursorElement.h
+++ b/WebCore/svg/SVGCursorElement.h
@@ -31,40 +31,41 @@
 
 namespace WebCore {
 
-    class SVGCursorElement : public SVGElement,
-                             public SVGTests,
-                             public SVGExternalResourcesRequired,
-                             public SVGURIReference {
-    public:
-        static PassRefPtr<SVGCursorElement> create(const QualifiedName&, Document*);
+class SVGCursorElement : public SVGElement,
+                         public SVGTests,
+                         public SVGExternalResourcesRequired,
+                         public SVGURIReference {
+public:
+    static PassRefPtr<SVGCursorElement> create(const QualifiedName&, Document*);
 
-        virtual ~SVGCursorElement();
+    virtual ~SVGCursorElement();
 
-        void addClient(SVGElement*);
-        void removeClient(SVGElement*);
+    void addClient(SVGElement*);
+    void removeClient(SVGElement*);
 
-    private:
-        SVGCursorElement(const QualifiedName&, Document*);
+private:
+    SVGCursorElement(const QualifiedName&, Document*);
 
-        virtual bool isValid() const { return SVGTests::isValid(); }
+    virtual bool isValid() const { return SVGTests::isValid(); }
 
-        virtual void parseMappedAttribute(Attribute*);
-        virtual void svgAttributeChanged(const QualifiedName&);
-        virtual void synchronizeProperty(const QualifiedName&);
+    virtual void parseMappedAttribute(Attribute*);
+    virtual void svgAttributeChanged(const QualifiedName&);
+    virtual void synchronizeProperty(const QualifiedName&);
 
-        virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
+    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
 
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGCursorElement, SVGNames::xAttr, SVGLength, X, x)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGCursorElement, SVGNames::yAttr, SVGLength, Y, y)
+    // Animated property declarations
+    DECLARE_ANIMATED_LENGTH(X, x)
+    DECLARE_ANIMATED_LENGTH(Y, y)
 
-        // SVGURIReference
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGCursorElement, XLinkNames::hrefAttr, String, Href, href)
+    // SVGURIReference
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGCursorElement, XLinkNames::hrefAttr, String, Href, href)
 
-        // SVGExternalResourcesRequired
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGCursorElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+    // SVGExternalResourcesRequired
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGCursorElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
 
-        HashSet<SVGElement*> m_clients;
-    };
+    HashSet<SVGElement*> m_clients;
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGEllipseElement.cpp b/WebCore/svg/SVGEllipseElement.cpp
index c945a9a..b6ee3f2 100644
--- a/WebCore/svg/SVGEllipseElement.cpp
+++ b/WebCore/svg/SVGEllipseElement.cpp
@@ -32,6 +32,12 @@
 
 namespace WebCore {
 
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGEllipseElement, SVGNames::cxAttr, Cx, cx)
+DEFINE_ANIMATED_LENGTH(SVGEllipseElement, SVGNames::cyAttr, Cy, cy)
+DEFINE_ANIMATED_LENGTH(SVGEllipseElement, SVGNames::rxAttr, Rx, rx)
+DEFINE_ANIMATED_LENGTH(SVGEllipseElement, SVGNames::ryAttr, Ry, ry)
+
 inline SVGEllipseElement::SVGEllipseElement(const QualifiedName& tagName, Document* document)
     : SVGStyledTransformableElement(tagName, document)
     , m_cx(LengthModeWidth)
diff --git a/WebCore/svg/SVGEllipseElement.h b/WebCore/svg/SVGEllipseElement.h
index 3bd7a50..17412af 100644
--- a/WebCore/svg/SVGEllipseElement.h
+++ b/WebCore/svg/SVGEllipseElement.h
@@ -31,34 +31,35 @@
 
 namespace WebCore {
 
-    class SVGEllipseElement : public SVGStyledTransformableElement,
-                              public SVGTests,
-                              public SVGLangSpace,
-                              public SVGExternalResourcesRequired {
-    public:
-        static PassRefPtr<SVGEllipseElement> create(const QualifiedName&, Document*);
+class SVGEllipseElement : public SVGStyledTransformableElement,
+                          public SVGTests,
+                          public SVGLangSpace,
+                          public SVGExternalResourcesRequired {
+public:
+    static PassRefPtr<SVGEllipseElement> create(const QualifiedName&, Document*);
 
-    private:
-        SVGEllipseElement(const QualifiedName&, Document*);
-        
-        virtual bool isValid() const { return SVGTests::isValid(); }
+private:
+    SVGEllipseElement(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 void parseMappedAttribute(Attribute*);
+    virtual void svgAttributeChanged(const QualifiedName&);
+    virtual void synchronizeProperty(const QualifiedName&);
 
-        virtual void toPathData(Path&) const;
+    virtual void toPathData(Path&) const;
 
-        virtual bool selfHasRelativeLengths() const;
+    virtual bool selfHasRelativeLengths() const;
 
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGEllipseElement, SVGNames::cxAttr, SVGLength, Cx, cx)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGEllipseElement, SVGNames::cyAttr, SVGLength, Cy, cy)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGEllipseElement, SVGNames::rxAttr, SVGLength, Rx, rx)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGEllipseElement, SVGNames::ryAttr, SVGLength, Ry, ry)
+    // Animated property declarations
+    DECLARE_ANIMATED_LENGTH(Cx, cx)
+    DECLARE_ANIMATED_LENGTH(Cy, cy)
+    DECLARE_ANIMATED_LENGTH(Rx, rx)
+    DECLARE_ANIMATED_LENGTH(Ry, ry)
 
-        // SVGExternalResourcesRequired
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGEllipseElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
-    };
+    // SVGExternalResourcesRequired
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGEllipseElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGFilterElement.cpp b/WebCore/svg/SVGFilterElement.cpp
index 323dd4c..3e370e5 100644
--- a/WebCore/svg/SVGFilterElement.cpp
+++ b/WebCore/svg/SVGFilterElement.cpp
@@ -39,6 +39,12 @@
 
 namespace WebCore {
 
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGFilterElement, SVGNames::xAttr, X, x)
+DEFINE_ANIMATED_LENGTH(SVGFilterElement, SVGNames::yAttr, Y, y)
+DEFINE_ANIMATED_LENGTH(SVGFilterElement, SVGNames::widthAttr, Width, width)
+DEFINE_ANIMATED_LENGTH(SVGFilterElement, SVGNames::heightAttr, Height, height)
+
 inline SVGFilterElement::SVGFilterElement(const QualifiedName& tagName, Document* document)
     : SVGStyledElement(tagName, document)
     , SVGURIReference()
diff --git a/WebCore/svg/SVGFilterElement.h b/WebCore/svg/SVGFilterElement.h
index 4efb958..deda48a 100644
--- a/WebCore/svg/SVGFilterElement.h
+++ b/WebCore/svg/SVGFilterElement.h
@@ -61,12 +61,13 @@ private:
     static const AtomicString& filterResXIdentifier();
     static const AtomicString& filterResYIdentifier();
 
+    // Animated property declarations
     DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFilterElement, SVGNames::filterUnitsAttr, int, FilterUnits, filterUnits)
     DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFilterElement, SVGNames::primitiveUnitsAttr, int, PrimitiveUnits, primitiveUnits)
-    DECLARE_ANIMATED_PROPERTY_NEW(SVGFilterElement, SVGNames::xAttr, SVGLength, X, x)
-    DECLARE_ANIMATED_PROPERTY_NEW(SVGFilterElement, SVGNames::yAttr, SVGLength, Y, y)
-    DECLARE_ANIMATED_PROPERTY_NEW(SVGFilterElement, SVGNames::widthAttr, SVGLength, Width, width)
-    DECLARE_ANIMATED_PROPERTY_NEW(SVGFilterElement, SVGNames::heightAttr, SVGLength, Height, height)
+    DECLARE_ANIMATED_LENGTH(X, x)
+    DECLARE_ANIMATED_LENGTH(Y, y)
+    DECLARE_ANIMATED_LENGTH(Width, width)
+    DECLARE_ANIMATED_LENGTH(Height, height)
 
     DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFilterElement, SVGNames::filterResAttr, filterResXIdentifier(), long, FilterResX, filterResX)
     DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFilterElement, SVGNames::filterResAttr, filterResYIdentifier(), long, FilterResY, filterResY)
diff --git a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
index c2c443e..e612319 100644
--- a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
+++ b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
@@ -34,6 +34,12 @@
 
 namespace WebCore {
 
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGFilterPrimitiveStandardAttributes, SVGNames::xAttr, X, x)
+DEFINE_ANIMATED_LENGTH(SVGFilterPrimitiveStandardAttributes, SVGNames::yAttr, Y, y)
+DEFINE_ANIMATED_LENGTH(SVGFilterPrimitiveStandardAttributes, SVGNames::widthAttr, Width, width)
+DEFINE_ANIMATED_LENGTH(SVGFilterPrimitiveStandardAttributes, SVGNames::heightAttr, Height, height)
+
 SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes(const QualifiedName& tagName, Document* document)
     : SVGStyledElement(tagName, document)
     , m_x(LengthModeWidth, "0%")
diff --git a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
index d7abc7f..2fb2dc1 100644
--- a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
+++ b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
@@ -62,10 +62,11 @@ private:
 
     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
 
-    DECLARE_ANIMATED_PROPERTY_NEW(SVGFilterPrimitiveStandardAttributes, SVGNames::xAttr, SVGLength, X, x)
-    DECLARE_ANIMATED_PROPERTY_NEW(SVGFilterPrimitiveStandardAttributes, SVGNames::yAttr, SVGLength, Y, y)
-    DECLARE_ANIMATED_PROPERTY_NEW(SVGFilterPrimitiveStandardAttributes, SVGNames::widthAttr, SVGLength, Width, width)
-    DECLARE_ANIMATED_PROPERTY_NEW(SVGFilterPrimitiveStandardAttributes, SVGNames::heightAttr, SVGLength, Height, height)
+    // Animated property declarations
+    DECLARE_ANIMATED_LENGTH(X, x)
+    DECLARE_ANIMATED_LENGTH(Y, y)
+    DECLARE_ANIMATED_LENGTH(Width, width)
+    DECLARE_ANIMATED_LENGTH(Height, height)
     DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFilterPrimitiveStandardAttributes, SVGNames::resultAttr, String, Result, result)
 };
 
diff --git a/WebCore/svg/SVGForeignObjectElement.cpp b/WebCore/svg/SVGForeignObjectElement.cpp
index 78063fc..c620910 100644
--- a/WebCore/svg/SVGForeignObjectElement.cpp
+++ b/WebCore/svg/SVGForeignObjectElement.cpp
@@ -33,7 +33,13 @@
 
 namespace WebCore {
 
-SVGForeignObjectElement::SVGForeignObjectElement(const QualifiedName& tagName, Document* document)
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGForeignObjectElement, SVGNames::xAttr, X, x)
+DEFINE_ANIMATED_LENGTH(SVGForeignObjectElement, SVGNames::yAttr, Y, y)
+DEFINE_ANIMATED_LENGTH(SVGForeignObjectElement, SVGNames::widthAttr, Width, width)
+DEFINE_ANIMATED_LENGTH(SVGForeignObjectElement, SVGNames::heightAttr, Height, height)
+
+inline SVGForeignObjectElement::SVGForeignObjectElement(const QualifiedName& tagName, Document* document)
     : SVGStyledTransformableElement(tagName, document)
     , m_x(LengthModeWidth)
     , m_y(LengthModeHeight)
diff --git a/WebCore/svg/SVGForeignObjectElement.h b/WebCore/svg/SVGForeignObjectElement.h
index ee17c19..925f181 100644
--- a/WebCore/svg/SVGForeignObjectElement.h
+++ b/WebCore/svg/SVGForeignObjectElement.h
@@ -30,39 +30,39 @@
 #include "SVGExternalResourcesRequired.h"
 
 namespace WebCore {
-    class SVGLength;
 
-    class SVGForeignObjectElement : public SVGStyledTransformableElement,
-                                    public SVGTests,
-                                    public SVGLangSpace,
-                                    public SVGExternalResourcesRequired {
-    public:
-        static PassRefPtr<SVGForeignObjectElement> create(const QualifiedName&, Document*);
+class SVGForeignObjectElement : public SVGStyledTransformableElement,
+                                public SVGTests,
+                                public SVGLangSpace,
+                                public SVGExternalResourcesRequired {
+public:
+    static PassRefPtr<SVGForeignObjectElement> create(const QualifiedName&, Document*);
 
-    private:
-        SVGForeignObjectElement(const QualifiedName&, Document*);
+private:
+    SVGForeignObjectElement(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 bool isValid() const { return SVGTests::isValid(); }
+    virtual void parseMappedAttribute(Attribute*);
+    virtual void svgAttributeChanged(const QualifiedName&);
+    virtual void synchronizeProperty(const QualifiedName&);
 
-        virtual bool childShouldCreateRenderer(Node*) const;
-        virtual RenderObject* createRenderer(RenderArena* arena, RenderStyle* style);
+    virtual bool childShouldCreateRenderer(Node*) const;
+    virtual RenderObject* createRenderer(RenderArena* arena, RenderStyle* style);
 
-        virtual bool selfHasRelativeLengths() const;
+    virtual bool selfHasRelativeLengths() const;
 
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGForeignObjectElement, SVGNames::xAttr, SVGLength, X, x)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGForeignObjectElement, SVGNames::yAttr, SVGLength, Y, y)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGForeignObjectElement, SVGNames::widthAttr, SVGLength, Width, width)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGForeignObjectElement, SVGNames::heightAttr, SVGLength, Height, height)
+    // Animated property declarations
+    DECLARE_ANIMATED_LENGTH(X, x)
+    DECLARE_ANIMATED_LENGTH(Y, y)
+    DECLARE_ANIMATED_LENGTH(Width, width)
+    DECLARE_ANIMATED_LENGTH(Height, height)
 
-        // SVGURIReference
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGForeignObjectElement, XLinkNames::hrefAttr, String, Href, href)
+    // SVGURIReference
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGForeignObjectElement, XLinkNames::hrefAttr, String, Href, href)
 
-        // SVGExternalResourcesRequired
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGForeignObjectElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
-    };
+    // SVGExternalResourcesRequired
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGForeignObjectElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGImageElement.cpp b/WebCore/svg/SVGImageElement.cpp
index dd80c65..f86e90c 100644
--- a/WebCore/svg/SVGImageElement.cpp
+++ b/WebCore/svg/SVGImageElement.cpp
@@ -37,6 +37,12 @@
 
 namespace WebCore {
 
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGImageElement, SVGNames::xAttr, X, x)
+DEFINE_ANIMATED_LENGTH(SVGImageElement, SVGNames::yAttr, Y, y)
+DEFINE_ANIMATED_LENGTH(SVGImageElement, SVGNames::widthAttr, Width, width)
+DEFINE_ANIMATED_LENGTH(SVGImageElement, SVGNames::heightAttr, Height, height)
+
 inline SVGImageElement::SVGImageElement(const QualifiedName& tagName, Document* document)
     : SVGStyledTransformableElement(tagName, document)
     , m_x(LengthModeWidth)
diff --git a/WebCore/svg/SVGImageElement.h b/WebCore/svg/SVGImageElement.h
index b9f3865..af4d84e 100644
--- a/WebCore/svg/SVGImageElement.h
+++ b/WebCore/svg/SVGImageElement.h
@@ -34,52 +34,51 @@
 
 namespace WebCore {
 
-    class SVGLength;
-
-    class SVGImageElement : public SVGStyledTransformableElement,
-                            public SVGTests,
-                            public SVGLangSpace,
-                            public SVGExternalResourcesRequired,
-                            public SVGURIReference {
-    public:
-        static PassRefPtr<SVGImageElement> create(const QualifiedName&, Document*);
-
-    private:
-        SVGImageElement(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 void attach();
-        virtual void insertedIntoDocument();
-
-        virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+class SVGImageElement : public SVGStyledTransformableElement,
+                        public SVGTests,
+                        public SVGLangSpace,
+                        public SVGExternalResourcesRequired,
+                        public SVGURIReference {
+public:
+    static PassRefPtr<SVGImageElement> create(const QualifiedName&, Document*);
+
+private:
+    SVGImageElement(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 void attach();
+    virtual void insertedIntoDocument();
+
+    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
  
-        virtual const QualifiedName& imageSourceAttributeName() const;       
-        virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
+    virtual const QualifiedName& imageSourceAttributeName() const;       
+    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
 
-        virtual bool haveLoadedRequiredResources();
+    virtual bool haveLoadedRequiredResources();
 
-        virtual bool selfHasRelativeLengths() const;
-        virtual void willMoveToNewOwnerDocument();
+    virtual bool selfHasRelativeLengths() const;
+    virtual void willMoveToNewOwnerDocument();
 
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGImageElement, SVGNames::xAttr, SVGLength, X, x)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGImageElement, SVGNames::yAttr, SVGLength, Y, y)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGImageElement, SVGNames::widthAttr, SVGLength, Width, width)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGImageElement, SVGNames::heightAttr, SVGLength, Height, height)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGImageElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
+    // Animated property declarations
+    DECLARE_ANIMATED_LENGTH(X, x)
+    DECLARE_ANIMATED_LENGTH(Y, y)
+    DECLARE_ANIMATED_LENGTH(Width, width)
+    DECLARE_ANIMATED_LENGTH(Height, height)
+    DECLARE_ANIMATED_PROPERTY_NEW(SVGImageElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
 
-        // SVGURIReference
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGImageElement, XLinkNames::hrefAttr, String, Href, href)
+    // SVGURIReference
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGImageElement, XLinkNames::hrefAttr, String, Href, href)
 
-        // SVGExternalResourcesRequired
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGImageElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+    // SVGExternalResourcesRequired
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGImageElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
 
-        SVGImageLoader m_imageLoader;
-    };
+    SVGImageLoader m_imageLoader;
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGLineElement.cpp b/WebCore/svg/SVGLineElement.cpp
index e4986a2..2758b77 100644
--- a/WebCore/svg/SVGLineElement.cpp
+++ b/WebCore/svg/SVGLineElement.cpp
@@ -32,6 +32,12 @@
 
 namespace WebCore {
 
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGLineElement, SVGNames::x1Attr, X1, x1)
+DEFINE_ANIMATED_LENGTH(SVGLineElement, SVGNames::y1Attr, Y1, y1)
+DEFINE_ANIMATED_LENGTH(SVGLineElement, SVGNames::x2Attr, X2, x2)
+DEFINE_ANIMATED_LENGTH(SVGLineElement, SVGNames::y2Attr, Y2, y2)
+
 inline SVGLineElement::SVGLineElement(const QualifiedName& tagName, Document* document)
     : SVGStyledTransformableElement(tagName, document)
     , m_x1(LengthModeWidth)
diff --git a/WebCore/svg/SVGLineElement.h b/WebCore/svg/SVGLineElement.h
index 4e876e1..614675f 100644
--- a/WebCore/svg/SVGLineElement.h
+++ b/WebCore/svg/SVGLineElement.h
@@ -31,38 +31,37 @@
 
 namespace WebCore {
 
-    class SVGLength;
+class SVGLineElement : public SVGStyledTransformableElement,
+                       public SVGTests,
+                       public SVGLangSpace,
+                       public SVGExternalResourcesRequired {
+public:
+    static PassRefPtr<SVGLineElement> create(const QualifiedName&, Document*);
 
-    class SVGLineElement : public SVGStyledTransformableElement,
-                           public SVGTests,
-                           public SVGLangSpace,
-                           public SVGExternalResourcesRequired {
-    public:
-        static PassRefPtr<SVGLineElement> create(const QualifiedName&, Document*);
+private:
+    SVGLineElement(const QualifiedName&, Document*);
+    
+    virtual bool isValid() const { return SVGTests::isValid(); }
 
-    private:
-        SVGLineElement(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 void parseMappedAttribute(Attribute*);
-        virtual void svgAttributeChanged(const QualifiedName&);
-        virtual void synchronizeProperty(const QualifiedName&);
+    virtual void toPathData(Path&) const;
 
-        virtual void toPathData(Path&) const;
+    virtual bool supportsMarkers() const { return true; }
 
-        virtual bool supportsMarkers() const { return true; }
+    virtual bool selfHasRelativeLengths() const;
 
-        virtual bool selfHasRelativeLengths() const;
+    // Animated property declarations
+    DECLARE_ANIMATED_LENGTH(X1, x1)
+    DECLARE_ANIMATED_LENGTH(Y1, y1)
+    DECLARE_ANIMATED_LENGTH(X2, x2)
+    DECLARE_ANIMATED_LENGTH(Y2, y2)
 
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGLineElement, SVGNames::x1Attr, SVGLength, X1, x1)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGLineElement, SVGNames::y1Attr, SVGLength, Y1, y1)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGLineElement, SVGNames::x2Attr, SVGLength, X2, x2)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGLineElement, SVGNames::y2Attr, SVGLength, Y2, y2)
-
-        // SVGExternalResourcesRequired
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGLineElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
-    };
+    // SVGExternalResourcesRequired
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGLineElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGLinearGradientElement.cpp b/WebCore/svg/SVGLinearGradientElement.cpp
index fa3e40c..5bece06 100644
--- a/WebCore/svg/SVGLinearGradientElement.cpp
+++ b/WebCore/svg/SVGLinearGradientElement.cpp
@@ -39,6 +39,12 @@
 
 namespace WebCore {
 
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGLinearGradientElement, SVGNames::x1Attr, X1, x1)
+DEFINE_ANIMATED_LENGTH(SVGLinearGradientElement, SVGNames::y1Attr, Y1, y1)
+DEFINE_ANIMATED_LENGTH(SVGLinearGradientElement, SVGNames::x2Attr, X2, x2)
+DEFINE_ANIMATED_LENGTH(SVGLinearGradientElement, SVGNames::y2Attr, Y2, y2)
+
 inline SVGLinearGradientElement::SVGLinearGradientElement(const QualifiedName& tagName, Document* document)
     : SVGGradientElement(tagName, document)
     , m_x1(LengthModeWidth)
diff --git a/WebCore/svg/SVGLinearGradientElement.h b/WebCore/svg/SVGLinearGradientElement.h
index 4ebe9f6..6cf4e0c 100644
--- a/WebCore/svg/SVGLinearGradientElement.h
+++ b/WebCore/svg/SVGLinearGradientElement.h
@@ -28,32 +28,32 @@
 
 namespace WebCore {
 
-    struct LinearGradientAttributes;
-    class SVGLength;
+struct LinearGradientAttributes;
 
-    class SVGLinearGradientElement : public SVGGradientElement {
-    public:
-        static PassRefPtr<SVGLinearGradientElement> create(const QualifiedName&, Document*);
+class SVGLinearGradientElement : public SVGGradientElement {
+public:
+    static PassRefPtr<SVGLinearGradientElement> create(const QualifiedName&, Document*);
 
-        void collectGradientAttributes(LinearGradientAttributes&);
-        void calculateStartEndPoints(const LinearGradientAttributes&, FloatPoint& startPoint, FloatPoint& endPoint);
+    void collectGradientAttributes(LinearGradientAttributes&);
+    void calculateStartEndPoints(const LinearGradientAttributes&, FloatPoint& startPoint, FloatPoint& endPoint);
 
-    private:
-        SVGLinearGradientElement(const QualifiedName&, Document*);
+private:
+    SVGLinearGradientElement(const QualifiedName&, Document*);
 
-        virtual void parseMappedAttribute(Attribute*);
-        virtual void svgAttributeChanged(const QualifiedName&);
-        virtual void synchronizeProperty(const QualifiedName&);
+    virtual void parseMappedAttribute(Attribute*);
+    virtual void svgAttributeChanged(const QualifiedName&);
+    virtual void synchronizeProperty(const QualifiedName&);
 
-        virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
 
-        virtual bool selfHasRelativeLengths() const;
+    virtual bool selfHasRelativeLengths() const;
 
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGLinearGradientElement, SVGNames::x1Attr, SVGLength, X1, x1)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGLinearGradientElement, SVGNames::y1Attr, SVGLength, Y1, y1)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGLinearGradientElement, SVGNames::x2Attr, SVGLength, X2, x2)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGLinearGradientElement, SVGNames::y2Attr, SVGLength, Y2, y2)
-    };
+    // Animated property declarations
+    DECLARE_ANIMATED_LENGTH(X1, x1)
+    DECLARE_ANIMATED_LENGTH(Y1, y1)
+    DECLARE_ANIMATED_LENGTH(X2, x2)
+    DECLARE_ANIMATED_LENGTH(Y2, y2)
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGMarkerElement.cpp b/WebCore/svg/SVGMarkerElement.cpp
index 8b6d41c..169afec 100644
--- a/WebCore/svg/SVGMarkerElement.cpp
+++ b/WebCore/svg/SVGMarkerElement.cpp
@@ -35,7 +35,13 @@
 
 namespace WebCore {
 
-SVGMarkerElement::SVGMarkerElement(const QualifiedName& tagName, Document* document)
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGMarkerElement, SVGNames::refXAttr, RefX, refX)
+DEFINE_ANIMATED_LENGTH(SVGMarkerElement, SVGNames::refYAttr, RefY, refY)
+DEFINE_ANIMATED_LENGTH(SVGMarkerElement, SVGNames::markerWidthAttr, MarkerWidth, markerWidth)
+DEFINE_ANIMATED_LENGTH(SVGMarkerElement, SVGNames::markerHeightAttr, MarkerHeight, markerHeight)
+
+inline SVGMarkerElement::SVGMarkerElement(const QualifiedName& tagName, Document* document)
     : SVGStyledElement(tagName, document)
     , m_refX(LengthModeWidth)
     , m_refY(LengthModeHeight)
diff --git a/WebCore/svg/SVGMarkerElement.h b/WebCore/svg/SVGMarkerElement.h
index 8d54e35..9061083 100644
--- a/WebCore/svg/SVGMarkerElement.h
+++ b/WebCore/svg/SVGMarkerElement.h
@@ -78,10 +78,11 @@ private:
     static const AtomicString& orientTypeIdentifier();
     static const AtomicString& orientAngleIdentifier();
 
-    DECLARE_ANIMATED_PROPERTY_NEW(SVGMarkerElement, SVGNames::refXAttr, SVGLength, RefX, refX)
-    DECLARE_ANIMATED_PROPERTY_NEW(SVGMarkerElement, SVGNames::refYAttr, SVGLength, RefY, refY)
-    DECLARE_ANIMATED_PROPERTY_NEW(SVGMarkerElement, SVGNames::markerWidthAttr, SVGLength, MarkerWidth, markerWidth)
-    DECLARE_ANIMATED_PROPERTY_NEW(SVGMarkerElement, SVGNames::markerHeightAttr, SVGLength, MarkerHeight, markerHeight)
+    // Animated property declarations
+    DECLARE_ANIMATED_LENGTH(RefX, refX)
+    DECLARE_ANIMATED_LENGTH(RefY, refY)
+    DECLARE_ANIMATED_LENGTH(MarkerWidth, markerWidth)
+    DECLARE_ANIMATED_LENGTH(MarkerHeight, markerHeight)
     DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGMarkerElement, SVGNames::markerUnitsAttr, int, MarkerUnits, markerUnits)
     DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGMarkerElement, SVGNames::orientAttr, orientTypeIdentifier(), int, OrientType, orientType)
     DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGMarkerElement, SVGNames::orientAttr, orientAngleIdentifier(), SVGAngle, OrientAngle, orientAngle)
diff --git a/WebCore/svg/SVGMaskElement.cpp b/WebCore/svg/SVGMaskElement.cpp
index dda8924..9bf38ce 100644
--- a/WebCore/svg/SVGMaskElement.cpp
+++ b/WebCore/svg/SVGMaskElement.cpp
@@ -29,15 +29,18 @@
 #include "Attribute.h"
 #include "CSSStyleSelector.h"
 #include "RenderSVGResourceMasker.h"
-#include "SVGLength.h"
 #include "SVGNames.h"
 #include "SVGRenderSupport.h"
 #include "SVGUnitTypes.h"
 
-using namespace std;
-
 namespace WebCore {
 
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGMaskElement, SVGNames::xAttr, X, x)
+DEFINE_ANIMATED_LENGTH(SVGMaskElement, SVGNames::yAttr, Y, y)
+DEFINE_ANIMATED_LENGTH(SVGMaskElement, SVGNames::widthAttr, Width, width)
+DEFINE_ANIMATED_LENGTH(SVGMaskElement, SVGNames::heightAttr, Height, height)
+
 inline SVGMaskElement::SVGMaskElement(const QualifiedName& tagName, Document* document)
     : SVGStyledLocatableElement(tagName, document)
     , m_maskUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
diff --git a/WebCore/svg/SVGMaskElement.h b/WebCore/svg/SVGMaskElement.h
index 599d184..f8c9727 100644
--- a/WebCore/svg/SVGMaskElement.h
+++ b/WebCore/svg/SVGMaskElement.h
@@ -31,42 +31,41 @@
 
 namespace WebCore {
 
-    class SVGLength;
+class SVGMaskElement : public SVGStyledLocatableElement,
+                       public SVGTests,
+                       public SVGLangSpace,
+                       public SVGExternalResourcesRequired {
+public:
+    static PassRefPtr<SVGMaskElement> create(const QualifiedName&, Document*);
 
-    class SVGMaskElement : public SVGStyledLocatableElement,
-                           public SVGTests,
-                           public SVGLangSpace,
-                           public SVGExternalResourcesRequired {
-    public:
-        static PassRefPtr<SVGMaskElement> create(const QualifiedName&, Document*);
+    FloatRect maskBoundingBox(const FloatRect&) const;
 
-        FloatRect maskBoundingBox(const FloatRect&) const;
+private:
+    SVGMaskElement(const QualifiedName&, Document*);
 
-    private:
-        SVGMaskElement(const QualifiedName&, Document*);
+    virtual bool isValid() const { return SVGTests::isValid(); }
+    virtual bool needsPendingResourceHandling() const { return false; }
 
-        virtual bool isValid() const { return SVGTests::isValid(); }
-        virtual bool needsPendingResourceHandling() const { return false; }
+    virtual void parseMappedAttribute(Attribute*);
+    virtual void svgAttributeChanged(const QualifiedName&);
+    virtual void synchronizeProperty(const QualifiedName&);
+    virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
 
-        virtual void parseMappedAttribute(Attribute*);
-        virtual void svgAttributeChanged(const QualifiedName&);
-        virtual void synchronizeProperty(const QualifiedName&);
-        virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
 
-        virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+    virtual bool selfHasRelativeLengths() const;
 
-        virtual bool selfHasRelativeLengths() const;
+    // Animated property declarations
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGMaskElement, SVGNames::maskUnitsAttr, int, MaskUnits, maskUnits)
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGMaskElement, SVGNames::maskContentUnitsAttr, int, MaskContentUnits, maskContentUnits)
+    DECLARE_ANIMATED_LENGTH(X, x)
+    DECLARE_ANIMATED_LENGTH(Y, y)
+    DECLARE_ANIMATED_LENGTH(Width, width)
+    DECLARE_ANIMATED_LENGTH(Height, height)
 
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGMaskElement, SVGNames::maskUnitsAttr, int, MaskUnits, maskUnits)
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGMaskElement, SVGNames::maskContentUnitsAttr, int, MaskContentUnits, maskContentUnits)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGMaskElement, SVGNames::xAttr, SVGLength, X, x)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGMaskElement, SVGNames::yAttr, SVGLength, Y, y)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGMaskElement, SVGNames::widthAttr, SVGLength, Width, width)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGMaskElement, SVGNames::heightAttr, SVGLength, Height, height)
-
-        // SVGExternalResourcesRequired
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGMaskElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
-    };
+    // SVGExternalResourcesRequired
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGMaskElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+};
 
 }
 
diff --git a/WebCore/svg/SVGPatternElement.cpp b/WebCore/svg/SVGPatternElement.cpp
index ed2e354..fa8dd1c 100644
--- a/WebCore/svg/SVGPatternElement.cpp
+++ b/WebCore/svg/SVGPatternElement.cpp
@@ -33,7 +33,6 @@
 #include "PatternAttributes.h"
 #include "RenderSVGContainer.h"
 #include "RenderSVGResourcePattern.h"
-#include "SVGLength.h"
 #include "SVGNames.h"
 #include "SVGRenderSupport.h"
 #include "SVGSVGElement.h"
@@ -41,14 +40,15 @@
 #include "SVGTransformList.h"
 #include "SVGTransformable.h"
 #include "SVGUnitTypes.h"
-#include <math.h>
-#include <wtf/MathExtras.h>
-#include <wtf/OwnPtr.h>
-
-using namespace std;
 
 namespace WebCore {
 
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGPatternElement, SVGNames::xAttr, X, x)
+DEFINE_ANIMATED_LENGTH(SVGPatternElement, SVGNames::yAttr, Y, y)
+DEFINE_ANIMATED_LENGTH(SVGPatternElement, SVGNames::widthAttr, Width, width)
+DEFINE_ANIMATED_LENGTH(SVGPatternElement, SVGNames::heightAttr, Height, height)
+
 inline SVGPatternElement::SVGPatternElement(const QualifiedName& tagName, Document* document)
     : SVGStyledElement(tagName, document)
     , m_x(LengthModeWidth)
diff --git a/WebCore/svg/SVGPatternElement.h b/WebCore/svg/SVGPatternElement.h
index e9d556f..243d58b 100644
--- a/WebCore/svg/SVGPatternElement.h
+++ b/WebCore/svg/SVGPatternElement.h
@@ -37,54 +37,53 @@
 
 namespace WebCore {
 
-    struct PatternAttributes;
+struct PatternAttributes;
  
-    class SVGLength;
-
-    class SVGPatternElement : public SVGStyledElement,
-                              public SVGURIReference,
-                              public SVGTests,
-                              public SVGLangSpace,
-                              public SVGExternalResourcesRequired,
-                              public SVGFitToViewBox {
-    public:
-        static PassRefPtr<SVGPatternElement> create(const QualifiedName&, Document*);
-
-        void collectPatternAttributes(PatternAttributes&) const;
-
-    private:
-        SVGPatternElement(const QualifiedName&, Document*);
-        
-        virtual bool isValid() const { return SVGTests::isValid(); }
-        virtual bool needsPendingResourceHandling() const { return false; }
-
-        virtual void parseMappedAttribute(Attribute*);
-        virtual void svgAttributeChanged(const QualifiedName&);
-        virtual void synchronizeProperty(const QualifiedName&);
-        virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
-
-        virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
-
-        virtual bool selfHasRelativeLengths() const;
-
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGPatternElement, SVGNames::xAttr, SVGLength, X, x)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGPatternElement, SVGNames::yAttr, SVGLength, Y, y)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGPatternElement, SVGNames::widthAttr, SVGLength, Width, width)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGPatternElement, SVGNames::heightAttr, SVGLength, Height, height)
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPatternElement, SVGNames::patternUnitsAttr, int, PatternUnits, patternUnits)
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPatternElement, SVGNames::patternContentUnitsAttr, int, PatternContentUnits, patternContentUnits)
-        DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY_NEW(SVGPatternElement, SVGNames::patternTransformAttr, SVGTransformList, PatternTransform, patternTransform)
-
-        // SVGURIReference
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPatternElement, XLinkNames::hrefAttr, String, Href, href)
-
-        // SVGExternalResourcesRequired
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPatternElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
-
-        // SVGPatternElement
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGPatternElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGPatternElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio) 
-    };
+class SVGPatternElement : public SVGStyledElement,
+                          public SVGURIReference,
+                          public SVGTests,
+                          public SVGLangSpace,
+                          public SVGExternalResourcesRequired,
+                          public SVGFitToViewBox {
+public:
+    static PassRefPtr<SVGPatternElement> create(const QualifiedName&, Document*);
+
+    void collectPatternAttributes(PatternAttributes&) const;
+
+private:
+    SVGPatternElement(const QualifiedName&, Document*);
+    
+    virtual bool isValid() const { return SVGTests::isValid(); }
+    virtual bool needsPendingResourceHandling() const { return false; }
+
+    virtual void parseMappedAttribute(Attribute*);
+    virtual void svgAttributeChanged(const QualifiedName&);
+    virtual void synchronizeProperty(const QualifiedName&);
+    virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+
+    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+
+    virtual bool selfHasRelativeLengths() const;
+
+    // Animated property declarations
+    DECLARE_ANIMATED_LENGTH(X, x)
+    DECLARE_ANIMATED_LENGTH(Y, y)
+    DECLARE_ANIMATED_LENGTH(Width, width)
+    DECLARE_ANIMATED_LENGTH(Height, height)
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPatternElement, SVGNames::patternUnitsAttr, int, PatternUnits, patternUnits)
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPatternElement, SVGNames::patternContentUnitsAttr, int, PatternContentUnits, patternContentUnits)
+    DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY_NEW(SVGPatternElement, SVGNames::patternTransformAttr, SVGTransformList, PatternTransform, patternTransform)
+
+    // SVGURIReference
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPatternElement, XLinkNames::hrefAttr, String, Href, href)
+
+    // SVGExternalResourcesRequired
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPatternElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+
+    // SVGPatternElement
+    DECLARE_ANIMATED_PROPERTY_NEW(SVGPatternElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
+    DECLARE_ANIMATED_PROPERTY_NEW(SVGPatternElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio) 
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGRadialGradientElement.cpp b/WebCore/svg/SVGRadialGradientElement.cpp
index aaf32bc..d525531 100644
--- a/WebCore/svg/SVGRadialGradientElement.cpp
+++ b/WebCore/svg/SVGRadialGradientElement.cpp
@@ -31,7 +31,6 @@
 #include "FloatPoint.h"
 #include "RadialGradientAttributes.h"
 #include "RenderSVGResourceRadialGradient.h"
-#include "SVGLength.h"
 #include "SVGNames.h"
 #include "SVGStopElement.h"
 #include "SVGTransform.h"
@@ -40,6 +39,13 @@
 
 namespace WebCore {
 
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGRadialGradientElement, SVGNames::cxAttr, Cx, cx)
+DEFINE_ANIMATED_LENGTH(SVGRadialGradientElement, SVGNames::cyAttr, Cy, cy)
+DEFINE_ANIMATED_LENGTH(SVGRadialGradientElement, SVGNames::rAttr, R, r)
+DEFINE_ANIMATED_LENGTH(SVGRadialGradientElement, SVGNames::fxAttr, Fx, fx)
+DEFINE_ANIMATED_LENGTH(SVGRadialGradientElement, SVGNames::fyAttr, Fy, fy)
+
 inline SVGRadialGradientElement::SVGRadialGradientElement(const QualifiedName& tagName, Document* document)
     : SVGGradientElement(tagName, document)
     , m_cx(LengthModeWidth, "50%")
diff --git a/WebCore/svg/SVGRadialGradientElement.h b/WebCore/svg/SVGRadialGradientElement.h
index f223514..52f5498 100644
--- a/WebCore/svg/SVGRadialGradientElement.h
+++ b/WebCore/svg/SVGRadialGradientElement.h
@@ -28,33 +28,33 @@
 
 namespace WebCore {
 
-    struct RadialGradientAttributes;
-    class SVGLength;
+struct RadialGradientAttributes;
 
-    class SVGRadialGradientElement : public SVGGradientElement {
-    public:
-        static PassRefPtr<SVGRadialGradientElement> create(const QualifiedName&, Document*);
+class SVGRadialGradientElement : public SVGGradientElement {
+public:
+    static PassRefPtr<SVGRadialGradientElement> create(const QualifiedName&, Document*);
 
-        void collectGradientAttributes(RadialGradientAttributes&);
-        void calculateFocalCenterPointsAndRadius(const RadialGradientAttributes&, FloatPoint& focalPoint, FloatPoint& centerPoint, float& radius);
+    void collectGradientAttributes(RadialGradientAttributes&);
+    void calculateFocalCenterPointsAndRadius(const RadialGradientAttributes&, FloatPoint& focalPoint, FloatPoint& centerPoint, float& radius);
 
-    private:
-        SVGRadialGradientElement(const QualifiedName&, Document*);
+private:
+    SVGRadialGradientElement(const QualifiedName&, Document*);
 
-        virtual void parseMappedAttribute(Attribute*);
-        virtual void svgAttributeChanged(const QualifiedName&);
-        virtual void synchronizeProperty(const QualifiedName&);
+    virtual void parseMappedAttribute(Attribute*);
+    virtual void svgAttributeChanged(const QualifiedName&);
+    virtual void synchronizeProperty(const QualifiedName&);
 
-        virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
 
-        virtual bool selfHasRelativeLengths() const;
+    virtual bool selfHasRelativeLengths() const;
 
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGRadialGradientElement, SVGNames::cxAttr, SVGLength, Cx, cx)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGRadialGradientElement, SVGNames::cyAttr, SVGLength, Cy, cy)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGRadialGradientElement, SVGNames::rAttr, SVGLength, R, r)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGRadialGradientElement, SVGNames::fxAttr, SVGLength, Fx, fx)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGRadialGradientElement, SVGNames::fyAttr, SVGLength, Fy, fy)
-    };
+    // Animated property declarations
+    DECLARE_ANIMATED_LENGTH(Cx, cx)
+    DECLARE_ANIMATED_LENGTH(Cy, cy)
+    DECLARE_ANIMATED_LENGTH(R, r)
+    DECLARE_ANIMATED_LENGTH(Fx, fx)
+    DECLARE_ANIMATED_LENGTH(Fy, fy)
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGRectElement.cpp b/WebCore/svg/SVGRectElement.cpp
index 167f737..04fba95 100644
--- a/WebCore/svg/SVGRectElement.cpp
+++ b/WebCore/svg/SVGRectElement.cpp
@@ -31,6 +31,14 @@
 
 namespace WebCore {
 
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGRectElement, SVGNames::xAttr, X, x)
+DEFINE_ANIMATED_LENGTH(SVGRectElement, SVGNames::yAttr, Y, y)
+DEFINE_ANIMATED_LENGTH(SVGRectElement, SVGNames::widthAttr, Width, width)
+DEFINE_ANIMATED_LENGTH(SVGRectElement, SVGNames::heightAttr, Height, height)
+DEFINE_ANIMATED_LENGTH(SVGRectElement, SVGNames::rxAttr, Rx, rx)
+DEFINE_ANIMATED_LENGTH(SVGRectElement, SVGNames::ryAttr, Ry, ry)
+
 inline SVGRectElement::SVGRectElement(const QualifiedName& tagName, Document* document)
     : SVGStyledTransformableElement(tagName, document)
     , m_x(LengthModeWidth)
diff --git a/WebCore/svg/SVGRectElement.h b/WebCore/svg/SVGRectElement.h
index 8cc262f..706c41c 100644
--- a/WebCore/svg/SVGRectElement.h
+++ b/WebCore/svg/SVGRectElement.h
@@ -31,36 +31,37 @@
 
 namespace WebCore {
 
-    class SVGRectElement : public SVGStyledTransformableElement,
-                           public SVGTests,
-                           public SVGLangSpace,
-                           public SVGExternalResourcesRequired {
-    public:
-        static PassRefPtr<SVGRectElement> create(const QualifiedName&, Document*);
+class SVGRectElement : public SVGStyledTransformableElement,
+                       public SVGTests,
+                       public SVGLangSpace,
+                       public SVGExternalResourcesRequired {
+public:
+    static PassRefPtr<SVGRectElement> create(const QualifiedName&, Document*);
 
-    private:
-        SVGRectElement(const QualifiedName&, Document*);
-        
-        virtual bool isValid() const { return SVGTests::isValid(); }
+private:
+    SVGRectElement(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 void parseMappedAttribute(Attribute*);
+    virtual void svgAttributeChanged(const QualifiedName&);
+    virtual void synchronizeProperty(const QualifiedName&);
 
-        virtual void toPathData(Path&) const;
+    virtual void toPathData(Path&) const;
 
-        virtual bool selfHasRelativeLengths() const;
+    virtual bool selfHasRelativeLengths() const;
 
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGRectElement, SVGNames::xAttr, SVGLength, X, x)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGRectElement, SVGNames::yAttr, SVGLength, Y, y)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGRectElement, SVGNames::widthAttr, SVGLength, Width, width)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGRectElement, SVGNames::heightAttr, SVGLength, Height, height)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGRectElement, SVGNames::rxAttr, SVGLength, Rx, rx)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGRectElement, SVGNames::ryAttr, SVGLength, Ry, ry)
+    // Animated property declarations
+    DECLARE_ANIMATED_LENGTH(X, x)
+    DECLARE_ANIMATED_LENGTH(Y, y)
+    DECLARE_ANIMATED_LENGTH(Width, width)
+    DECLARE_ANIMATED_LENGTH(Height, height)
+    DECLARE_ANIMATED_LENGTH(Rx, rx)
+    DECLARE_ANIMATED_LENGTH(Ry, ry)
 
-        // SVGExternalResourcesRequired
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGRectElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
-    };
+    // SVGExternalResourcesRequired
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGRectElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGSVGElement.cpp b/WebCore/svg/SVGSVGElement.cpp
index e64f665..f418315 100644
--- a/WebCore/svg/SVGSVGElement.cpp
+++ b/WebCore/svg/SVGSVGElement.cpp
@@ -40,7 +40,6 @@
 #include "RenderSVGViewportContainer.h"
 #include "SMILTimeContainer.h"
 #include "SVGAngle.h"
-#include "SVGLength.h"
 #include "SVGNames.h"
 #include "SVGPreserveAspectRatio.h"
 #include "SVGTransform.h"
@@ -57,13 +56,14 @@ namespace WebCore {
 using namespace HTMLNames;
 using namespace SVGNames;
 
-SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document* doc)
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGSVGElement, SVGNames::xAttr, X, x)
+DEFINE_ANIMATED_LENGTH(SVGSVGElement, SVGNames::yAttr, Y, y)
+DEFINE_ANIMATED_LENGTH(SVGSVGElement, SVGNames::widthAttr, Width, width)
+DEFINE_ANIMATED_LENGTH(SVGSVGElement, SVGNames::heightAttr, Height, height)
+
+inline SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document* doc)
     : SVGStyledLocatableElement(tagName, doc)
-    , SVGTests()
-    , SVGLangSpace()
-    , SVGExternalResourcesRequired()
-    , SVGFitToViewBox()
-    , SVGZoomAndPan()
     , m_x(LengthModeWidth)
     , m_y(LengthModeHeight)
     , m_width(LengthModeWidth, "100%")
diff --git a/WebCore/svg/SVGSVGElement.h b/WebCore/svg/SVGSVGElement.h
index cbd8b70..4a0ac58 100644
--- a/WebCore/svg/SVGSVGElement.h
+++ b/WebCore/svg/SVGSVGElement.h
@@ -35,143 +35,145 @@
 #include "SVGZoomAndPan.h"
 
 namespace WebCore {
-    class SVGAngle;
-    class SVGLength;
-    class SVGMatrix;
-    class SVGTransform;
-    class SVGViewSpec;
-    class SVGViewElement;
-    class SMILTimeContainer;
-    class SVGSVGElement : public SVGStyledLocatableElement,
-                          public SVGTests,
-                          public SVGLangSpace,
-                          public SVGExternalResourcesRequired,
-                          public SVGFitToViewBox,
-                          public SVGZoomAndPan {
-    public:
-        static PassRefPtr<SVGSVGElement> create(const QualifiedName&, Document*);
-
-        virtual bool isValid() const { return SVGTests::isValid(); }
 
-        // 'SVGSVGElement' functions
-        const AtomicString& contentScriptType() const;
-        void setContentScriptType(const AtomicString& type);
+class SVGAngle;
+class SVGMatrix;
+class SVGTransform;
+class SVGViewSpec;
+class SVGViewElement;
+class SMILTimeContainer;
 
-        const AtomicString& contentStyleType() const;
-        void setContentStyleType(const AtomicString& type);
+class SVGSVGElement : public SVGStyledLocatableElement,
+                      public SVGTests,
+                      public SVGLangSpace,
+                      public SVGExternalResourcesRequired,
+                      public SVGFitToViewBox,
+                      public SVGZoomAndPan {
+public:
+    static PassRefPtr<SVGSVGElement> create(const QualifiedName&, Document*);
 
-        FloatRect viewport() const;
+    virtual bool isValid() const { return SVGTests::isValid(); }
 
-        void setContainerSize(const IntSize& containerSize) { m_containerSize = containerSize; m_hasSetContainerSize = true; }
-        IntSize containerSize() const { return m_containerSize; }
-        bool hasSetContainerSize() const { return m_hasSetContainerSize; }
-        int relativeWidthValue() const;
-        int relativeHeightValue() const;
+    // 'SVGSVGElement' functions
+    const AtomicString& contentScriptType() const;
+    void setContentScriptType(const AtomicString& type);
 
-        float pixelUnitToMillimeterX() const;
-        float pixelUnitToMillimeterY() const;
-        float screenPixelToMillimeterX() const;
-        float screenPixelToMillimeterY() const;
+    const AtomicString& contentStyleType() const;
+    void setContentStyleType(const AtomicString& type);
 
-        bool useCurrentView() const;
-        void setUseCurrentView(bool currentView);
+    FloatRect viewport() const;
 
-        SVGViewSpec* currentView() const;
+    void setContainerSize(const IntSize& containerSize) { m_containerSize = containerSize; m_hasSetContainerSize = true; }
+    IntSize containerSize() const { return m_containerSize; }
+    bool hasSetContainerSize() const { return m_hasSetContainerSize; }
+    int relativeWidthValue() const;
+    int relativeHeightValue() const;
 
-        float currentScale() const;
-        void setCurrentScale(float scale);
+    float pixelUnitToMillimeterX() const;
+    float pixelUnitToMillimeterY() const;
+    float screenPixelToMillimeterX() const;
+    float screenPixelToMillimeterY() const;
 
-        FloatPoint& currentTranslate() { return m_translation; }
-        void setCurrentTranslate(const FloatPoint&);
+    bool useCurrentView() const;
+    void setUseCurrentView(bool currentView);
 
-        // Only used from the bindings.
-        void updateCurrentTranslate();
+    SVGViewSpec* currentView() const;
 
-        SMILTimeContainer* timeContainer() const { return m_timeContainer.get(); }
-        
-        void pauseAnimations();
-        void unpauseAnimations();
-        bool animationsPaused() const;
+    float currentScale() const;
+    void setCurrentScale(float scale);
 
-        float getCurrentTime() const;
-        void setCurrentTime(float seconds);
+    FloatPoint& currentTranslate() { return m_translation; }
+    void setCurrentTranslate(const FloatPoint&);
 
-        unsigned suspendRedraw(unsigned maxWaitMilliseconds);
-        void unsuspendRedraw(unsigned suspendHandleId);
-        void unsuspendRedrawAll();
-        void forceRedraw();
+    // Only used from the bindings.
+    void updateCurrentTranslate();
 
-        NodeList* getIntersectionList(const FloatRect&, SVGElement* referenceElement);
-        NodeList* getEnclosureList(const FloatRect&, SVGElement* referenceElement);
-        bool checkIntersection(SVGElement*, const FloatRect&);
-        bool checkEnclosure(SVGElement*, const FloatRect&);
-        void deselectAll();
+    SMILTimeContainer* timeContainer() const { return m_timeContainer.get(); }
+    
+    void pauseAnimations();
+    void unpauseAnimations();
+    bool animationsPaused() const;
 
-        static float createSVGNumber();
-        static SVGLength createSVGLength();
-        static SVGAngle createSVGAngle();
-        static FloatPoint createSVGPoint();
-        static SVGMatrix createSVGMatrix();
-        static FloatRect createSVGRect();
-        static SVGTransform createSVGTransform();
-        static SVGTransform createSVGTransformFromMatrix(const SVGMatrix&);
+    float getCurrentTime() const;
+    void setCurrentTime(float seconds);
 
-        AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) const;
+    unsigned suspendRedraw(unsigned maxWaitMilliseconds);
+    void unsuspendRedraw(unsigned suspendHandleId);
+    void unsuspendRedrawAll();
+    void forceRedraw();
 
-        void inheritViewAttributes(SVGViewElement*);
+    NodeList* getIntersectionList(const FloatRect&, SVGElement* referenceElement);
+    NodeList* getEnclosureList(const FloatRect&, SVGElement* referenceElement);
+    bool checkIntersection(SVGElement*, const FloatRect&);
+    bool checkEnclosure(SVGElement*, const FloatRect&);
+    void deselectAll();
 
-        bool isOutermostSVG() const;
+    static float createSVGNumber();
+    static SVGLength createSVGLength();
+    static SVGAngle createSVGAngle();
+    static FloatPoint createSVGPoint();
+    static SVGMatrix createSVGMatrix();
+    static FloatRect createSVGRect();
+    static SVGTransform createSVGTransform();
+    static SVGTransform createSVGTransformFromMatrix(const SVGMatrix&);
 
-        Element* getElementById(const AtomicString&) const;
+    AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) const;
 
-    protected:
-        virtual void willMoveToNewOwnerDocument();
-        virtual void didMoveToNewOwnerDocument();
+    void inheritViewAttributes(SVGViewElement*);
 
-    private:
-        SVGSVGElement(const QualifiedName&, Document*);
-        virtual ~SVGSVGElement();
+    bool isOutermostSVG() const;
 
-        virtual bool isSVG() const { return true; }
-        
-        virtual void parseMappedAttribute(Attribute*);
+    Element* getElementById(const AtomicString&) const;
 
-        virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
-        virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+protected:
+    virtual void willMoveToNewOwnerDocument();
+    virtual void didMoveToNewOwnerDocument();
 
-        virtual void insertedIntoDocument();
-        virtual void removedFromDocument();
+private:
+    SVGSVGElement(const QualifiedName&, Document*);
+    virtual ~SVGSVGElement();
 
-        virtual void svgAttributeChanged(const QualifiedName&);
-        virtual void synchronizeProperty(const QualifiedName&);
+    virtual bool isSVG() const { return true; }
+    
+    virtual void parseMappedAttribute(Attribute*);
 
-        virtual bool selfHasRelativeLengths() const;
+    virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
+    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
 
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGSVGElement, SVGNames::xAttr, SVGLength, X, x)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGSVGElement, SVGNames::yAttr, SVGLength, Y, y)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGSVGElement, SVGNames::widthAttr, SVGLength, Width, width)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGSVGElement, SVGNames::heightAttr, SVGLength, Height, height)
+    virtual void insertedIntoDocument();
+    virtual void removedFromDocument();
 
-        // SVGExternalResourcesRequired
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGSVGElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+    virtual void svgAttributeChanged(const QualifiedName&);
+    virtual void synchronizeProperty(const QualifiedName&);
 
-        // SVGFitToViewBox
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGSVGElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGSVGElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
+    virtual bool selfHasRelativeLengths() const;
+
+    // Animated property declarations
+    DECLARE_ANIMATED_LENGTH(X, x)
+    DECLARE_ANIMATED_LENGTH(Y, y)
+    DECLARE_ANIMATED_LENGTH(Width, width)
+    DECLARE_ANIMATED_LENGTH(Height, height)
+
+    // SVGExternalResourcesRequired
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGSVGElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+
+    // SVGFitToViewBox
+    DECLARE_ANIMATED_PROPERTY_NEW(SVGSVGElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
+    DECLARE_ANIMATED_PROPERTY_NEW(SVGSVGElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
  
-        virtual void documentWillBecomeInactive();
-        virtual void documentDidBecomeActive();
-
-        virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope) const;
-
-        bool m_useCurrentView;
-        RefPtr<SMILTimeContainer> m_timeContainer;
-        FloatPoint m_translation;
-        float m_scale;
-        mutable OwnPtr<SVGViewSpec> m_viewSpec;
-        IntSize m_containerSize;
-        bool m_hasSetContainerSize;
-    };
+    virtual void documentWillBecomeInactive();
+    virtual void documentDidBecomeActive();
+
+    virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope) const;
+
+    bool m_useCurrentView;
+    RefPtr<SMILTimeContainer> m_timeContainer;
+    FloatPoint m_translation;
+    float m_scale;
+    mutable OwnPtr<SVGViewSpec> m_viewSpec;
+    IntSize m_containerSize;
+    bool m_hasSetContainerSize;
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGTextContentElement.cpp b/WebCore/svg/SVGTextContentElement.cpp
index 65b89e9..6f8b73a 100644
--- a/WebCore/svg/SVGTextContentElement.cpp
+++ b/WebCore/svg/SVGTextContentElement.cpp
@@ -33,6 +33,9 @@
 
 namespace WebCore {
 
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGTextContentElement, SVGNames::textLengthAttr, TextLength, textLength)
+
 SVGTextContentElement::SVGTextContentElement(const QualifiedName& tagName, Document* document)
     : SVGStyledElement(tagName, document)
     , m_textLength(LengthModeOther)
diff --git a/WebCore/svg/SVGTextContentElement.h b/WebCore/svg/SVGTextContentElement.h
index fd2e003..5edd8aa 100644
--- a/WebCore/svg/SVGTextContentElement.h
+++ b/WebCore/svg/SVGTextContentElement.h
@@ -31,53 +31,52 @@
 
 namespace WebCore {
 
-    class SVGLength;
-
-    class SVGTextContentElement : public SVGStyledElement,
-                                  public SVGTests,
-                                  public SVGLangSpace,
-                                  public SVGExternalResourcesRequired {
-    public:
-        enum SVGLengthAdjustType {
-            LENGTHADJUST_UNKNOWN            = 0,
-            LENGTHADJUST_SPACING            = 1,
-            LENGTHADJUST_SPACINGANDGLYPHS   = 2
-        };
+class SVGTextContentElement : public SVGStyledElement,
+                              public SVGTests,
+                              public SVGLangSpace,
+                              public SVGExternalResourcesRequired {
+public:
+    enum SVGLengthAdjustType {
+        LENGTHADJUST_UNKNOWN            = 0,
+        LENGTHADJUST_SPACING            = 1,
+        LENGTHADJUST_SPACINGANDGLYPHS   = 2
+    };
 
-        unsigned getNumberOfChars() const;
-        float getComputedTextLength() const;
-        float getSubStringLength(unsigned charnum, unsigned nchars, ExceptionCode&) const;
-        FloatPoint getStartPositionOfChar(unsigned charnum, ExceptionCode&) const;
-        FloatPoint getEndPositionOfChar(unsigned charnum, ExceptionCode&) const;
-        FloatRect getExtentOfChar(unsigned charnum, ExceptionCode&) const;
-        float getRotationOfChar(unsigned charnum, ExceptionCode&) const;
-        int getCharNumAtPosition(const FloatPoint&) const;
-        void selectSubString(unsigned charnum, unsigned nchars, ExceptionCode&) const;
+    unsigned getNumberOfChars() const;
+    float getComputedTextLength() const;
+    float getSubStringLength(unsigned charnum, unsigned nchars, ExceptionCode&) const;
+    FloatPoint getStartPositionOfChar(unsigned charnum, ExceptionCode&) const;
+    FloatPoint getEndPositionOfChar(unsigned charnum, ExceptionCode&) const;
+    FloatRect getExtentOfChar(unsigned charnum, ExceptionCode&) const;
+    float getRotationOfChar(unsigned charnum, ExceptionCode&) const;
+    int getCharNumAtPosition(const FloatPoint&) const;
+    void selectSubString(unsigned charnum, unsigned nchars, ExceptionCode&) const;
 
-        bool isKnownAttribute(const QualifiedName&);
+    bool isKnownAttribute(const QualifiedName&);
 
-        static SVGTextContentElement* elementFromRenderer(RenderObject*);
+    static SVGTextContentElement* elementFromRenderer(RenderObject*);
 
-    protected:
-        SVGTextContentElement(const QualifiedName&, Document*);
+protected:
+    SVGTextContentElement(const QualifiedName&, Document*);
 
-        virtual bool isValid() const { return SVGTests::isValid(); }
+    virtual bool isValid() const { return SVGTests::isValid(); }
 
-        virtual void parseMappedAttribute(Attribute*);
-        virtual void svgAttributeChanged(const QualifiedName&);
-        virtual void synchronizeProperty(const QualifiedName&);
+    virtual void parseMappedAttribute(Attribute*);
+    virtual void svgAttributeChanged(const QualifiedName&);
+    virtual void synchronizeProperty(const QualifiedName&);
 
-        virtual bool selfHasRelativeLengths() const;
+    virtual bool selfHasRelativeLengths() const;
 
-    private:
-        virtual bool isTextContent() const { return true; }
+private:
+    virtual bool isTextContent() const { return true; }
 
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGTextContentElement, SVGNames::textLengthAttr, SVGLength, TextLength, textLength)
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGTextContentElement, SVGNames::lengthAdjustAttr, int, LengthAdjust, lengthAdjust)
+    // Animated property declarations
+    DECLARE_ANIMATED_LENGTH(TextLength, textLength)
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGTextContentElement, SVGNames::lengthAdjustAttr, int, LengthAdjust, lengthAdjust)
 
-        // SVGExternalResourcesRequired
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGTextContentElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired) 
-    };
+    // SVGExternalResourcesRequired
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGTextContentElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired) 
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGTextPathElement.cpp b/WebCore/svg/SVGTextPathElement.cpp
index bbfa0e2..4ae5c04 100644
--- a/WebCore/svg/SVGTextPathElement.cpp
+++ b/WebCore/svg/SVGTextPathElement.cpp
@@ -23,18 +23,15 @@
 #if ENABLE(SVG)
 #include "SVGTextPathElement.h"
 
-#include "AffineTransform.h"
 #include "Attribute.h"
-#include "FloatRect.h"
 #include "RenderSVGResource.h"
 #include "RenderSVGTextPath.h"
-#include "SVGLengthList.h"
-#include "SVGPathElement.h"
-#include "SVGRenderStyle.h"
-#include "SVGTransformList.h"
 
 namespace WebCore {
 
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGTextPathElement, SVGNames::startOffsetAttr, StartOffset, startOffset)
+
 inline SVGTextPathElement::SVGTextPathElement(const QualifiedName& tagName, Document* document)
     : SVGTextContentElement(tagName, document)
     , m_startOffset(LengthModeOther)
diff --git a/WebCore/svg/SVGTextPathElement.h b/WebCore/svg/SVGTextPathElement.h
index 2375078..a6efdb6 100644
--- a/WebCore/svg/SVGTextPathElement.h
+++ b/WebCore/svg/SVGTextPathElement.h
@@ -26,54 +26,56 @@
 #include "SVGURIReference.h"
 
 namespace WebCore {
+
     enum SVGTextPathMethodType {
-        SVG_TEXTPATH_METHODTYPE_UNKNOWN = 0,
-        SVG_TEXTPATH_METHODTYPE_ALIGN = 1,
-        SVG_TEXTPATH_METHODTYPE_STRETCH = 2
-    };
+    SVG_TEXTPATH_METHODTYPE_UNKNOWN = 0,
+    SVG_TEXTPATH_METHODTYPE_ALIGN = 1,
+    SVG_TEXTPATH_METHODTYPE_STRETCH = 2
+};
+
+enum SVGTextPathSpacingType {
+    SVG_TEXTPATH_SPACINGTYPE_UNKNOWN = 0,
+    SVG_TEXTPATH_SPACINGTYPE_AUTO = 1,
+    SVG_TEXTPATH_SPACINGTYPE_EXACT = 2
+};
 
-    enum SVGTextPathSpacingType {
-        SVG_TEXTPATH_SPACINGTYPE_UNKNOWN = 0,
-        SVG_TEXTPATH_SPACINGTYPE_AUTO = 1,
-        SVG_TEXTPATH_SPACINGTYPE_EXACT = 2
+class SVGTextPathElement : public SVGTextContentElement,
+                           public SVGURIReference {
+public:
+    // Forward declare these enums in the w3c naming scheme, for IDL generation
+    enum {
+        TEXTPATH_METHODTYPE_UNKNOWN = SVG_TEXTPATH_METHODTYPE_UNKNOWN,
+        TEXTPATH_METHODTYPE_ALIGN = SVG_TEXTPATH_METHODTYPE_ALIGN,
+        TEXTPATH_METHODTYPE_STRETCH = SVG_TEXTPATH_METHODTYPE_STRETCH,
+        TEXTPATH_SPACINGTYPE_UNKNOWN = SVG_TEXTPATH_SPACINGTYPE_UNKNOWN,
+        TEXTPATH_SPACINGTYPE_AUTO = SVG_TEXTPATH_SPACINGTYPE_AUTO,
+        TEXTPATH_SPACINGTYPE_EXACT = SVG_TEXTPATH_SPACINGTYPE_EXACT
     };
 
-    class SVGTextPathElement : public SVGTextContentElement,
-                               public SVGURIReference {
-    public:
-        // Forward declare these enums in the w3c naming scheme, for IDL generation
-        enum {
-            TEXTPATH_METHODTYPE_UNKNOWN = SVG_TEXTPATH_METHODTYPE_UNKNOWN,
-            TEXTPATH_METHODTYPE_ALIGN = SVG_TEXTPATH_METHODTYPE_ALIGN,
-            TEXTPATH_METHODTYPE_STRETCH = SVG_TEXTPATH_METHODTYPE_STRETCH,
-            TEXTPATH_SPACINGTYPE_UNKNOWN = SVG_TEXTPATH_SPACINGTYPE_UNKNOWN,
-            TEXTPATH_SPACINGTYPE_AUTO = SVG_TEXTPATH_SPACINGTYPE_AUTO,
-            TEXTPATH_SPACINGTYPE_EXACT = SVG_TEXTPATH_SPACINGTYPE_EXACT
-        };
-
-        static PassRefPtr<SVGTextPathElement> create(const QualifiedName&, Document*);
+    static PassRefPtr<SVGTextPathElement> create(const QualifiedName&, Document*);
  
-    private:
-        SVGTextPathElement(const QualifiedName&, Document*);
+private:
+    SVGTextPathElement(const QualifiedName&, Document*);
 
-        virtual void insertedIntoDocument();
+    virtual void insertedIntoDocument();
 
-        virtual void parseMappedAttribute(Attribute*);
-        virtual void svgAttributeChanged(const QualifiedName&);
-        virtual void synchronizeProperty(const QualifiedName&);
-        virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+    virtual void parseMappedAttribute(Attribute*);
+    virtual void svgAttributeChanged(const QualifiedName&);
+    virtual void synchronizeProperty(const QualifiedName&);
+    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
 
-        virtual bool childShouldCreateRenderer(Node*) const;
+    virtual bool childShouldCreateRenderer(Node*) const;
 
-        virtual bool selfHasRelativeLengths() const;
+    virtual bool selfHasRelativeLengths() const;
 
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGTextPathElement, SVGNames::startOffsetAttr, SVGLength, StartOffset, startOffset)
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGTextPathElement, SVGNames::methodAttr, int, Method, method)
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGTextPathElement, SVGNames::spacingAttr, int, Spacing, spacing)
-    
-        // SVGURIReference
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGTextPathElement, XLinkNames::hrefAttr, String, Href, href)
-    };
+    // Animated property declarations
+    DECLARE_ANIMATED_LENGTH(StartOffset, startOffset)
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGTextPathElement, SVGNames::methodAttr, int, Method, method)
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGTextPathElement, SVGNames::spacingAttr, int, Spacing, spacing)
+
+    // SVGURIReference
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGTextPathElement, XLinkNames::hrefAttr, String, Href, href)
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGTextPositioningElement.h b/WebCore/svg/SVGTextPositioningElement.h
index e1798de..ce5c798 100644
--- a/WebCore/svg/SVGTextPositioningElement.h
+++ b/WebCore/svg/SVGTextPositioningElement.h
@@ -28,26 +28,26 @@
 
 namespace WebCore {
 
-    class SVGTextPositioningElement : public SVGTextContentElement {
-    public:
-        static SVGTextPositioningElement* elementFromRenderer(RenderObject*);
-
-    protected:
-        SVGTextPositioningElement(const QualifiedName&, Document*);
-
-        virtual void parseMappedAttribute(Attribute*);
-        virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
-        virtual void svgAttributeChanged(const QualifiedName&);
-        virtual void synchronizeProperty(const QualifiedName&);
-
-        virtual bool selfHasRelativeLengths() const;
-
-        DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGTextPositioningElement, SVGNames::xAttr, SVGLengthList, X, x)
-        DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGTextPositioningElement, SVGNames::yAttr, SVGLengthList, Y, y)
-        DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGTextPositioningElement, SVGNames::dxAttr, SVGLengthList, Dx, dx)
-        DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGTextPositioningElement, SVGNames::dyAttr, SVGLengthList, Dy, dy)
-        DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGTextPositioningElement, SVGNames::rotateAttr, SVGNumberList, Rotate, rotate)
-    };
+class SVGTextPositioningElement : public SVGTextContentElement {
+public:
+    static SVGTextPositioningElement* elementFromRenderer(RenderObject*);
+
+protected:
+    SVGTextPositioningElement(const QualifiedName&, Document*);
+
+    virtual void parseMappedAttribute(Attribute*);
+    virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+    virtual void svgAttributeChanged(const QualifiedName&);
+    virtual void synchronizeProperty(const QualifiedName&);
+
+    virtual bool selfHasRelativeLengths() const;
+
+    DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGTextPositioningElement, SVGNames::xAttr, SVGLengthList, X, x)
+    DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGTextPositioningElement, SVGNames::yAttr, SVGLengthList, Y, y)
+    DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGTextPositioningElement, SVGNames::dxAttr, SVGLengthList, Dx, dx)
+    DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGTextPositioningElement, SVGNames::dyAttr, SVGLengthList, Dy, dy)
+    DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGTextPositioningElement, SVGNames::rotateAttr, SVGNumberList, Rotate, rotate)
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGUseElement.cpp b/WebCore/svg/SVGUseElement.cpp
index fc01fd9..1abdbf2 100644
--- a/WebCore/svg/SVGUseElement.cpp
+++ b/WebCore/svg/SVGUseElement.cpp
@@ -57,6 +57,12 @@
 
 namespace WebCore {
 
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH(SVGUseElement, SVGNames::xAttr, X, x)
+DEFINE_ANIMATED_LENGTH(SVGUseElement, SVGNames::yAttr, Y, y)
+DEFINE_ANIMATED_LENGTH(SVGUseElement, SVGNames::widthAttr, Width, width)
+DEFINE_ANIMATED_LENGTH(SVGUseElement, SVGNames::heightAttr, Height, height)
+
 inline SVGUseElement::SVGUseElement(const QualifiedName& tagName, Document* document)
     : SVGStyledTransformableElement(tagName, document)
     , m_x(LengthModeWidth)
diff --git a/WebCore/svg/SVGUseElement.h b/WebCore/svg/SVGUseElement.h
index b127450..5a11ace 100644
--- a/WebCore/svg/SVGUseElement.h
+++ b/WebCore/svg/SVGUseElement.h
@@ -32,94 +32,94 @@
 
 namespace WebCore {
 
-    class SVGElementInstance;
-    class SVGLength;
-    class SVGShadowTreeRootElement;
+class SVGElementInstance;
+class SVGShadowTreeRootElement;
 
-    class SVGUseElement : public SVGStyledTransformableElement,
-                          public SVGTests,
-                          public SVGLangSpace,
-                          public SVGExternalResourcesRequired,
-                          public SVGURIReference {
-    public:
-        static PassRefPtr<SVGUseElement> create(const QualifiedName&, Document*);
+class SVGUseElement : public SVGStyledTransformableElement,
+                      public SVGTests,
+                      public SVGLangSpace,
+                      public SVGExternalResourcesRequired,
+                      public SVGURIReference {
+public:
+    static PassRefPtr<SVGUseElement> create(const QualifiedName&, Document*);
 
-        SVGElementInstance* instanceRoot() const;
-        SVGElementInstance* animatedInstanceRoot() const;
-        SVGElementInstance* instanceForShadowTreeElement(Node*) const;
-        void invalidateShadowTree();
+    SVGElementInstance* instanceRoot() const;
+    SVGElementInstance* animatedInstanceRoot() const;
+    SVGElementInstance* instanceForShadowTreeElement(Node*) const;
+    void invalidateShadowTree();
 
-        RenderObject* rendererClipChild() const;
+    RenderObject* rendererClipChild() const;
 
-    private:
-        SVGUseElement(const QualifiedName&, Document*);
+private:
+    SVGUseElement(const QualifiedName&, Document*);
 
-        virtual bool isValid() const { return SVGTests::isValid(); }
+    virtual bool isValid() const { return SVGTests::isValid(); }
 
-        virtual void insertedIntoDocument();
-        virtual void removedFromDocument();
-        virtual void buildPendingResource();
+    virtual void insertedIntoDocument();
+    virtual void removedFromDocument();
+    virtual void buildPendingResource();
 
-        virtual void parseMappedAttribute(Attribute*);
-        virtual void svgAttributeChanged(const QualifiedName&);
-        virtual void synchronizeProperty(const QualifiedName&);
+    virtual void parseMappedAttribute(Attribute*);
+    virtual void svgAttributeChanged(const QualifiedName&);
+    virtual void synchronizeProperty(const QualifiedName&);
 
-        virtual void recalcStyle(StyleChange = NoChange);
-        virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
-        virtual void attach();
-        virtual void detach();
+    virtual void recalcStyle(StyleChange = NoChange);
+    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+    virtual void attach();
+    virtual void detach();
 
-        virtual void toClipPath(Path&) const;
+    virtual void toClipPath(Path&) const;
 
-        static void removeDisallowedElementsFromSubtree(Node* element);
+    static void removeDisallowedElementsFromSubtree(Node* element);
 
-        void setUpdatesBlocked(bool blocked) { m_updatesBlocked = blocked; }
+    void setUpdatesBlocked(bool blocked) { m_updatesBlocked = blocked; }
 
-        friend class RenderSVGShadowTreeRootContainer;
-        bool isPendingResource() const { return m_isPendingResource; }
-        void buildShadowAndInstanceTree(SVGShadowTreeRootElement*);
+    friend class RenderSVGShadowTreeRootContainer;
+    bool isPendingResource() const { return m_isPendingResource; }
+    void buildShadowAndInstanceTree(SVGShadowTreeRootElement*);
 
-        virtual bool selfHasRelativeLengths() const;
+    virtual bool selfHasRelativeLengths() const;
 
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGUseElement, SVGNames::xAttr, SVGLength, X, x)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGUseElement, SVGNames::yAttr, SVGLength, Y, y)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGUseElement, SVGNames::widthAttr, SVGLength, Width, width)
-        DECLARE_ANIMATED_PROPERTY_NEW(SVGUseElement, SVGNames::heightAttr, SVGLength, Height, height)
+    // Instance tree handling
+    void buildInstanceTree(SVGElement* target, SVGElementInstance* targetInstance, bool& foundCycle);
+    void handleDeepUseReferencing(SVGUseElement* use, SVGElementInstance* targetInstance, bool& foundCycle);
 
-        // SVGURIReference
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGUseElement, XLinkNames::hrefAttr, String, Href, href)
+    // Shadow tree handling
+    void buildShadowTree(SVGShadowTreeRootElement*, SVGElement* target, SVGElementInstance* targetInstance);
 
-        // SVGExternalResourcesRequired
-        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGUseElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+#if ENABLE(SVG) && ENABLE(SVG_USE)
+    void expandUseElementsInShadowTree(SVGShadowTreeRootElement*, Node* element);
+    void expandSymbolElementsInShadowTree(SVGShadowTreeRootElement*, Node* element);
+#endif
 
-        // Instance tree handling
-        void buildInstanceTree(SVGElement* target, SVGElementInstance* targetInstance, bool& foundCycle);
-        void handleDeepUseReferencing(SVGUseElement* use, SVGElementInstance* targetInstance, bool& foundCycle);
+    // "Tree connector" 
+    void associateInstancesWithShadowTreeElements(Node* target, SVGElementInstance* targetInstance);
+    SVGElementInstance* instanceForShadowTreeElement(Node* element, SVGElementInstance* instance) const;
 
-        // Shadow tree handling
-        void buildShadowTree(SVGShadowTreeRootElement*, SVGElement* target, SVGElementInstance* targetInstance);
+    void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to) const;
+    void transferEventListenersToShadowTree(SVGElementInstance* target);
 
-#if ENABLE(SVG) && ENABLE(SVG_USE)
-        void expandUseElementsInShadowTree(SVGShadowTreeRootElement*, Node* element);
-        void expandSymbolElementsInShadowTree(SVGShadowTreeRootElement*, Node* element);
-#endif
+    void updateContainerOffsets();
+    void updateContainerSizes();
 
-        // "Tree connector" 
-        void associateInstancesWithShadowTreeElements(Node* target, SVGElementInstance* targetInstance);
-        SVGElementInstance* instanceForShadowTreeElement(Node* element, SVGElementInstance* instance) const;
+    // Animated property declarations
+    DECLARE_ANIMATED_LENGTH(X, x)
+    DECLARE_ANIMATED_LENGTH(Y, y)
+    DECLARE_ANIMATED_LENGTH(Width, width)
+    DECLARE_ANIMATED_LENGTH(Height, height)
 
-        void transferUseAttributesToReplacedElement(SVGElement* from, SVGElement* to) const;
-        void transferEventListenersToShadowTree(SVGElementInstance* target);
+    // SVGURIReference
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGUseElement, XLinkNames::hrefAttr, String, Href, href)
 
-        void updateContainerOffsets();
-        void updateContainerSizes();
+    // SVGExternalResourcesRequired
+    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGUseElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
 
-        bool m_updatesBlocked;
-        bool m_isPendingResource;
-        bool m_needsShadowTreeRecreation;
-        String m_resourceId;
-        RefPtr<SVGElementInstance> m_targetElementInstance;
-    };
+    bool m_updatesBlocked;
+    bool m_isPendingResource;
+    bool m_needsShadowTreeRecreation;
+    String m_resourceId;
+    RefPtr<SVGElementInstance> m_targetElementInstance;
+};
 
 }
 
diff --git a/WebCore/svg/properties/SVGAnimatedPropertyMacros.h b/WebCore/svg/properties/SVGAnimatedPropertyMacros.h
index 53dbd40..53f4361 100644
--- a/WebCore/svg/properties/SVGAnimatedPropertyMacros.h
+++ b/WebCore/svg/properties/SVGAnimatedPropertyMacros.h
@@ -167,6 +167,47 @@ void detachAnimated##UpperProperty##ListWrappers(unsigned newListSize) \
     static_cast<SVGAnimatedTransformListPropertyTearOff*>(wrapper)->detachListWrappers(newListSize); \
 }
 
+// FIXME: Remove all macros above, once these two below are deployed everywhere.
+
+#define DEFINE_ANIMATED_PROPERTY(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, TearOffType, PropertyType, UpperProperty, LowerProperty) \
+void OwnerType::synchronize##UpperProperty() \
+{ \
+    if (!m_##LowerProperty.shouldSynchronize) \
+         return; \
+    AtomicString value(SVGPropertyTraits<PropertyType>::toString(LowerProperty##BaseValue())); \
+    SVGElement* contextElement = GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value>::ownerElement(this); \
+    SVGAnimatedPropertySynchronizer<IsDerivedFromSVGElement<OwnerType>::value>::synchronize(contextElement, DOMAttribute, value); \
+} \
+\
+PassRefPtr<TearOffType> OwnerType::LowerProperty##Animated() \
+{ \
+    m_##LowerProperty.shouldSynchronize = true; \
+    SVGElement* contextElement = GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value>::ownerElement(this); \
+    return SVGAnimatedProperty::lookupOrCreateWrapper<TearOffType, PropertyType>(contextElement, DOMAttribute, SVGDOMAttributeIdentifier, m_##LowerProperty.value); \
+}
+
+#define DECLARE_ANIMATED_PROPERTY(TearOffType, PropertyType, UpperProperty, LowerProperty) \
+public: \
+PropertyType& LowerProperty() const \
+{ \
+    return m_##LowerProperty.value; \
+} \
+\
+PropertyType& LowerProperty##BaseValue() const \
+{ \
+    return m_##LowerProperty.value; \
+} \
+\
+void set##UpperProperty##BaseValue(const PropertyType& type) \
+{ \
+    m_##LowerProperty.value = type; \
+} \
+\
+void synchronize##UpperProperty(); \
+PassRefPtr<TearOffType> LowerProperty##Animated(); \
+\
+private: \
+    mutable SVGSynchronizableAnimatedProperty<PropertyType> m_##LowerProperty;
 
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list