[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:55 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit ca9551e3052fdcc35862a35c57646c642ae0287e
Author: zimmermann at webkit.org <zimmermann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 1 15:41:53 2010 +0000
2010-12-01 Nikolas Zimmermann <nzimmermann at rim.com>
Reviewed by Xan Lopez.
Split DECLARE_ANIMATED_PROPERTY* in DECLARE/DEFINE parts for SVGLengthList/SVGNumberList/SVGTransformList
https://bugs.webkit.org/show_bug.cgi?id=50322
Continuing the work on bug 42025: Introduce DECLARE_ANIMATED_(LENGTH|NUMBER|TRANSFORM)_LIST / DEFINE_ANIMATED_(LENGTH|NUMBER|TRANSFORM).
The animated property declaration lives in the header, the definition in the cpp file, to avoid the dependency on SVGNames.h in all headers.
No functional changes, thus no new tests.
* svg/SVGAnimatedLengthList.h:
* svg/SVGAnimatedNumberList.h:
* svg/SVGAnimatedTransformList.h:
* svg/SVGComponentTransferFunctionElement.cpp:
* svg/SVGComponentTransferFunctionElement.h:
* svg/SVGFEColorMatrixElement.cpp:
* svg/SVGFEColorMatrixElement.h:
* svg/SVGFEConvolveMatrixElement.cpp:
* svg/SVGFEConvolveMatrixElement.h:
* svg/SVGGradientElement.cpp:
* svg/SVGGradientElement.h:
(WebCore::SVGGradientElement::needsPendingResourceHandling):
* svg/SVGPatternElement.cpp:
* svg/SVGPatternElement.h:
* svg/SVGPolygonElement.cpp:
* svg/SVGPolylineElement.cpp:
* svg/SVGStyledTransformableElement.cpp:
* svg/SVGStyledTransformableElement.h:
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::SVGTextElement):
* svg/SVGTextElement.h:
(WebCore::SVGTextElement::localCoordinateSpaceTransform):
* svg/SVGTextPositioningElement.cpp:
* svg/SVGTextPositioningElement.h:
* svg/properties/SVGAnimatedPropertyMacros.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index fca8907..a0b3ba5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,41 @@
+2010-12-01 Nikolas Zimmermann <nzimmermann at rim.com>
+
+ Reviewed by Xan Lopez.
+
+ Split DECLARE_ANIMATED_PROPERTY* in DECLARE/DEFINE parts for SVGLengthList/SVGNumberList/SVGTransformList
+ https://bugs.webkit.org/show_bug.cgi?id=50322
+
+ Continuing the work on bug 42025: Introduce DECLARE_ANIMATED_(LENGTH|NUMBER|TRANSFORM)_LIST / DEFINE_ANIMATED_(LENGTH|NUMBER|TRANSFORM).
+ The animated property declaration lives in the header, the definition in the cpp file, to avoid the dependency on SVGNames.h in all headers.
+
+ No functional changes, thus no new tests.
+
+ * svg/SVGAnimatedLengthList.h:
+ * svg/SVGAnimatedNumberList.h:
+ * svg/SVGAnimatedTransformList.h:
+ * svg/SVGComponentTransferFunctionElement.cpp:
+ * svg/SVGComponentTransferFunctionElement.h:
+ * svg/SVGFEColorMatrixElement.cpp:
+ * svg/SVGFEColorMatrixElement.h:
+ * svg/SVGFEConvolveMatrixElement.cpp:
+ * svg/SVGFEConvolveMatrixElement.h:
+ * svg/SVGGradientElement.cpp:
+ * svg/SVGGradientElement.h:
+ (WebCore::SVGGradientElement::needsPendingResourceHandling):
+ * svg/SVGPatternElement.cpp:
+ * svg/SVGPatternElement.h:
+ * svg/SVGPolygonElement.cpp:
+ * svg/SVGPolylineElement.cpp:
+ * svg/SVGStyledTransformableElement.cpp:
+ * svg/SVGStyledTransformableElement.h:
+ * svg/SVGTextElement.cpp:
+ (WebCore::SVGTextElement::SVGTextElement):
+ * svg/SVGTextElement.h:
+ (WebCore::SVGTextElement::localCoordinateSpaceTransform):
+ * svg/SVGTextPositioningElement.cpp:
+ * svg/SVGTextPositioningElement.h:
+ * svg/properties/SVGAnimatedPropertyMacros.h:
+
2010-12-01 Alexander Pavlov <apavlov at chromium.org>
Reviewed by Yury Semikhatsky.
diff --git a/WebCore/svg/SVGAnimatedLengthList.h b/WebCore/svg/SVGAnimatedLengthList.h
index fcd8197..a0217fa 100644
--- a/WebCore/svg/SVGAnimatedLengthList.h
+++ b/WebCore/svg/SVGAnimatedLengthList.h
@@ -28,6 +28,13 @@ namespace WebCore {
typedef SVGAnimatedListPropertyTearOff<SVGLengthList> SVGAnimatedLengthList;
+// Helper macros to declare/define a SVGAnimatedLengthList object
+#define DECLARE_ANIMATED_LENGTH_LIST(UpperProperty, LowerProperty) \
+DECLARE_ANIMATED_LIST_PROPERTY(SVGAnimatedLengthList, SVGLengthList, UpperProperty, LowerProperty)
+
+#define DEFINE_ANIMATED_LENGTH_LIST(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
+DEFINE_ANIMATED_LIST_PROPERTY(OwnerType, DOMAttribute, DOMAttribute.localName(), SVGAnimatedLengthList, SVGLengthList, UpperProperty, LowerProperty)
+
} // namespace WebCore
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGAnimatedNumberList.h b/WebCore/svg/SVGAnimatedNumberList.h
index f86b3c2..8beabaa 100644
--- a/WebCore/svg/SVGAnimatedNumberList.h
+++ b/WebCore/svg/SVGAnimatedNumberList.h
@@ -28,6 +28,13 @@ namespace WebCore {
typedef SVGAnimatedListPropertyTearOff<SVGNumberList> SVGAnimatedNumberList;
+// Helper macros to declare/define a SVGAnimatedNumberList object
+#define DECLARE_ANIMATED_NUMBER_LIST(UpperProperty, LowerProperty) \
+DECLARE_ANIMATED_LIST_PROPERTY(SVGAnimatedNumberList, SVGNumberList, UpperProperty, LowerProperty)
+
+#define DEFINE_ANIMATED_NUMBER_LIST(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
+DEFINE_ANIMATED_LIST_PROPERTY(OwnerType, DOMAttribute, DOMAttribute.localName(), SVGAnimatedNumberList, SVGNumberList, UpperProperty, LowerProperty)
+
} // namespace WebCore
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGAnimatedTransformList.h b/WebCore/svg/SVGAnimatedTransformList.h
index dcf87dd..8caee3c 100644
--- a/WebCore/svg/SVGAnimatedTransformList.h
+++ b/WebCore/svg/SVGAnimatedTransformList.h
@@ -27,6 +27,13 @@ namespace WebCore {
typedef SVGAnimatedTransformListPropertyTearOff SVGAnimatedTransformList;
+// Helper macros to declare/define a SVGAnimatedTransformList object
+#define DECLARE_ANIMATED_TRANSFORM_LIST(UpperProperty, LowerProperty) \
+DECLARE_ANIMATED_LIST_PROPERTY(SVGAnimatedTransformList, SVGTransformList, UpperProperty, LowerProperty)
+
+#define DEFINE_ANIMATED_TRANSFORM_LIST(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
+DEFINE_ANIMATED_LIST_PROPERTY(OwnerType, DOMAttribute, DOMAttribute.localName(), SVGAnimatedTransformList, SVGTransformList, UpperProperty, LowerProperty)
+
} // namespace WebCore
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGComponentTransferFunctionElement.cpp b/WebCore/svg/SVGComponentTransferFunctionElement.cpp
index dd7c9e4..636b906 100644
--- a/WebCore/svg/SVGComponentTransferFunctionElement.cpp
+++ b/WebCore/svg/SVGComponentTransferFunctionElement.cpp
@@ -30,6 +30,9 @@
namespace WebCore {
+// Animated property definitions
+DEFINE_ANIMATED_NUMBER_LIST(SVGComponentTransferFunctionElement, SVGNames::tableValuesAttr, TableValues, tableValues)
+
SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(const QualifiedName& tagName, Document* document)
: SVGElement(tagName, document)
, m_type(FECOMPONENTTRANSFER_TYPE_UNKNOWN)
diff --git a/WebCore/svg/SVGComponentTransferFunctionElement.h b/WebCore/svg/SVGComponentTransferFunctionElement.h
index e02fc16..5ccce7b 100644
--- a/WebCore/svg/SVGComponentTransferFunctionElement.h
+++ b/WebCore/svg/SVGComponentTransferFunctionElement.h
@@ -23,30 +23,31 @@
#if ENABLE(SVG) && ENABLE(FILTERS)
#include "FEComponentTransfer.h"
+#include "SVGAnimatedNumberList.h"
#include "SVGAnimatedPropertyMacros.h"
-#include "SVGNumberList.h"
namespace WebCore {
- class SVGComponentTransferFunctionElement : public SVGElement {
- public:
- ComponentTransferFunction transferFunction() const;
-
- protected:
- SVGComponentTransferFunctionElement(const QualifiedName&, Document*);
-
- virtual void parseMappedAttribute(Attribute*);
- virtual void synchronizeProperty(const QualifiedName&);
-
- private:
- DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::typeAttr, int, Type, type)
- DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::tableValuesAttr, SVGNumberList, TableValues, tableValues)
- DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::slopeAttr, float, Slope, slope)
- DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::interceptAttr, float, Intercept, intercept)
- DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::amplitudeAttr, float, Amplitude, amplitude)
- DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::exponentAttr, float, Exponent, exponent)
- DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::offsetAttr, float, Offset, offset)
- };
+class SVGComponentTransferFunctionElement : public SVGElement {
+public:
+ ComponentTransferFunction transferFunction() const;
+
+protected:
+ SVGComponentTransferFunctionElement(const QualifiedName&, Document*);
+
+ virtual void parseMappedAttribute(Attribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
+
+private:
+ // Animated property declarations
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::typeAttr, int, Type, type)
+ DECLARE_ANIMATED_NUMBER_LIST(TableValues, tableValues)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::slopeAttr, float, Slope, slope)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::interceptAttr, float, Intercept, intercept)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::amplitudeAttr, float, Amplitude, amplitude)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::exponentAttr, float, Exponent, exponent)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGComponentTransferFunctionElement, SVGNames::offsetAttr, float, Offset, offset)
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEColorMatrixElement.cpp b/WebCore/svg/SVGFEColorMatrixElement.cpp
index f02f02e..4ab7700 100644
--- a/WebCore/svg/SVGFEColorMatrixElement.cpp
+++ b/WebCore/svg/SVGFEColorMatrixElement.cpp
@@ -29,6 +29,9 @@
namespace WebCore {
+// Animated property definitions
+DEFINE_ANIMATED_NUMBER_LIST(SVGFEColorMatrixElement, SVGNames::valuesAttr, Values, values)
+
inline SVGFEColorMatrixElement::SVGFEColorMatrixElement(const QualifiedName& tagName, Document* document)
: SVGFilterPrimitiveStandardAttributes(tagName, document)
, m_type(FECOLORMATRIX_TYPE_UNKNOWN)
diff --git a/WebCore/svg/SVGFEColorMatrixElement.h b/WebCore/svg/SVGFEColorMatrixElement.h
index 1b51932..7d7f05d 100644
--- a/WebCore/svg/SVGFEColorMatrixElement.h
+++ b/WebCore/svg/SVGFEColorMatrixElement.h
@@ -23,8 +23,8 @@
#if ENABLE(SVG) && ENABLE(FILTERS)
#include "FEColorMatrix.h"
+#include "SVGAnimatedNumberList.h"
#include "SVGFilterPrimitiveStandardAttributes.h"
-#include "SVGNumberList.h"
namespace WebCore {
@@ -40,9 +40,10 @@ private:
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*);
+ // Animated property declarations
DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEColorMatrixElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEColorMatrixElement, SVGNames::typeAttr, int, Type, type)
- DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGFEColorMatrixElement, SVGNames::valuesAttr, SVGNumberList, Values, values)
+ DECLARE_ANIMATED_NUMBER_LIST(Values, values)
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEConvolveMatrixElement.cpp b/WebCore/svg/SVGFEConvolveMatrixElement.cpp
index 6c2c248..9b18bad 100644
--- a/WebCore/svg/SVGFEConvolveMatrixElement.cpp
+++ b/WebCore/svg/SVGFEConvolveMatrixElement.cpp
@@ -24,17 +24,16 @@
#include "Attr.h"
#include "FloatPoint.h"
-#include "FloatSize.h"
#include "IntPoint.h"
#include "IntSize.h"
#include "SVGNames.h"
-#include "SVGNumberList.h"
#include "SVGParserUtilities.h"
-#include <math.h>
-
namespace WebCore {
+// Animated property definitions
+DEFINE_ANIMATED_NUMBER_LIST(SVGFEConvolveMatrixElement, SVGNames::kernelMatrixAttr, KernelMatrix, kernelMatrix)
+
inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(const QualifiedName& tagName, Document* document)
: SVGFilterPrimitiveStandardAttributes(tagName, document)
, m_edgeMode(EDGEMODE_DUPLICATE)
diff --git a/WebCore/svg/SVGFEConvolveMatrixElement.h b/WebCore/svg/SVGFEConvolveMatrixElement.h
index c9bc4d8..bec40dc 100644
--- a/WebCore/svg/SVGFEConvolveMatrixElement.h
+++ b/WebCore/svg/SVGFEConvolveMatrixElement.h
@@ -22,8 +22,8 @@
#if ENABLE(SVG) && ENABLE(FILTERS)
#include "FEConvolveMatrix.h"
+#include "SVGAnimatedNumberList.h"
#include "SVGFilterPrimitiveStandardAttributes.h"
-#include "SVGNumberList.h"
namespace WebCore {
@@ -46,10 +46,11 @@ private:
static const AtomicString& kernelUnitLengthXIdentifier();
static const AtomicString& kernelUnitLengthYIdentifier();
+ // Animated property declarations
DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFEConvolveMatrixElement, SVGNames::orderAttr, orderXIdentifier(), long, OrderX, orderX)
DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFEConvolveMatrixElement, SVGNames::orderAttr, orderYIdentifier(), long, OrderY, orderY)
- DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::kernelMatrixAttr, SVGNumberList, KernelMatrix, kernelMatrix)
+ DECLARE_ANIMATED_NUMBER_LIST(KernelMatrix, kernelMatrix)
DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::divisorAttr, float, Divisor, divisor)
DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::biasAttr, float, Bias, bias)
DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::targetXAttr, long, TargetX, targetX)
diff --git a/WebCore/svg/SVGGradientElement.cpp b/WebCore/svg/SVGGradientElement.cpp
index 7ec66ce..88c0fba 100644
--- a/WebCore/svg/SVGGradientElement.cpp
+++ b/WebCore/svg/SVGGradientElement.cpp
@@ -38,6 +38,9 @@
namespace WebCore {
+// Animated property definitions
+DEFINE_ANIMATED_TRANSFORM_LIST(SVGGradientElement, SVGNames::gradientTransformAttr, GradientTransform, gradientTransform)
+
SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document* document)
: SVGStyledElement(tagName, document)
, m_gradientUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
diff --git a/WebCore/svg/SVGGradientElement.h b/WebCore/svg/SVGGradientElement.h
index 1b28e22..606a983 100644
--- a/WebCore/svg/SVGGradientElement.h
+++ b/WebCore/svg/SVGGradientElement.h
@@ -27,39 +27,39 @@
#include "SVGAnimatedTransformList.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGStyledElement.h"
-#include "SVGTransformList.h"
#include "SVGURIReference.h"
namespace WebCore {
- class SVGGradientElement : public SVGStyledElement,
- public SVGURIReference,
- public SVGExternalResourcesRequired {
- public:
- Vector<Gradient::ColorStop> buildStops();
+class SVGGradientElement : public SVGStyledElement,
+ public SVGURIReference,
+ public SVGExternalResourcesRequired {
+public:
+ Vector<Gradient::ColorStop> buildStops();
- protected:
- SVGGradientElement(const QualifiedName&, Document*);
+protected:
+ SVGGradientElement(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&);
- private:
- virtual bool needsPendingResourceHandling() const { return false; }
+private:
+ virtual bool needsPendingResourceHandling() const { return false; }
- virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+ virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
- DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGradientElement, SVGNames::spreadMethodAttr, int, SpreadMethod, spreadMethod)
- DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGradientElement, SVGNames::gradientUnitsAttr, int, GradientUnits, gradientUnits)
- DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY_NEW(SVGGradientElement, SVGNames::gradientTransformAttr, SVGTransformList, GradientTransform, gradientTransform)
+ // Animated property declarations
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGradientElement, SVGNames::spreadMethodAttr, int, SpreadMethod, spreadMethod)
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGradientElement, SVGNames::gradientUnitsAttr, int, GradientUnits, gradientUnits)
+ DECLARE_ANIMATED_TRANSFORM_LIST(GradientTransform, gradientTransform)
- // SVGURIReference
- DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGradientElement, XLinkNames::hrefAttr, String, Href, href)
+ // SVGURIReference
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGradientElement, XLinkNames::hrefAttr, String, Href, href)
- // SVGExternalResourcesRequired
- DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGradientElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
- };
+ // SVGExternalResourcesRequired
+ DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGradientElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPatternElement.cpp b/WebCore/svg/SVGPatternElement.cpp
index fa8dd1c..11f04d2 100644
--- a/WebCore/svg/SVGPatternElement.cpp
+++ b/WebCore/svg/SVGPatternElement.cpp
@@ -37,7 +37,6 @@
#include "SVGRenderSupport.h"
#include "SVGSVGElement.h"
#include "SVGStyledTransformableElement.h"
-#include "SVGTransformList.h"
#include "SVGTransformable.h"
#include "SVGUnitTypes.h"
@@ -48,6 +47,7 @@ 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)
+DEFINE_ANIMATED_TRANSFORM_LIST(SVGPatternElement, SVGNames::patternTransformAttr, PatternTransform, patternTransform)
inline SVGPatternElement::SVGPatternElement(const QualifiedName& tagName, Document* document)
: SVGStyledElement(tagName, document)
diff --git a/WebCore/svg/SVGPatternElement.h b/WebCore/svg/SVGPatternElement.h
index 243d58b..b0c4446 100644
--- a/WebCore/svg/SVGPatternElement.h
+++ b/WebCore/svg/SVGPatternElement.h
@@ -32,7 +32,6 @@
#include "SVGRect.h"
#include "SVGStyledElement.h"
#include "SVGTests.h"
-#include "SVGTransformList.h"
#include "SVGURIReference.h"
namespace WebCore {
@@ -72,7 +71,7 @@ private:
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)
+ DECLARE_ANIMATED_TRANSFORM_LIST(PatternTransform, patternTransform)
// SVGURIReference
DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPatternElement, XLinkNames::hrefAttr, String, Href, href)
diff --git a/WebCore/svg/SVGPolygonElement.cpp b/WebCore/svg/SVGPolygonElement.cpp
index 3439a78..f0bca35 100644
--- a/WebCore/svg/SVGPolygonElement.cpp
+++ b/WebCore/svg/SVGPolygonElement.cpp
@@ -23,6 +23,8 @@
#if ENABLE(SVG)
#include "SVGPolygonElement.h"
+#include "Path.h"
+
namespace WebCore {
inline SVGPolygonElement::SVGPolygonElement(const QualifiedName& tagName, Document* document)
diff --git a/WebCore/svg/SVGPolylineElement.cpp b/WebCore/svg/SVGPolylineElement.cpp
index 8bd6d7b..e72173b 100644
--- a/WebCore/svg/SVGPolylineElement.cpp
+++ b/WebCore/svg/SVGPolylineElement.cpp
@@ -23,6 +23,8 @@
#if ENABLE(SVG)
#include "SVGPolylineElement.h"
+#include "Path.h"
+
namespace WebCore {
inline SVGPolylineElement::SVGPolylineElement(const QualifiedName& tagName, Document* document)
diff --git a/WebCore/svg/SVGStyledTransformableElement.cpp b/WebCore/svg/SVGStyledTransformableElement.cpp
index dec0af9..18f902a 100644
--- a/WebCore/svg/SVGStyledTransformableElement.cpp
+++ b/WebCore/svg/SVGStyledTransformableElement.cpp
@@ -32,6 +32,9 @@
namespace WebCore {
+// Animated property definitions
+DEFINE_ANIMATED_TRANSFORM_LIST(SVGStyledTransformableElement, SVGNames::transformAttr, Transform, transform)
+
SVGStyledTransformableElement::SVGStyledTransformableElement(const QualifiedName& tagName, Document* document)
: SVGStyledLocatableElement(tagName, document)
{
diff --git a/WebCore/svg/SVGStyledTransformableElement.h b/WebCore/svg/SVGStyledTransformableElement.h
index 54907c1..1d882e5 100644
--- a/WebCore/svg/SVGStyledTransformableElement.h
+++ b/WebCore/svg/SVGStyledTransformableElement.h
@@ -22,14 +22,14 @@
#define SVGStyledTransformableElement_h
#if ENABLE(SVG)
-#include "Path.h"
-#include "SVGAnimatedPropertyMacros.h"
+#include "SVGAnimatedTransformList.h"
#include "SVGStyledLocatableElement.h"
#include "SVGTransformable.h"
namespace WebCore {
class AffineTransform;
+class Path;
class SVGStyledTransformableElement : public SVGStyledLocatableElement,
public SVGTransformable {
@@ -60,7 +60,8 @@ protected:
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
- DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY_NEW(SVGStyledTransformableElement, SVGNames::transformAttr, SVGTransformList, Transform, transform)
+ // Animated property declarations
+ DECLARE_ANIMATED_TRANSFORM_LIST(Transform, transform)
private:
virtual bool isStyledTransformable() const { return true; }
diff --git a/WebCore/svg/SVGTextElement.cpp b/WebCore/svg/SVGTextElement.cpp
index 2e80cdd..dc7ce55 100644
--- a/WebCore/svg/SVGTextElement.cpp
+++ b/WebCore/svg/SVGTextElement.cpp
@@ -35,9 +35,11 @@
namespace WebCore {
+// Animated property definitions
+DEFINE_ANIMATED_TRANSFORM_LIST(SVGTextElement, SVGNames::transformAttr, Transform, transform)
+
inline SVGTextElement::SVGTextElement(const QualifiedName& tagName, Document* doc)
: SVGTextPositioningElement(tagName, doc)
- , SVGTransformable()
{
}
diff --git a/WebCore/svg/SVGTextElement.h b/WebCore/svg/SVGTextElement.h
index 3bfee46..8dda8c6 100644
--- a/WebCore/svg/SVGTextElement.h
+++ b/WebCore/svg/SVGTextElement.h
@@ -28,38 +28,39 @@
namespace WebCore {
- class SVGTextElement : public SVGTextPositioningElement,
- public SVGTransformable {
- public:
- static PassRefPtr<SVGTextElement> create(const QualifiedName&, Document*);
+class SVGTextElement : public SVGTextPositioningElement,
+ public SVGTransformable {
+public:
+ static PassRefPtr<SVGTextElement> create(const QualifiedName&, Document*);
- virtual SVGElement* nearestViewportElement() const;
- virtual SVGElement* farthestViewportElement() const;
+ virtual SVGElement* nearestViewportElement() const;
+ virtual SVGElement* farthestViewportElement() const;
- virtual FloatRect getBBox(StyleUpdateStrategy = AllowStyleUpdate) const;
- virtual AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
- virtual AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
- virtual AffineTransform animatedLocalTransform() const;
+ virtual FloatRect getBBox(StyleUpdateStrategy = AllowStyleUpdate) const;
+ virtual AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
+ virtual AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
+ virtual AffineTransform animatedLocalTransform() const;
- private:
- SVGTextElement(const QualifiedName&, Document*);
+private:
+ SVGTextElement(const QualifiedName&, Document*);
- virtual void parseMappedAttribute(Attribute*);
+ virtual void parseMappedAttribute(Attribute*);
- virtual AffineTransform* supplementalTransform();
- virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope mode) const { return SVGTransformable::localCoordinateSpaceTransform(mode); }
+ virtual AffineTransform* supplementalTransform();
+ virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope mode) const { return SVGTransformable::localCoordinateSpaceTransform(mode); }
- virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- virtual bool childShouldCreateRenderer(Node*) const;
-
- virtual void svgAttributeChanged(const QualifiedName&);
- virtual void synchronizeProperty(const QualifiedName&);
+ virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+ virtual bool childShouldCreateRenderer(Node*) const;
+
+ virtual void svgAttributeChanged(const QualifiedName&);
+ virtual void synchronizeProperty(const QualifiedName&);
- DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY_NEW(SVGTextElement, SVGNames::transformAttr, SVGTransformList, Transform, transform)
-
- // Used by <animateMotion>
- OwnPtr<AffineTransform> m_supplementalTransform;
- };
+ // Animated property declarations
+ DECLARE_ANIMATED_TRANSFORM_LIST(Transform, transform)
+
+ // Used by <animateMotion>
+ OwnPtr<AffineTransform> m_supplementalTransform;
+};
} // namespace WebCore
diff --git a/WebCore/svg/SVGTextPositioningElement.cpp b/WebCore/svg/SVGTextPositioningElement.cpp
index bb65262..544d192 100644
--- a/WebCore/svg/SVGTextPositioningElement.cpp
+++ b/WebCore/svg/SVGTextPositioningElement.cpp
@@ -32,6 +32,13 @@
namespace WebCore {
+// Animated property definitions
+DEFINE_ANIMATED_LENGTH_LIST(SVGTextPositioningElement, SVGNames::xAttr, X, x)
+DEFINE_ANIMATED_LENGTH_LIST(SVGTextPositioningElement, SVGNames::yAttr, Y, y)
+DEFINE_ANIMATED_LENGTH_LIST(SVGTextPositioningElement, SVGNames::dxAttr, Dx, dx)
+DEFINE_ANIMATED_LENGTH_LIST(SVGTextPositioningElement, SVGNames::dyAttr, Dy, dy)
+DEFINE_ANIMATED_NUMBER_LIST(SVGTextPositioningElement, SVGNames::rotateAttr, Rotate, rotate)
+
SVGTextPositioningElement::SVGTextPositioningElement(const QualifiedName& tagName, Document* document)
: SVGTextContentElement(tagName, document)
{
diff --git a/WebCore/svg/SVGTextPositioningElement.h b/WebCore/svg/SVGTextPositioningElement.h
index ce5c798..e4bc4ea 100644
--- a/WebCore/svg/SVGTextPositioningElement.h
+++ b/WebCore/svg/SVGTextPositioningElement.h
@@ -22,9 +22,9 @@
#define SVGTextPositioningElement_h
#if ENABLE(SVG)
+#include "SVGAnimatedLengthList.h"
+#include "SVGAnimatedNumberList.h"
#include "SVGTextContentElement.h"
-#include "SVGLengthList.h"
-#include "SVGNumberList.h"
namespace WebCore {
@@ -42,11 +42,12 @@ protected:
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)
+ // Animated property declarations
+ DECLARE_ANIMATED_LENGTH_LIST(X, x)
+ DECLARE_ANIMATED_LENGTH_LIST(Y, y)
+ DECLARE_ANIMATED_LENGTH_LIST(Dx, dx)
+ DECLARE_ANIMATED_LENGTH_LIST(Dy, dy)
+ DECLARE_ANIMATED_NUMBER_LIST(Rotate, rotate)
};
} // namespace WebCore
diff --git a/WebCore/svg/properties/SVGAnimatedPropertyMacros.h b/WebCore/svg/properties/SVGAnimatedPropertyMacros.h
index 53f4361..a24a25d 100644
--- a/WebCore/svg/properties/SVGAnimatedPropertyMacros.h
+++ b/WebCore/svg/properties/SVGAnimatedPropertyMacros.h
@@ -143,30 +143,6 @@ DECLARE_ANIMATED_PROPERTY_NEW_SHARED(OwnerType, DOMAttribute, SVGDOMAttributeIde
#define DECLARE_ANIMATED_STATIC_PROPERTY_NEW(OwnerType, DOMAttribute, PropertyType, UpperProperty, LowerProperty) \
DECLARE_ANIMATED_PROPERTY_NEW_SHARED(OwnerType, DOMAttribute, DOMAttribute.localName(), SVGAnimatedStaticPropertyTearOff<PropertyType>, PropertyType, UpperProperty, LowerProperty)
-#define DECLARE_ANIMATED_LIST_PROPERTY_NEW(OwnerType, DOMAttribute, PropertyType, UpperProperty, LowerProperty) \
-DECLARE_ANIMATED_PROPERTY_NEW_SHARED(OwnerType, DOMAttribute, DOMAttribute.localName(), SVGAnimatedListPropertyTearOff<PropertyType>, PropertyType, UpperProperty, LowerProperty) \
-\
-void detachAnimated##UpperProperty##ListWrappers(unsigned newListSize) \
-{ \
- SVGElement* contextElement = GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value>::ownerElement(this); \
- SVGAnimatedProperty* wrapper = SVGAnimatedProperty::lookupWrapper<SVGAnimatedListPropertyTearOff<PropertyType> >(contextElement, DOMAttribute.localName()); \
- if (!wrapper) \
- return; \
- static_cast<SVGAnimatedListPropertyTearOff<PropertyType>*>(wrapper)->detachListWrappers(newListSize); \
-}
-
-#define DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY_NEW(OwnerType, DOMAttribute, PropertyType, UpperProperty, LowerProperty) \
-DECLARE_ANIMATED_PROPERTY_NEW_SHARED(OwnerType, DOMAttribute, DOMAttribute.localName(), SVGAnimatedTransformListPropertyTearOff, PropertyType, UpperProperty, LowerProperty) \
-\
-void detachAnimated##UpperProperty##ListWrappers(unsigned newListSize) \
-{ \
- SVGElement* contextElement = GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value>::ownerElement(this); \
- SVGAnimatedProperty* wrapper = SVGAnimatedProperty::lookupWrapper<SVGAnimatedTransformListPropertyTearOff>(contextElement, DOMAttribute.localName()); \
- if (!wrapper) \
- return; \
- 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) \
@@ -203,12 +179,28 @@ void set##UpperProperty##BaseValue(const PropertyType& type) \
m_##LowerProperty.value = type; \
} \
\
-void synchronize##UpperProperty(); \
PassRefPtr<TearOffType> LowerProperty##Animated(); \
\
private: \
+ void synchronize##UpperProperty(); \
+\
mutable SVGSynchronizableAnimatedProperty<PropertyType> m_##LowerProperty;
+#define DECLARE_ANIMATED_LIST_PROPERTY(TearOffType, PropertyType, UpperProperty, LowerProperty) \
+DECLARE_ANIMATED_PROPERTY(TearOffType, PropertyType, UpperProperty, LowerProperty) \
+void detachAnimated##UpperProperty##ListWrappers(unsigned newListSize);
+
+#define DEFINE_ANIMATED_LIST_PROPERTY(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, TearOffType, PropertyType, UpperProperty, LowerProperty) \
+DEFINE_ANIMATED_PROPERTY(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, TearOffType, PropertyType, UpperProperty, LowerProperty) \
+void OwnerType::detachAnimated##UpperProperty##ListWrappers(unsigned newListSize) \
+{ \
+ SVGElement* contextElement = GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value>::ownerElement(this); \
+ SVGAnimatedProperty* wrapper = SVGAnimatedProperty::lookupWrapper<TearOffType>(contextElement, DOMAttribute.localName()); \
+ if (!wrapper) \
+ return; \
+ static_cast<TearOffType*>(wrapper)->detachListWrappers(newListSize); \
+}
+
}
#endif // ENABLE(SVG)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list