summaryrefslogtreecommitdiffstats
path: root/WebCore/svg
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/svg')
-rw-r--r--WebCore/svg/SVGAElement.cpp13
-rw-r--r--WebCore/svg/SVGAElement.h7
-rw-r--r--WebCore/svg/SVGAltGlyphElement.cpp7
-rw-r--r--WebCore/svg/SVGAltGlyphElement.h17
-rw-r--r--WebCore/svg/SVGAngle.cpp19
-rw-r--r--WebCore/svg/SVGAngle.h7
-rw-r--r--WebCore/svg/SVGAnimateColorElement.cpp9
-rw-r--r--WebCore/svg/SVGAnimateColorElement.h3
-rw-r--r--WebCore/svg/SVGAnimateElement.cpp9
-rw-r--r--WebCore/svg/SVGAnimateElement.h8
-rw-r--r--WebCore/svg/SVGAnimateMotionElement.cpp7
-rw-r--r--WebCore/svg/SVGAnimateMotionElement.h5
-rw-r--r--WebCore/svg/SVGAnimateTransformElement.cpp7
-rw-r--r--WebCore/svg/SVGAnimateTransformElement.h5
-rw-r--r--WebCore/svg/SVGAnimatedPathData.cpp41
-rw-r--r--WebCore/svg/SVGAnimatedPathData.h5
-rw-r--r--WebCore/svg/SVGAnimatedPoints.cpp41
-rw-r--r--WebCore/svg/SVGAnimatedPoints.h4
-rw-r--r--WebCore/svg/SVGAnimationElement.cpp10
-rw-r--r--WebCore/svg/SVGAnimationElement.h15
-rw-r--r--WebCore/svg/SVGCircleElement.cpp10
-rw-r--r--WebCore/svg/SVGCircleElement.h5
-rw-r--r--WebCore/svg/SVGClipPathElement.cpp10
-rw-r--r--WebCore/svg/SVGClipPathElement.h5
-rw-r--r--WebCore/svg/SVGColor.cpp15
-rw-r--r--WebCore/svg/SVGColor.h11
-rw-r--r--WebCore/svg/SVGComponentTransferFunctionElement.cpp14
-rw-r--r--WebCore/svg/SVGComponentTransferFunctionElement.h6
-rw-r--r--WebCore/svg/SVGCursorElement.cpp12
-rw-r--r--WebCore/svg/SVGCursorElement.h7
-rw-r--r--WebCore/svg/SVGDefsElement.cpp10
-rw-r--r--WebCore/svg/SVGDefsElement.h5
-rw-r--r--WebCore/svg/SVGDescElement.cpp8
-rw-r--r--WebCore/svg/SVGDescElement.h6
-rw-r--r--WebCore/svg/SVGDocument.cpp4
-rw-r--r--WebCore/svg/SVGDocument.h2
-rw-r--r--WebCore/svg/SVGDocumentExtensions.cpp10
-rw-r--r--WebCore/svg/SVGDocumentExtensions.h2
-rw-r--r--WebCore/svg/SVGElement.cpp4
-rw-r--r--WebCore/svg/SVGElement.h10
-rw-r--r--WebCore/svg/SVGElementInstanceList.h5
-rw-r--r--WebCore/svg/SVGEllipseElement.cpp10
-rw-r--r--WebCore/svg/SVGEllipseElement.h5
-rw-r--r--WebCore/svg/SVGExternalResourcesRequired.cpp10
-rw-r--r--WebCore/svg/SVGExternalResourcesRequired.h3
-rw-r--r--WebCore/svg/SVGFEBlendElement.cpp7
-rw-r--r--WebCore/svg/SVGFEBlendElement.h5
-rw-r--r--WebCore/svg/SVGFEColorMatrixElement.cpp7
-rw-r--r--WebCore/svg/SVGFEColorMatrixElement.h5
-rw-r--r--WebCore/svg/SVGFEComponentTransferElement.cpp7
-rw-r--r--WebCore/svg/SVGFEComponentTransferElement.h5
-rw-r--r--WebCore/svg/SVGFECompositeElement.cpp7
-rw-r--r--WebCore/svg/SVGFECompositeElement.h5
-rw-r--r--WebCore/svg/SVGFEConvolveMatrixElement.cpp7
-rw-r--r--WebCore/svg/SVGFEConvolveMatrixElement.h7
-rw-r--r--WebCore/svg/SVGFEDiffuseLightingElement.cpp11
-rw-r--r--WebCore/svg/SVGFEDiffuseLightingElement.h5
-rw-r--r--WebCore/svg/SVGFEDisplacementMapElement.cpp7
-rw-r--r--WebCore/svg/SVGFEDisplacementMapElement.h9
-rw-r--r--WebCore/svg/SVGFEDistantLightElement.cpp7
-rw-r--r--WebCore/svg/SVGFEDistantLightElement.h5
-rw-r--r--WebCore/svg/SVGFEFloodElement.cpp7
-rw-r--r--WebCore/svg/SVGFEFloodElement.h5
-rw-r--r--WebCore/svg/SVGFEFuncAElement.cpp7
-rw-r--r--WebCore/svg/SVGFEFuncAElement.h5
-rw-r--r--WebCore/svg/SVGFEFuncBElement.cpp7
-rw-r--r--WebCore/svg/SVGFEFuncBElement.h5
-rw-r--r--WebCore/svg/SVGFEFuncGElement.cpp7
-rw-r--r--WebCore/svg/SVGFEFuncGElement.h5
-rw-r--r--WebCore/svg/SVGFEFuncRElement.cpp7
-rw-r--r--WebCore/svg/SVGFEFuncRElement.h5
-rw-r--r--WebCore/svg/SVGFEGaussianBlurElement.cpp7
-rw-r--r--WebCore/svg/SVGFEGaussianBlurElement.h7
-rw-r--r--WebCore/svg/SVGFEImageElement.cpp12
-rw-r--r--WebCore/svg/SVGFEImageElement.h7
-rw-r--r--WebCore/svg/SVGFELightElement.cpp10
-rw-r--r--WebCore/svg/SVGFELightElement.h9
-rw-r--r--WebCore/svg/SVGFEMergeElement.cpp7
-rw-r--r--WebCore/svg/SVGFEMergeElement.h4
-rw-r--r--WebCore/svg/SVGFEMergeNodeElement.cpp7
-rw-r--r--WebCore/svg/SVGFEMergeNodeElement.h5
-rw-r--r--WebCore/svg/SVGFEMorphologyElement.cpp5
-rw-r--r--WebCore/svg/SVGFEMorphologyElement.h7
-rw-r--r--WebCore/svg/SVGFEOffsetElement.cpp7
-rw-r--r--WebCore/svg/SVGFEOffsetElement.h5
-rw-r--r--WebCore/svg/SVGFEPointLightElement.cpp10
-rw-r--r--WebCore/svg/SVGFEPointLightElement.h7
-rw-r--r--WebCore/svg/SVGFESpecularLightingElement.cpp13
-rw-r--r--WebCore/svg/SVGFESpecularLightingElement.h5
-rw-r--r--WebCore/svg/SVGFESpotLightElement.cpp7
-rw-r--r--WebCore/svg/SVGFESpotLightElement.h5
-rw-r--r--WebCore/svg/SVGFETileElement.cpp7
-rw-r--r--WebCore/svg/SVGFETileElement.h5
-rw-r--r--WebCore/svg/SVGFETurbulenceElement.cpp7
-rw-r--r--WebCore/svg/SVGFETurbulenceElement.h5
-rw-r--r--WebCore/svg/SVGFilterElement.cpp7
-rw-r--r--WebCore/svg/SVGFilterElement.h23
-rw-r--r--WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp8
-rw-r--r--WebCore/svg/SVGFilterPrimitiveStandardAttributes.h15
-rw-r--r--WebCore/svg/SVGFitToViewBox.cpp8
-rw-r--r--WebCore/svg/SVGFitToViewBox.h3
-rw-r--r--WebCore/svg/SVGFontData.cpp4
-rw-r--r--WebCore/svg/SVGFontData.h2
-rw-r--r--WebCore/svg/SVGFontElement.cpp7
-rw-r--r--WebCore/svg/SVGFontElement.h16
-rw-r--r--WebCore/svg/SVGFontFaceElement.cpp13
-rw-r--r--WebCore/svg/SVGFontFaceElement.h17
-rw-r--r--WebCore/svg/SVGFontFaceFormatElement.cpp9
-rw-r--r--WebCore/svg/SVGFontFaceFormatElement.h3
-rw-r--r--WebCore/svg/SVGFontFaceNameElement.cpp9
-rw-r--r--WebCore/svg/SVGFontFaceNameElement.h7
-rw-r--r--WebCore/svg/SVGFontFaceSrcElement.cpp9
-rw-r--r--WebCore/svg/SVGFontFaceSrcElement.h9
-rw-r--r--WebCore/svg/SVGFontFaceUriElement.cpp9
-rw-r--r--WebCore/svg/SVGFontFaceUriElement.h13
-rw-r--r--WebCore/svg/SVGForeignObjectElement.cpp10
-rw-r--r--WebCore/svg/SVGForeignObjectElement.h7
-rw-r--r--WebCore/svg/SVGGElement.cpp10
-rw-r--r--WebCore/svg/SVGGElement.h12
-rw-r--r--WebCore/svg/SVGGlyphElement.cpp7
-rw-r--r--WebCore/svg/SVGGlyphElement.h20
-rw-r--r--WebCore/svg/SVGGradientElement.cpp10
-rw-r--r--WebCore/svg/SVGGradientElement.h12
-rw-r--r--WebCore/svg/SVGHKernElement.cpp7
-rw-r--r--WebCore/svg/SVGHKernElement.h15
-rw-r--r--WebCore/svg/SVGImageElement.cpp16
-rw-r--r--WebCore/svg/SVGImageElement.h6
-rw-r--r--WebCore/svg/SVGImageLoader.cpp4
-rw-r--r--WebCore/svg/SVGImageLoader.h2
-rw-r--r--WebCore/svg/SVGLangSpace.cpp13
-rw-r--r--WebCore/svg/SVGLangSpace.h5
-rw-r--r--WebCore/svg/SVGLengthList.cpp4
-rw-r--r--WebCore/svg/SVGLengthList.h3
-rw-r--r--WebCore/svg/SVGLineElement.cpp10
-rw-r--r--WebCore/svg/SVGLineElement.h5
-rw-r--r--WebCore/svg/SVGLinearGradientElement.cpp7
-rw-r--r--WebCore/svg/SVGLinearGradientElement.h11
-rw-r--r--WebCore/svg/SVGLocatable.cpp8
-rw-r--r--WebCore/svg/SVGLocatable.h3
-rw-r--r--WebCore/svg/SVGMPathElement.cpp7
-rw-r--r--WebCore/svg/SVGMPathElement.h9
-rw-r--r--WebCore/svg/SVGMarkerElement.cpp10
-rw-r--r--WebCore/svg/SVGMarkerElement.h11
-rw-r--r--WebCore/svg/SVGMaskElement.cpp10
-rw-r--r--WebCore/svg/SVGMaskElement.h8
-rw-r--r--WebCore/svg/SVGMetadataElement.cpp11
-rw-r--r--WebCore/svg/SVGMetadataElement.h5
-rw-r--r--WebCore/svg/SVGMissingGlyphElement.cpp9
-rw-r--r--WebCore/svg/SVGMissingGlyphElement.h4
-rw-r--r--WebCore/svg/SVGNumberList.cpp4
-rw-r--r--WebCore/svg/SVGNumberList.h1
-rw-r--r--WebCore/svg/SVGPaint.cpp4
-rw-r--r--WebCore/svg/SVGPaint.h6
-rw-r--r--WebCore/svg/SVGParserUtilities.cpp11
-rw-r--r--WebCore/svg/SVGPathBlender.cpp4
-rw-r--r--WebCore/svg/SVGPathBlender.h1
-rw-r--r--WebCore/svg/SVGPathBuilder.h4
-rw-r--r--WebCore/svg/SVGPathByteStreamBuilder.h5
-rw-r--r--WebCore/svg/SVGPathByteStreamSource.cpp4
-rw-r--r--WebCore/svg/SVGPathByteStreamSource.h6
-rw-r--r--WebCore/svg/SVGPathConsumer.h3
-rw-r--r--WebCore/svg/SVGPathElement.cpp10
-rw-r--r--WebCore/svg/SVGPathElement.h15
-rw-r--r--WebCore/svg/SVGPathParser.cpp4
-rw-r--r--WebCore/svg/SVGPathParser.h1
-rw-r--r--WebCore/svg/SVGPathSeg.cpp14
-rw-r--r--WebCore/svg/SVGPathSeg.h24
-rw-r--r--WebCore/svg/SVGPathSegArc.h12
-rw-r--r--WebCore/svg/SVGPathSegClosePath.cpp42
-rw-r--r--WebCore/svg/SVGPathSegClosePath.h7
-rw-r--r--WebCore/svg/SVGPathSegCurvetoCubic.h14
-rw-r--r--WebCore/svg/SVGPathSegCurvetoCubicSmooth.h19
-rw-r--r--WebCore/svg/SVGPathSegCurvetoQuadratic.h19
-rw-r--r--WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h12
-rw-r--r--WebCore/svg/SVGPathSegLineto.h12
-rw-r--r--WebCore/svg/SVGPathSegLinetoHorizontal.h12
-rw-r--r--WebCore/svg/SVGPathSegLinetoVertical.h12
-rw-r--r--WebCore/svg/SVGPathSegList.cpp4
-rw-r--r--WebCore/svg/SVGPathSegList.h1
-rw-r--r--WebCore/svg/SVGPathSegListBuilder.h4
-rw-r--r--WebCore/svg/SVGPathSegListSource.cpp4
-rw-r--r--WebCore/svg/SVGPathSegListSource.h6
-rw-r--r--WebCore/svg/SVGPathSegMoveto.h12
-rw-r--r--WebCore/svg/SVGPathSource.h3
-rw-r--r--WebCore/svg/SVGPathStringBuilder.cpp4
-rw-r--r--WebCore/svg/SVGPathStringBuilder.h6
-rw-r--r--WebCore/svg/SVGPathStringSource.cpp4
-rw-r--r--WebCore/svg/SVGPathStringSource.h5
-rw-r--r--WebCore/svg/SVGPatternElement.cpp12
-rw-r--r--WebCore/svg/SVGPatternElement.h9
-rw-r--r--WebCore/svg/SVGPointList.cpp4
-rw-r--r--WebCore/svg/SVGPointList.h1
-rw-r--r--WebCore/svg/SVGPolyElement.cpp12
-rw-r--r--WebCore/svg/SVGPolyElement.h12
-rw-r--r--WebCore/svg/SVGPolygonElement.cpp7
-rw-r--r--WebCore/svg/SVGPolygonElement.h4
-rw-r--r--WebCore/svg/SVGPolylineElement.cpp7
-rw-r--r--WebCore/svg/SVGPolylineElement.h4
-rw-r--r--WebCore/svg/SVGPreserveAspectRatio.cpp4
-rw-r--r--WebCore/svg/SVGPreserveAspectRatio.h1
-rw-r--r--WebCore/svg/SVGRadialGradientElement.cpp7
-rw-r--r--WebCore/svg/SVGRadialGradientElement.h11
-rw-r--r--WebCore/svg/SVGRectElement.cpp10
-rw-r--r--WebCore/svg/SVGRectElement.h5
-rw-r--r--WebCore/svg/SVGSVGElement.cpp14
-rw-r--r--WebCore/svg/SVGSVGElement.h28
-rw-r--r--WebCore/svg/SVGScriptElement.cpp9
-rw-r--r--WebCore/svg/SVGScriptElement.h13
-rw-r--r--WebCore/svg/SVGSetElement.cpp10
-rw-r--r--WebCore/svg/SVGSetElement.h4
-rw-r--r--WebCore/svg/SVGStopElement.cpp7
-rw-r--r--WebCore/svg/SVGStopElement.h9
-rw-r--r--WebCore/svg/SVGStringList.cpp4
-rw-r--r--WebCore/svg/SVGStringList.h1
-rw-r--r--WebCore/svg/SVGStylable.cpp39
-rw-r--r--WebCore/svg/SVGStylable.h4
-rw-r--r--WebCore/svg/SVGStyleElement.cpp8
-rw-r--r--WebCore/svg/SVGStyleElement.h25
-rw-r--r--WebCore/svg/SVGStyledElement.cpp8
-rw-r--r--WebCore/svg/SVGStyledElement.h30
-rw-r--r--WebCore/svg/SVGStyledLocatableElement.cpp9
-rw-r--r--WebCore/svg/SVGStyledLocatableElement.h11
-rw-r--r--WebCore/svg/SVGStyledTransformableElement.cpp9
-rw-r--r--WebCore/svg/SVGStyledTransformableElement.h14
-rw-r--r--WebCore/svg/SVGSwitchElement.cpp13
-rw-r--r--WebCore/svg/SVGSwitchElement.h5
-rw-r--r--WebCore/svg/SVGSymbolElement.cpp10
-rw-r--r--WebCore/svg/SVGSymbolElement.h5
-rw-r--r--WebCore/svg/SVGTRefElement.cpp8
-rw-r--r--WebCore/svg/SVGTRefElement.h7
-rw-r--r--WebCore/svg/SVGTSpanElement.cpp7
-rw-r--r--WebCore/svg/SVGTSpanElement.h6
-rw-r--r--WebCore/svg/SVGTests.cpp5
-rw-r--r--WebCore/svg/SVGTests.h9
-rw-r--r--WebCore/svg/SVGTextContentElement.cpp11
-rw-r--r--WebCore/svg/SVGTextContentElement.h18
-rw-r--r--WebCore/svg/SVGTextElement.cpp5
-rw-r--r--WebCore/svg/SVGTextElement.h16
-rw-r--r--WebCore/svg/SVGTextPathElement.cpp8
-rw-r--r--WebCore/svg/SVGTextPathElement.h9
-rw-r--r--WebCore/svg/SVGTextPositioningElement.cpp8
-rw-r--r--WebCore/svg/SVGTextPositioningElement.h4
-rw-r--r--WebCore/svg/SVGTitleElement.cpp9
-rw-r--r--WebCore/svg/SVGTitleElement.h4
-rw-r--r--WebCore/svg/SVGTransform.cpp4
-rw-r--r--WebCore/svg/SVGTransform.h3
-rw-r--r--WebCore/svg/SVGTransformable.cpp9
-rw-r--r--WebCore/svg/SVGTransformable.h3
-rw-r--r--WebCore/svg/SVGURIReference.cpp8
-rw-r--r--WebCore/svg/SVGURIReference.h3
-rw-r--r--WebCore/svg/SVGUseElement.cpp15
-rw-r--r--WebCore/svg/SVGUseElement.h16
-rw-r--r--WebCore/svg/SVGVKernElement.cpp7
-rw-r--r--WebCore/svg/SVGVKernElement.h8
-rw-r--r--WebCore/svg/SVGViewElement.cpp10
-rw-r--r--WebCore/svg/SVGViewElement.h9
-rw-r--r--WebCore/svg/SVGViewSpec.cpp8
-rw-r--r--WebCore/svg/SVGViewSpec.h1
-rw-r--r--WebCore/svg/SVGZoomAndPan.cpp14
-rw-r--r--WebCore/svg/SVGZoomAndPan.h10
-rw-r--r--WebCore/svg/SVGZoomEvent.cpp4
-rw-r--r--WebCore/svg/SVGZoomEvent.h5
-rw-r--r--WebCore/svg/graphics/SVGImage.cpp2
-rw-r--r--WebCore/svg/svgtags.in160
264 files changed, 1085 insertions, 1328 deletions
diff --git a/WebCore/svg/SVGAElement.cpp b/WebCore/svg/SVGAElement.cpp
index a2a4e73..b0ffc74 100644
--- a/WebCore/svg/SVGAElement.cpp
+++ b/WebCore/svg/SVGAElement.cpp
@@ -45,17 +45,14 @@
namespace WebCore {
-SVGAElement::SVGAElement(const QualifiedName& tagName, Document *doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGURIReference()
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGAElement::SVGAElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
{
}
-SVGAElement::~SVGAElement()
+PassRefPtr<SVGAElement> SVGAElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGAElement(tagName, document));
}
String SVGAElement::title() const
@@ -222,7 +219,7 @@ bool SVGAElement::childShouldCreateRenderer(Node* child) const
if (child->hasTagName(SVGNames::aTag))
return false;
if (parent() && parent()->isSVGElement())
- return static_cast<SVGElement*>(parent())->childShouldCreateRenderer(child);
+ return parent()->childShouldCreateRenderer(child);
return SVGElement::childShouldCreateRenderer(child);
}
diff --git a/WebCore/svg/SVGAElement.h b/WebCore/svg/SVGAElement.h
index 3debf8a..b43f192 100644
--- a/WebCore/svg/SVGAElement.h
+++ b/WebCore/svg/SVGAElement.h
@@ -23,6 +23,7 @@
#define SVGAElement_h
#if ENABLE(SVG)
+
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
#include "SVGStyledTransformableElement.h"
@@ -37,8 +38,10 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGAElement> create(const QualifiedName&, Document*);
+
+ private:
SVGAElement(const QualifiedName&, Document*);
- virtual ~SVGAElement();
virtual bool isValid() const { return SVGTests::isValid(); }
@@ -59,7 +62,6 @@ namespace WebCore {
virtual bool childShouldCreateRenderer(Node*) const;
- private:
DECLARE_ANIMATED_PROPERTY(SVGAElement, SVGNames::targetAttr, String, Target, target)
// SVGURIReference
@@ -72,4 +74,5 @@ namespace WebCore {
} // namespace WebCore
#endif // ENABLE(SVG)
+
#endif // SVGAElement_h
diff --git a/WebCore/svg/SVGAltGlyphElement.cpp b/WebCore/svg/SVGAltGlyphElement.cpp
index 16808b9..2280d90 100644
--- a/WebCore/svg/SVGAltGlyphElement.cpp
+++ b/WebCore/svg/SVGAltGlyphElement.cpp
@@ -33,13 +33,14 @@
namespace WebCore {
-SVGAltGlyphElement::SVGAltGlyphElement(const QualifiedName& tagName, Document* doc)
- : SVGTextPositioningElement(tagName, doc)
+inline SVGAltGlyphElement::SVGAltGlyphElement(const QualifiedName& tagName, Document* document)
+ : SVGTextPositioningElement(tagName, document)
{
}
-SVGAltGlyphElement::~SVGAltGlyphElement()
+PassRefPtr<SVGAltGlyphElement> SVGAltGlyphElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGAltGlyphElement(tagName, document));
}
void SVGAltGlyphElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGAltGlyphElement.h b/WebCore/svg/SVGAltGlyphElement.h
index cc5364b..ae0903a 100644
--- a/WebCore/svg/SVGAltGlyphElement.h
+++ b/WebCore/svg/SVGAltGlyphElement.h
@@ -34,13 +34,7 @@ namespace WebCore {
class SVGAltGlyphElement : public SVGTextPositioningElement,
public SVGURIReference {
public:
- SVGAltGlyphElement(const QualifiedName&, Document*);
- virtual ~SVGAltGlyphElement();
-
- virtual void synchronizeProperty(const QualifiedName&);
-
- virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- bool childShouldCreateRenderer(Node*) const;
+ static PassRefPtr<SVGAltGlyphElement> create(const QualifiedName&, Document*);
const AtomicString& glyphRef() const;
void setGlyphRef(const AtomicString&, ExceptionCode&);
@@ -49,7 +43,14 @@ namespace WebCore {
SVGGlyphElement* glyphElement() const;
- private:
+ private:
+ SVGAltGlyphElement(const QualifiedName&, Document*);
+
+ virtual void synchronizeProperty(const QualifiedName&);
+
+ virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+ virtual bool childShouldCreateRenderer(Node*) const;
+
// SVGURIReference
DECLARE_ANIMATED_PROPERTY(SVGAltGlyphElement, XLinkNames::hrefAttr, String, Href, href)
};
diff --git a/WebCore/svg/SVGAngle.cpp b/WebCore/svg/SVGAngle.cpp
index 4d65ad0..6702904 100644
--- a/WebCore/svg/SVGAngle.cpp
+++ b/WebCore/svg/SVGAngle.cpp
@@ -34,25 +34,11 @@ SVGAngle::SVGAngle()
{
}
-SVGAngle::~SVGAngle()
-{
-}
-
-SVGAngle::SVGAngleType SVGAngle::unitType() const
-{
- return m_unitType;
-}
-
void SVGAngle::setValue(float value)
{
m_value = value;
}
-float SVGAngle::value() const
-{
- return m_value;
-}
-
// calc m_value
void SVGAngle::calculate()
{
@@ -70,11 +56,6 @@ void SVGAngle::setValueInSpecifiedUnits(float valueInSpecifiedUnits)
calculate();
}
-float SVGAngle::valueInSpecifiedUnits() const
-{
- return m_valueInSpecifiedUnits;
-}
-
void SVGAngle::setValueAsString(const String& s)
{
m_valueAsString = s;
diff --git a/WebCore/svg/SVGAngle.h b/WebCore/svg/SVGAngle.h
index 289b8c6..de5c3ce 100644
--- a/WebCore/svg/SVGAngle.h
+++ b/WebCore/svg/SVGAngle.h
@@ -29,7 +29,6 @@ namespace WebCore {
class SVGAngle {
public:
SVGAngle();
- virtual ~SVGAngle();
enum SVGAngleType {
SVG_ANGLETYPE_UNKNOWN = 0,
@@ -39,13 +38,13 @@ namespace WebCore {
SVG_ANGLETYPE_GRAD = 4
};
- SVGAngleType unitType() const;
+ SVGAngleType unitType() const { return m_unitType; }
void setValue(float);
- float value() const;
+ float value() const { return m_value; }
void setValueInSpecifiedUnits(float valueInSpecifiedUnits);
- float valueInSpecifiedUnits() const;
+ float valueInSpecifiedUnits() const { return m_valueInSpecifiedUnits; }
void setValueAsString(const String&);
String valueAsString() const;
diff --git a/WebCore/svg/SVGAnimateColorElement.cpp b/WebCore/svg/SVGAnimateColorElement.cpp
index d5166cf..3960b3e 100644
--- a/WebCore/svg/SVGAnimateColorElement.cpp
+++ b/WebCore/svg/SVGAnimateColorElement.cpp
@@ -25,11 +25,16 @@
namespace WebCore {
-SVGAnimateColorElement::SVGAnimateColorElement(const QualifiedName& tagName, Document* doc)
- : SVGAnimateElement(tagName, doc)
+inline SVGAnimateColorElement::SVGAnimateColorElement(const QualifiedName& tagName, Document* document)
+ : SVGAnimateElement(tagName, document)
{
}
+PassRefPtr<SVGAnimateColorElement> SVGAnimateColorElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGAnimateColorElement(tagName, document));
+}
+
}
// vim:ts=4:noet
diff --git a/WebCore/svg/SVGAnimateColorElement.h b/WebCore/svg/SVGAnimateColorElement.h
index ad9a774..d36c8de 100644
--- a/WebCore/svg/SVGAnimateColorElement.h
+++ b/WebCore/svg/SVGAnimateColorElement.h
@@ -30,6 +30,9 @@ namespace WebCore {
// SVGAnimateElement implements superset of the functionality.
class SVGAnimateColorElement : public SVGAnimateElement {
public:
+ static PassRefPtr<SVGAnimateColorElement> create(const QualifiedName&, Document*);
+
+ private:
SVGAnimateColorElement(const QualifiedName&, Document*);
};
diff --git a/WebCore/svg/SVGAnimateElement.cpp b/WebCore/svg/SVGAnimateElement.cpp
index df0c3bc..c47a378 100644
--- a/WebCore/svg/SVGAnimateElement.cpp
+++ b/WebCore/svg/SVGAnimateElement.cpp
@@ -36,8 +36,8 @@ using namespace std;
namespace WebCore {
-SVGAnimateElement::SVGAnimateElement(const QualifiedName& tagName, Document* doc)
- : SVGAnimationElement(tagName, doc)
+SVGAnimateElement::SVGAnimateElement(const QualifiedName& tagName, Document* document)
+ : SVGAnimationElement(tagName, document)
, m_propertyType(StringProperty)
, m_fromNumber(0)
, m_toNumber(0)
@@ -46,6 +46,11 @@ SVGAnimateElement::SVGAnimateElement(const QualifiedName& tagName, Document* doc
{
}
+PassRefPtr<SVGAnimateElement> SVGAnimateElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGAnimateElement(tagName, document));
+}
+
SVGAnimateElement::~SVGAnimateElement()
{
}
diff --git a/WebCore/svg/SVGAnimateElement.h b/WebCore/svg/SVGAnimateElement.h
index 43522a7..9993d84 100644
--- a/WebCore/svg/SVGAnimateElement.h
+++ b/WebCore/svg/SVGAnimateElement.h
@@ -30,15 +30,19 @@
#include <wtf/OwnPtr.h>
namespace WebCore {
+
class SVGPathSegList;
class SVGPointList;
class SVGAnimateElement : public SVGAnimationElement {
public:
- SVGAnimateElement(const QualifiedName&, Document*);
+ static PassRefPtr<SVGAnimateElement> create(const QualifiedName&, Document*);
+
virtual ~SVGAnimateElement();
-
+
protected:
+ SVGAnimateElement(const QualifiedName&, Document*);
+
virtual void resetToBaseValue(const String&);
virtual bool calculateFromAndToValues(const String& fromString, const String& toString);
virtual bool calculateFromAndByValues(const String& fromString, const String& byString);
diff --git a/WebCore/svg/SVGAnimateMotionElement.cpp b/WebCore/svg/SVGAnimateMotionElement.cpp
index 4ddda73..ffa201b 100644
--- a/WebCore/svg/SVGAnimateMotionElement.cpp
+++ b/WebCore/svg/SVGAnimateMotionElement.cpp
@@ -40,15 +40,16 @@ namespace WebCore {
using namespace SVGNames;
-SVGAnimateMotionElement::SVGAnimateMotionElement(const QualifiedName& tagName, Document* doc)
- : SVGAnimationElement(tagName, doc)
+inline SVGAnimateMotionElement::SVGAnimateMotionElement(const QualifiedName& tagName, Document* document)
+ : SVGAnimationElement(tagName, document)
, m_baseIndexInTransformList(0)
, m_angle(0)
{
}
-SVGAnimateMotionElement::~SVGAnimateMotionElement()
+PassRefPtr<SVGAnimateMotionElement> SVGAnimateMotionElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGAnimateMotionElement(tagName, document));
}
bool SVGAnimateMotionElement::hasValidTarget() const
diff --git a/WebCore/svg/SVGAnimateMotionElement.h b/WebCore/svg/SVGAnimateMotionElement.h
index ec189f9..225a076 100644
--- a/WebCore/svg/SVGAnimateMotionElement.h
+++ b/WebCore/svg/SVGAnimateMotionElement.h
@@ -29,14 +29,15 @@ namespace WebCore {
class SVGAnimateMotionElement : public SVGAnimationElement {
public:
+ static PassRefPtr<SVGAnimateMotionElement> create(const QualifiedName&, Document*);
+
+ private:
SVGAnimateMotionElement(const QualifiedName&, Document*);
- virtual ~SVGAnimateMotionElement();
virtual bool hasValidTarget() const;
virtual void parseMappedAttribute(Attribute*);
- private:
virtual void resetToBaseValue(const String&);
virtual bool calculateFromAndToValues(const String& fromString, const String& toString);
virtual bool calculateFromAndByValues(const String& fromString, const String& byString);
diff --git a/WebCore/svg/SVGAnimateTransformElement.cpp b/WebCore/svg/SVGAnimateTransformElement.cpp
index 0c27f0a..7471ea7 100644
--- a/WebCore/svg/SVGAnimateTransformElement.cpp
+++ b/WebCore/svg/SVGAnimateTransformElement.cpp
@@ -46,15 +46,16 @@ using namespace std;
namespace WebCore {
-SVGAnimateTransformElement::SVGAnimateTransformElement(const QualifiedName& tagName, Document* doc)
- : SVGAnimationElement(tagName, doc)
+inline SVGAnimateTransformElement::SVGAnimateTransformElement(const QualifiedName& tagName, Document* document)
+ : SVGAnimationElement(tagName, document)
, m_type(SVGTransform::SVG_TRANSFORM_UNKNOWN)
, m_baseIndexInTransformList(0)
{
}
-SVGAnimateTransformElement::~SVGAnimateTransformElement()
+PassRefPtr<SVGAnimateTransformElement> SVGAnimateTransformElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGAnimateTransformElement(tagName, document));
}
bool SVGAnimateTransformElement::hasValidTarget() const
diff --git a/WebCore/svg/SVGAnimateTransformElement.h b/WebCore/svg/SVGAnimateTransformElement.h
index bf3de36..0f806d7 100644
--- a/WebCore/svg/SVGAnimateTransformElement.h
+++ b/WebCore/svg/SVGAnimateTransformElement.h
@@ -34,14 +34,15 @@ class AffineTransform;
class SVGAnimateTransformElement : public SVGAnimationElement {
public:
+ static PassRefPtr<SVGAnimateTransformElement> create(const QualifiedName&, Document*);
+
+private:
SVGAnimateTransformElement(const QualifiedName&, Document*);
- virtual ~SVGAnimateTransformElement();
virtual bool hasValidTarget() const;
virtual void parseMappedAttribute(Attribute*);
-private:
virtual void resetToBaseValue(const String&);
virtual bool calculateFromAndToValues(const String& fromString, const String& toString);
virtual bool calculateFromAndByValues(const String& fromString, const String& byString);
diff --git a/WebCore/svg/SVGAnimatedPathData.cpp b/WebCore/svg/SVGAnimatedPathData.cpp
index 8ae4acd..6f54888 100644
--- a/WebCore/svg/SVGAnimatedPathData.cpp
+++ b/WebCore/svg/SVGAnimatedPathData.cpp
@@ -1,40 +1 @@
-/*
- * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-
-#if ENABLE(SVG)
-#include "SVGAnimatedPathData.h"
-
-namespace WebCore {
-
-SVGAnimatedPathData::SVGAnimatedPathData()
-{
-}
-
-SVGAnimatedPathData::~SVGAnimatedPathData()
-{
-}
-
-}
-
-#endif // ENABLE(SVG)
-
-// vim:ts=4:noet
+// This file is now intentionally empty. Delete it after removing it from all the build systems and project files.
diff --git a/WebCore/svg/SVGAnimatedPathData.h b/WebCore/svg/SVGAnimatedPathData.h
index 399b61b..5ff66d3 100644
--- a/WebCore/svg/SVGAnimatedPathData.h
+++ b/WebCore/svg/SVGAnimatedPathData.h
@@ -24,14 +24,13 @@
#if ENABLE(SVG)
namespace WebCore {
+
class SVGPathSegList;
class SVGAnimatedPathData {
public:
- SVGAnimatedPathData();
- virtual ~SVGAnimatedPathData();
+ virtual ~SVGAnimatedPathData() { }
- // 'SVGAnimatedPathData' functions
virtual SVGPathSegList* pathSegList() const = 0;
virtual SVGPathSegList* normalizedPathSegList() const = 0;
virtual SVGPathSegList* animatedPathSegList() const = 0;
diff --git a/WebCore/svg/SVGAnimatedPoints.cpp b/WebCore/svg/SVGAnimatedPoints.cpp
index 1b73309..6f54888 100644
--- a/WebCore/svg/SVGAnimatedPoints.cpp
+++ b/WebCore/svg/SVGAnimatedPoints.cpp
@@ -1,40 +1 @@
-/*
- * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-
-#if ENABLE(SVG)
-#include "SVGAnimatedPoints.h"
-
-namespace WebCore {
-
-SVGAnimatedPoints::SVGAnimatedPoints()
-{
-}
-
-SVGAnimatedPoints::~SVGAnimatedPoints()
-{
-}
-
-}
-
-#endif // ENABLE(SVG)
-
-// vim:ts=4:noet
+// This file is now intentionally empty. Delete it after removing it from all the build systems and project files.
diff --git a/WebCore/svg/SVGAnimatedPoints.h b/WebCore/svg/SVGAnimatedPoints.h
index ec2f2ae..a62f60c 100644
--- a/WebCore/svg/SVGAnimatedPoints.h
+++ b/WebCore/svg/SVGAnimatedPoints.h
@@ -24,12 +24,12 @@
#if ENABLE(SVG)
namespace WebCore {
+
class SVGPointList;
class SVGAnimatedPoints {
public:
- SVGAnimatedPoints();
- virtual ~SVGAnimatedPoints();
+ virtual ~SVGAnimatedPoints() { }
// 'SVGAnimatedPoints' functions
virtual SVGPointList* points() const = 0;
diff --git a/WebCore/svg/SVGAnimationElement.cpp b/WebCore/svg/SVGAnimationElement.cpp
index 513274e..b5eaafc 100644
--- a/WebCore/svg/SVGAnimationElement.cpp
+++ b/WebCore/svg/SVGAnimationElement.cpp
@@ -52,18 +52,12 @@ using namespace std;
namespace WebCore {
-SVGAnimationElement::SVGAnimationElement(const QualifiedName& tagName, Document* doc)
- : SVGSMILElement(tagName, doc)
- , SVGTests()
- , SVGExternalResourcesRequired()
+SVGAnimationElement::SVGAnimationElement(const QualifiedName& tagName, Document* document)
+ : SVGSMILElement(tagName, document)
, m_animationValid(false)
{
}
-SVGAnimationElement::~SVGAnimationElement()
-{
-}
-
static void parseKeyTimes(const String& parse, Vector<float>& result, bool verifyOrder)
{
result.clear();
diff --git a/WebCore/svg/SVGAnimationElement.h b/WebCore/svg/SVGAnimationElement.h
index 8e49460..da48dd6 100644
--- a/WebCore/svg/SVGAnimationElement.h
+++ b/WebCore/svg/SVGAnimationElement.h
@@ -44,13 +44,6 @@ namespace WebCore {
public SVGExternalResourcesRequired,
public ElementTimeControl {
public:
- SVGAnimationElement(const QualifiedName&, Document*);
- virtual ~SVGAnimationElement();
-
- virtual void parseMappedAttribute(Attribute*);
- virtual void attributeChanged(Attribute*, bool preserveDecls);
- virtual void synchronizeProperty(const QualifiedName&);
-
// SVGAnimationElement
float getStartTime() const;
float getCurrentTime() const;
@@ -65,6 +58,10 @@ namespace WebCore {
static bool attributeIsCSS(const String& attributeName);
protected:
+ SVGAnimationElement(const QualifiedName&, Document*);
+
+ virtual void parseMappedAttribute(Attribute*);
+
enum CalcMode { CalcModeDiscrete, CalcModeLinear, CalcModePaced, CalcModeSpline };
CalcMode calcMode() const;
@@ -93,6 +90,9 @@ namespace WebCore {
virtual void endedActiveInterval();
private:
+ virtual void attributeChanged(Attribute*, bool preserveDecls);
+ virtual void synchronizeProperty(const QualifiedName&);
+
virtual bool calculateFromAndToValues(const String& fromString, const String& toString) = 0;
virtual bool calculateFromAndByValues(const String& fromString, const String& byString) = 0;
virtual void calculateAnimatedValue(float percentage, unsigned repeat, SVGSMILElement* resultElement) = 0;
@@ -105,7 +105,6 @@ namespace WebCore {
void currentValuesFromKeyPoints(float percent, float& effectivePercent, String& from, String& to) const;
float calculatePercentForSpline(float percent, unsigned splineIndex) const;
- protected:
// SVGExternalResourcesRequired
DECLARE_ANIMATED_PROPERTY(SVGAnimationElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
diff --git a/WebCore/svg/SVGCircleElement.cpp b/WebCore/svg/SVGCircleElement.cpp
index ffbaa7b..b5a5184 100644
--- a/WebCore/svg/SVGCircleElement.cpp
+++ b/WebCore/svg/SVGCircleElement.cpp
@@ -32,19 +32,17 @@
namespace WebCore {
-SVGCircleElement::SVGCircleElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGCircleElement::SVGCircleElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
, m_cx(LengthModeWidth)
, m_cy(LengthModeHeight)
, m_r(LengthModeOther)
{
}
-SVGCircleElement::~SVGCircleElement()
+PassRefPtr<SVGCircleElement> SVGCircleElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGCircleElement(tagName, document));
}
void SVGCircleElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGCircleElement.h b/WebCore/svg/SVGCircleElement.h
index f436b3c..dd11792 100644
--- a/WebCore/svg/SVGCircleElement.h
+++ b/WebCore/svg/SVGCircleElement.h
@@ -34,8 +34,10 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGCircleElement> create(const QualifiedName&, Document*);
+
+ private:
SVGCircleElement(const QualifiedName&, Document*);
- virtual ~SVGCircleElement();
virtual bool isValid() const { return SVGTests::isValid(); }
@@ -45,7 +47,6 @@ namespace WebCore {
virtual Path toPathData() const;
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGCircleElement, SVGNames::cxAttr, SVGLength, Cx, cx)
diff --git a/WebCore/svg/SVGClipPathElement.cpp b/WebCore/svg/SVGClipPathElement.cpp
index baaae96..715a34e 100644
--- a/WebCore/svg/SVGClipPathElement.cpp
+++ b/WebCore/svg/SVGClipPathElement.cpp
@@ -34,17 +34,15 @@
namespace WebCore {
-SVGClipPathElement::SVGClipPathElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGClipPathElement::SVGClipPathElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
, m_clipPathUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
{
}
-SVGClipPathElement::~SVGClipPathElement()
+PassRefPtr<SVGClipPathElement> SVGClipPathElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGClipPathElement(tagName, document));
}
void SVGClipPathElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGClipPathElement.h b/WebCore/svg/SVGClipPathElement.h
index 85dd05e..7d8ada2 100644
--- a/WebCore/svg/SVGClipPathElement.h
+++ b/WebCore/svg/SVGClipPathElement.h
@@ -35,8 +35,10 @@ class SVGClipPathElement : public SVGStyledTransformableElement,
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGClipPathElement> create(const QualifiedName&, Document*);
+
+private:
SVGClipPathElement(const QualifiedName&, Document*);
- virtual ~SVGClipPathElement();
virtual bool isValid() const { return SVGTests::isValid(); }
virtual bool needsPendingResourceHandling() const { return false; }
@@ -48,7 +50,6 @@ public:
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGClipPathElement, SVGNames::clipPathUnitsAttr, int, ClipPathUnits, clipPathUnits)
// SVGExternalResourcesRequired
diff --git a/WebCore/svg/SVGColor.cpp b/WebCore/svg/SVGColor.cpp
index bacead9..75900ad 100644
--- a/WebCore/svg/SVGColor.cpp
+++ b/WebCore/svg/SVGColor.cpp
@@ -50,16 +50,6 @@ SVGColor::SVGColor(const Color& c)
{
}
-
-SVGColor::~SVGColor()
-{
-}
-
-unsigned short SVGColor::colorType() const
-{
- return m_colorType;
-}
-
PassRefPtr<RGBColor> SVGColor::rgbColor() const
{
return RGBColor::create(m_color.rgb());
@@ -103,11 +93,6 @@ String SVGColor::cssText() const
return String();
}
-const Color& SVGColor::color() const
-{
- return m_color;
-}
-
}
// vim:ts=4:noet
diff --git a/WebCore/svg/SVGColor.h b/WebCore/svg/SVGColor.h
index c181b6b..f8b55f0 100644
--- a/WebCore/svg/SVGColor.h
+++ b/WebCore/svg/SVGColor.h
@@ -45,8 +45,6 @@ namespace WebCore {
return adoptRef(new SVGColor(SVG_COLORTYPE_CURRENTCOLOR));
}
- virtual ~SVGColor();
-
enum SVGColorType {
SVG_COLORTYPE_UNKNOWN = 0,
SVG_COLORTYPE_RGBCOLOR = 1,
@@ -55,7 +53,7 @@ namespace WebCore {
};
// 'SVGColor' functions
- unsigned short colorType() const;
+ unsigned short colorType() const { return m_colorType; }
PassRefPtr<RGBColor> rgbColor() const;
@@ -66,16 +64,15 @@ namespace WebCore {
void setRGBColorICCColor(const String& rgbColor, const String& iccColor, ExceptionCode&);
void setColor(unsigned short colorType, const String& rgbColor, const String& iccColor, ExceptionCode&);
- virtual String cssText() const;
-
- // Helpers
- const Color& color() const;
+ const Color& color() const { return m_color; }
protected:
SVGColor();
SVGColor(const String& color);
SVGColor(const Color&);
+ virtual String cssText() const;
+
private:
SVGColor(SVGColorType);
diff --git a/WebCore/svg/SVGComponentTransferFunctionElement.cpp b/WebCore/svg/SVGComponentTransferFunctionElement.cpp
index 7c6cb85..c1750d7 100644
--- a/WebCore/svg/SVGComponentTransferFunctionElement.cpp
+++ b/WebCore/svg/SVGComponentTransferFunctionElement.cpp
@@ -30,17 +30,13 @@
namespace WebCore {
-SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
, m_type(FECOMPONENTTRANSFER_TYPE_UNKNOWN)
, m_tableValues(SVGNumberList::create(SVGNames::tableValuesAttr))
- , m_slope(1.0f)
- , m_amplitude(1.0f)
- , m_exponent(1.0f)
-{
-}
-
-SVGComponentTransferFunctionElement::~SVGComponentTransferFunctionElement()
+ , m_slope(1)
+ , m_amplitude(1)
+ , m_exponent(1)
{
}
diff --git a/WebCore/svg/SVGComponentTransferFunctionElement.h b/WebCore/svg/SVGComponentTransferFunctionElement.h
index 91f0767..8b888af 100644
--- a/WebCore/svg/SVGComponentTransferFunctionElement.h
+++ b/WebCore/svg/SVGComponentTransferFunctionElement.h
@@ -31,14 +31,14 @@ namespace WebCore {
class SVGComponentTransferFunctionElement : public SVGElement {
public:
+ ComponentTransferFunction transferFunction() const;
+
+ protected:
SVGComponentTransferFunctionElement(const QualifiedName&, Document*);
- virtual ~SVGComponentTransferFunctionElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
- ComponentTransferFunction transferFunction() const;
-
private:
DECLARE_ANIMATED_PROPERTY(SVGComponentTransferFunctionElement, SVGNames::typeAttr, int, Type, type)
DECLARE_ANIMATED_PROPERTY(SVGComponentTransferFunctionElement, SVGNames::tableValuesAttr, SVGNumberList*, TableValues, tableValues)
diff --git a/WebCore/svg/SVGCursorElement.cpp b/WebCore/svg/SVGCursorElement.cpp
index cc3dfd1..9fb4140 100644
--- a/WebCore/svg/SVGCursorElement.cpp
+++ b/WebCore/svg/SVGCursorElement.cpp
@@ -30,16 +30,18 @@
namespace WebCore {
-SVGCursorElement::SVGCursorElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
- , SVGTests()
- , SVGExternalResourcesRequired()
- , SVGURIReference()
+inline SVGCursorElement::SVGCursorElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
, m_x(LengthModeWidth)
, m_y(LengthModeHeight)
{
}
+PassRefPtr<SVGCursorElement> SVGCursorElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGCursorElement(tagName, document));
+}
+
SVGCursorElement::~SVGCursorElement()
{
HashSet<SVGElement*>::iterator end = m_clients.end();
diff --git a/WebCore/svg/SVGCursorElement.h b/WebCore/svg/SVGCursorElement.h
index fe2d647..ce4d129 100644
--- a/WebCore/svg/SVGCursorElement.h
+++ b/WebCore/svg/SVGCursorElement.h
@@ -35,12 +35,16 @@ namespace WebCore {
public SVGExternalResourcesRequired,
public SVGURIReference {
public:
- SVGCursorElement(const QualifiedName&, Document*);
+ static PassRefPtr<SVGCursorElement> create(const QualifiedName&, Document*);
+
virtual ~SVGCursorElement();
void addClient(SVGElement*);
void removeClient(SVGElement*);
+ private:
+ SVGCursorElement(const QualifiedName&, Document*);
+
virtual bool isValid() const { return SVGTests::isValid(); }
virtual void parseMappedAttribute(Attribute*);
@@ -49,7 +53,6 @@ namespace WebCore {
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
- private:
DECLARE_ANIMATED_PROPERTY(SVGCursorElement, SVGNames::xAttr, SVGLength, X, x)
DECLARE_ANIMATED_PROPERTY(SVGCursorElement, SVGNames::yAttr, SVGLength, Y, y)
diff --git a/WebCore/svg/SVGDefsElement.cpp b/WebCore/svg/SVGDefsElement.cpp
index 660e0d1..4f5a582 100644
--- a/WebCore/svg/SVGDefsElement.cpp
+++ b/WebCore/svg/SVGDefsElement.cpp
@@ -27,16 +27,14 @@
namespace WebCore {
-SVGDefsElement::SVGDefsElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGDefsElement::SVGDefsElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
{
}
-SVGDefsElement::~SVGDefsElement()
+PassRefPtr<SVGDefsElement> SVGDefsElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGDefsElement(tagName, document));
}
bool SVGDefsElement::isValid() const
diff --git a/WebCore/svg/SVGDefsElement.h b/WebCore/svg/SVGDefsElement.h
index 1d84dd5..4a60bb5 100644
--- a/WebCore/svg/SVGDefsElement.h
+++ b/WebCore/svg/SVGDefsElement.h
@@ -34,15 +34,16 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGDefsElement> create(const QualifiedName&, Document*);
+
+ private:
SVGDefsElement(const QualifiedName&, Document*);
- virtual ~SVGDefsElement();
virtual bool isValid() const;
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual void synchronizeProperty(const QualifiedName&);
- private:
// SVGExternalResourcesRequired
DECLARE_ANIMATED_PROPERTY(SVGDefsElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
diff --git a/WebCore/svg/SVGDescElement.cpp b/WebCore/svg/SVGDescElement.cpp
index 58a7e01..720146c 100644
--- a/WebCore/svg/SVGDescElement.cpp
+++ b/WebCore/svg/SVGDescElement.cpp
@@ -24,14 +24,14 @@
namespace WebCore {
-SVGDescElement::SVGDescElement(const QualifiedName& tagName, Document *doc)
- : SVGStyledElement(tagName, doc)
- , SVGLangSpace()
+inline SVGDescElement::SVGDescElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
{
}
-SVGDescElement::~SVGDescElement()
+PassRefPtr<SVGDescElement> SVGDescElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGDescElement(tagName, document));
}
String SVGDescElement::description() const
diff --git a/WebCore/svg/SVGDescElement.h b/WebCore/svg/SVGDescElement.h
index 23374ef..994007c 100644
--- a/WebCore/svg/SVGDescElement.h
+++ b/WebCore/svg/SVGDescElement.h
@@ -30,11 +30,13 @@ namespace WebCore {
class SVGDescElement : public SVGStyledElement,
public SVGLangSpace {
public:
- SVGDescElement(const QualifiedName&, Document*);
- virtual ~SVGDescElement();
+ static PassRefPtr<SVGDescElement> create(const QualifiedName&, Document*);
String description() const;
+ private:
+ SVGDescElement(const QualifiedName&, Document*);
+
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
};
diff --git a/WebCore/svg/SVGDocument.cpp b/WebCore/svg/SVGDocument.cpp
index c31ca9e..e6d53a4 100644
--- a/WebCore/svg/SVGDocument.cpp
+++ b/WebCore/svg/SVGDocument.cpp
@@ -40,10 +40,6 @@ SVGDocument::SVGDocument(Frame* frame, const KURL& url)
{
}
-SVGDocument::~SVGDocument()
-{
-}
-
SVGSVGElement* SVGDocument::rootElement() const
{
Element* elem = documentElement();
diff --git a/WebCore/svg/SVGDocument.h b/WebCore/svg/SVGDocument.h
index b5d4076..58e3518 100644
--- a/WebCore/svg/SVGDocument.h
+++ b/WebCore/svg/SVGDocument.h
@@ -38,8 +38,6 @@ namespace WebCore {
return adoptRef(new SVGDocument(frame, url));
}
- virtual ~SVGDocument();
-
SVGSVGElement* rootElement() const;
void dispatchZoomEvent(float prevScale, float newScale);
diff --git a/WebCore/svg/SVGDocumentExtensions.cpp b/WebCore/svg/SVGDocumentExtensions.cpp
index 819d12b..011859a 100644
--- a/WebCore/svg/SVGDocumentExtensions.cpp
+++ b/WebCore/svg/SVGDocumentExtensions.cpp
@@ -40,9 +40,9 @@
namespace WebCore {
-SVGDocumentExtensions::SVGDocumentExtensions(Document* doc)
- : m_doc(doc)
- , m_resourcesCache(new SVGResourcesCache)
+SVGDocumentExtensions::SVGDocumentExtensions(Document* document)
+ : m_document(document)
+ , m_resourcesCache(adoptPtr(new SVGResourcesCache))
{
}
@@ -148,12 +148,12 @@ static void reportMessage(Document* document, MessageLevel level, const String&
void SVGDocumentExtensions::reportWarning(const String& message)
{
- reportMessage(m_doc, WarningMessageLevel, "Warning: " + message);
+ reportMessage(m_document, WarningMessageLevel, "Warning: " + message);
}
void SVGDocumentExtensions::reportError(const String& message)
{
- reportMessage(m_doc, ErrorMessageLevel, "Error: " + message);
+ reportMessage(m_document, ErrorMessageLevel, "Error: " + message);
}
void SVGDocumentExtensions::addPendingResource(const AtomicString& id, SVGStyledElement* obj)
diff --git a/WebCore/svg/SVGDocumentExtensions.h b/WebCore/svg/SVGDocumentExtensions.h
index da23cd0..e716e10 100644
--- a/WebCore/svg/SVGDocumentExtensions.h
+++ b/WebCore/svg/SVGDocumentExtensions.h
@@ -61,7 +61,7 @@ public:
SVGResourcesCache* resourcesCache() const { return m_resourcesCache.get(); }
private:
- Document* m_doc; // weak reference
+ Document* m_document; // weak reference
HashSet<SVGSVGElement*> m_timeContainers; // For SVG 1.2 support this will need to be made more general.
HashMap<AtomicString, RenderSVGResourceContainer*> m_resources;
HashMap<AtomicString, HashSet<SVGStyledElement*>*> m_pendingResources;
diff --git a/WebCore/svg/SVGElement.cpp b/WebCore/svg/SVGElement.cpp
index 37e4930..ee16e8f 100644
--- a/WebCore/svg/SVGElement.cpp
+++ b/WebCore/svg/SVGElement.cpp
@@ -52,13 +52,13 @@ namespace WebCore {
using namespace HTMLNames;
SVGElement::SVGElement(const QualifiedName& tagName, Document* document)
- : StyledElement(tagName, document, CreateSVGElementZeroRefCount)
+ : StyledElement(tagName, document, CreateSVGElement)
{
}
PassRefPtr<SVGElement> SVGElement::create(const QualifiedName& tagName, Document* document)
{
- return new SVGElement(tagName, document);
+ return adoptRef(new SVGElement(tagName, document));
}
SVGElement::~SVGElement()
diff --git a/WebCore/svg/SVGElement.h b/WebCore/svg/SVGElement.h
index 255c7be..fb28279 100644
--- a/WebCore/svg/SVGElement.h
+++ b/WebCore/svg/SVGElement.h
@@ -49,8 +49,6 @@ namespace WebCore {
SVGDocumentExtensions* accessDocumentSVGExtensions() const;
- virtual void parseMappedAttribute(Attribute*);
-
virtual bool isStyled() const { return false; }
virtual bool isStyledTransformable() const { return false; }
virtual bool isStyledLocatable() const { return false; }
@@ -62,9 +60,6 @@ namespace WebCore {
// For SVGTests
virtual bool isValid() const { return true; }
- virtual bool rendererIsNeeded(RenderStyle*) { return false; }
- virtual bool childShouldCreateRenderer(Node*) const;
-
virtual void svgAttributeChanged(const QualifiedName&) { }
virtual void synchronizeProperty(const QualifiedName&) { }
@@ -84,9 +79,12 @@ namespace WebCore {
protected:
SVGElement(const QualifiedName&, Document*);
+ virtual void parseMappedAttribute(Attribute*);
+
virtual void finishParsingChildren();
virtual void insertedIntoDocument();
virtual void attributeChanged(Attribute*, bool preserveDecls = false);
+ virtual bool childShouldCreateRenderer(Node*) const;
SVGElementRareData* rareSVGData() const;
SVGElementRareData* ensureRareSVGData();
@@ -94,6 +92,8 @@ namespace WebCore {
private:
friend class SVGElementInstance;
+ virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+
virtual bool isSupported(StringImpl* feature, StringImpl* version) const;
virtual ContainerNode* eventParentNode();
diff --git a/WebCore/svg/SVGElementInstanceList.h b/WebCore/svg/SVGElementInstanceList.h
index 4a4bbcb..87dffe1 100644
--- a/WebCore/svg/SVGElementInstanceList.h
+++ b/WebCore/svg/SVGElementInstanceList.h
@@ -29,14 +29,15 @@ namespace WebCore {
class SVGElementInstanceList : public RefCounted<SVGElementInstanceList> {
public:
- static PassRefPtr<SVGElementInstanceList> create(PassRefPtr<SVGElementInstance> rootInstance) { return adoptRef(new SVGElementInstanceList(rootInstance)); }
+ static PassRefPtr<SVGElementInstanceList> create(PassRefPtr<SVGElementInstance> root) { return adoptRef(new SVGElementInstanceList(root)); }
virtual ~SVGElementInstanceList();
unsigned length() const;
SVGElementInstance* item(unsigned index);
private:
- SVGElementInstanceList(PassRefPtr<SVGElementInstance> rootInstance);
+ SVGElementInstanceList(PassRefPtr<SVGElementInstance>);
+
RefPtr<SVGElementInstance> m_rootInstance;
};
diff --git a/WebCore/svg/SVGEllipseElement.cpp b/WebCore/svg/SVGEllipseElement.cpp
index 128b5e0..5e18910 100644
--- a/WebCore/svg/SVGEllipseElement.cpp
+++ b/WebCore/svg/SVGEllipseElement.cpp
@@ -32,11 +32,8 @@
namespace WebCore {
-SVGEllipseElement::SVGEllipseElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGEllipseElement::SVGEllipseElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
, m_cx(LengthModeWidth)
, m_cy(LengthModeHeight)
, m_rx(LengthModeWidth)
@@ -44,8 +41,9 @@ SVGEllipseElement::SVGEllipseElement(const QualifiedName& tagName, Document* doc
{
}
-SVGEllipseElement::~SVGEllipseElement()
+PassRefPtr<SVGEllipseElement> SVGEllipseElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGEllipseElement(tagName, document));
}
void SVGEllipseElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGEllipseElement.h b/WebCore/svg/SVGEllipseElement.h
index 85ec4c8..bee815c 100644
--- a/WebCore/svg/SVGEllipseElement.h
+++ b/WebCore/svg/SVGEllipseElement.h
@@ -34,8 +34,10 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGEllipseElement> create(const QualifiedName&, Document*);
+
+ private:
SVGEllipseElement(const QualifiedName&, Document*);
- virtual ~SVGEllipseElement();
virtual bool isValid() const { return SVGTests::isValid(); }
@@ -45,7 +47,6 @@ namespace WebCore {
virtual Path toPathData() const;
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGEllipseElement, SVGNames::cxAttr, SVGLength, Cx, cx)
diff --git a/WebCore/svg/SVGExternalResourcesRequired.cpp b/WebCore/svg/SVGExternalResourcesRequired.cpp
index 981b056..c976b0f 100644
--- a/WebCore/svg/SVGExternalResourcesRequired.cpp
+++ b/WebCore/svg/SVGExternalResourcesRequired.cpp
@@ -24,19 +24,9 @@
#include "SVGExternalResourcesRequired.h"
#include "Attr.h"
-#include "SVGElement.h"
-#include "SVGNames.h"
namespace WebCore {
-SVGExternalResourcesRequired::SVGExternalResourcesRequired()
-{
-}
-
-SVGExternalResourcesRequired::~SVGExternalResourcesRequired()
-{
-}
-
bool SVGExternalResourcesRequired::parseMappedAttribute(Attribute* attr)
{
if (attr->name() == SVGNames::externalResourcesRequiredAttr) {
diff --git a/WebCore/svg/SVGExternalResourcesRequired.h b/WebCore/svg/SVGExternalResourcesRequired.h
index 44b6ae7..6322538 100644
--- a/WebCore/svg/SVGExternalResourcesRequired.h
+++ b/WebCore/svg/SVGExternalResourcesRequired.h
@@ -36,8 +36,7 @@ namespace WebCore {
// FIXME: When implementing animVal support, make sure that animVal==baseVal for externalResourcesRequired
class SVGExternalResourcesRequired {
public:
- SVGExternalResourcesRequired();
- virtual ~SVGExternalResourcesRequired();
+ virtual ~SVGExternalResourcesRequired() { }
bool parseMappedAttribute(Attribute*);
bool isKnownAttribute(const QualifiedName&);
diff --git a/WebCore/svg/SVGFEBlendElement.cpp b/WebCore/svg/SVGFEBlendElement.cpp
index e944d61..451b7d1 100644
--- a/WebCore/svg/SVGFEBlendElement.cpp
+++ b/WebCore/svg/SVGFEBlendElement.cpp
@@ -27,14 +27,15 @@
namespace WebCore {
-SVGFEBlendElement::SVGFEBlendElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEBlendElement::SVGFEBlendElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
, m_mode(FEBLEND_MODE_NORMAL)
{
}
-SVGFEBlendElement::~SVGFEBlendElement()
+PassRefPtr<SVGFEBlendElement> SVGFEBlendElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEBlendElement(tagName, document));
}
void SVGFEBlendElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFEBlendElement.h b/WebCore/svg/SVGFEBlendElement.h
index 2ffa93e..41c8307 100644
--- a/WebCore/svg/SVGFEBlendElement.h
+++ b/WebCore/svg/SVGFEBlendElement.h
@@ -28,14 +28,15 @@
namespace WebCore {
class SVGFEBlendElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFEBlendElement> create(const QualifiedName&, Document*);
+
+private:
SVGFEBlendElement(const QualifiedName&, Document*);
- virtual ~SVGFEBlendElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEBlendElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFEBlendElement, SVGNames::in2Attr, String, In2, in2)
DECLARE_ANIMATED_PROPERTY(SVGFEBlendElement, SVGNames::modeAttr, int, Mode, mode)
diff --git a/WebCore/svg/SVGFEColorMatrixElement.cpp b/WebCore/svg/SVGFEColorMatrixElement.cpp
index d7c10d1..7f496bc 100644
--- a/WebCore/svg/SVGFEColorMatrixElement.cpp
+++ b/WebCore/svg/SVGFEColorMatrixElement.cpp
@@ -29,15 +29,16 @@
namespace WebCore {
-SVGFEColorMatrixElement::SVGFEColorMatrixElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEColorMatrixElement::SVGFEColorMatrixElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
, m_type(FECOLORMATRIX_TYPE_UNKNOWN)
, m_values(SVGNumberList::create(SVGNames::valuesAttr))
{
}
-SVGFEColorMatrixElement::~SVGFEColorMatrixElement()
+PassRefPtr<SVGFEColorMatrixElement> SVGFEColorMatrixElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEColorMatrixElement(tagName, document));
}
void SVGFEColorMatrixElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFEColorMatrixElement.h b/WebCore/svg/SVGFEColorMatrixElement.h
index 6701eea..873d530 100644
--- a/WebCore/svg/SVGFEColorMatrixElement.h
+++ b/WebCore/svg/SVGFEColorMatrixElement.h
@@ -30,14 +30,15 @@ namespace WebCore {
class SVGFEColorMatrixElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFEColorMatrixElement> create(const QualifiedName&, Document*);
+
+private:
SVGFEColorMatrixElement(const QualifiedName&, Document*);
- virtual ~SVGFEColorMatrixElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEColorMatrixElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFEColorMatrixElement, SVGNames::typeAttr, int, Type, type)
DECLARE_ANIMATED_PROPERTY(SVGFEColorMatrixElement, SVGNames::valuesAttr, SVGNumberList*, Values, values)
diff --git a/WebCore/svg/SVGFEComponentTransferElement.cpp b/WebCore/svg/SVGFEComponentTransferElement.cpp
index 9f85a0b..a99e74c 100644
--- a/WebCore/svg/SVGFEComponentTransferElement.cpp
+++ b/WebCore/svg/SVGFEComponentTransferElement.cpp
@@ -33,13 +33,14 @@
namespace WebCore {
-SVGFEComponentTransferElement::SVGFEComponentTransferElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEComponentTransferElement::SVGFEComponentTransferElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
{
}
-SVGFEComponentTransferElement::~SVGFEComponentTransferElement()
+PassRefPtr<SVGFEComponentTransferElement> SVGFEComponentTransferElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEComponentTransferElement(tagName, document));
}
void SVGFEComponentTransferElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFEComponentTransferElement.h b/WebCore/svg/SVGFEComponentTransferElement.h
index 785dc68..957661e 100644
--- a/WebCore/svg/SVGFEComponentTransferElement.h
+++ b/WebCore/svg/SVGFEComponentTransferElement.h
@@ -29,14 +29,15 @@ namespace WebCore {
class SVGFEComponentTransferElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFEComponentTransferElement> create(const QualifiedName&, Document*);
+
+private:
SVGFEComponentTransferElement(const QualifiedName&, Document*);
- virtual ~SVGFEComponentTransferElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEComponentTransferElement, SVGNames::inAttr, String, In1, in1)
};
diff --git a/WebCore/svg/SVGFECompositeElement.cpp b/WebCore/svg/SVGFECompositeElement.cpp
index dfa335d..f658632 100644
--- a/WebCore/svg/SVGFECompositeElement.cpp
+++ b/WebCore/svg/SVGFECompositeElement.cpp
@@ -28,14 +28,15 @@
namespace WebCore {
-SVGFECompositeElement::SVGFECompositeElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFECompositeElement::SVGFECompositeElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
, m__operator(FECOMPOSITE_OPERATOR_OVER)
{
}
-SVGFECompositeElement::~SVGFECompositeElement()
+PassRefPtr<SVGFECompositeElement> SVGFECompositeElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFECompositeElement(tagName, document));
}
void SVGFECompositeElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFECompositeElement.h b/WebCore/svg/SVGFECompositeElement.h
index b229cc5..19683de 100644
--- a/WebCore/svg/SVGFECompositeElement.h
+++ b/WebCore/svg/SVGFECompositeElement.h
@@ -29,14 +29,15 @@ namespace WebCore {
class SVGFECompositeElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFECompositeElement> create(const QualifiedName&, Document*);
+
+private:
SVGFECompositeElement(const QualifiedName&, Document*);
- virtual ~SVGFECompositeElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFECompositeElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFECompositeElement, SVGNames::in2Attr, String, In2, in2)
DECLARE_ANIMATED_PROPERTY(SVGFECompositeElement, SVGNames::operatorAttr, int, _operator, _operator)
diff --git a/WebCore/svg/SVGFEConvolveMatrixElement.cpp b/WebCore/svg/SVGFEConvolveMatrixElement.cpp
index ed6910e..9432a00 100644
--- a/WebCore/svg/SVGFEConvolveMatrixElement.cpp
+++ b/WebCore/svg/SVGFEConvolveMatrixElement.cpp
@@ -38,15 +38,16 @@ namespace WebCore {
char SVGKernelUnitLengthXAttrIdentifier[] = "SVGKernelUnitLengthXAttr";
char SVGKernelUnitLengthYAttrIdentifier[] = "SVGKernelUnitLengthYAttr";
-SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
, m_kernelMatrix(SVGNumberList::create(SVGNames::kernelMatrixAttr))
, m_edgeMode(EDGEMODE_DUPLICATE)
{
}
-SVGFEConvolveMatrixElement::~SVGFEConvolveMatrixElement()
+PassRefPtr<SVGFEConvolveMatrixElement> SVGFEConvolveMatrixElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEConvolveMatrixElement(tagName, document));
}
void SVGFEConvolveMatrixElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFEConvolveMatrixElement.h b/WebCore/svg/SVGFEConvolveMatrixElement.h
index 5f505d7..e70b768 100644
--- a/WebCore/svg/SVGFEConvolveMatrixElement.h
+++ b/WebCore/svg/SVGFEConvolveMatrixElement.h
@@ -29,16 +29,17 @@ namespace WebCore {
class SVGFEConvolveMatrixElement : public SVGFilterPrimitiveStandardAttributes {
public:
- SVGFEConvolveMatrixElement(const QualifiedName&, Document*);
- virtual ~SVGFEConvolveMatrixElement();
+ static PassRefPtr<SVGFEConvolveMatrixElement> create(const QualifiedName&, Document*);
void setOrder(float orderX, float orderY);
void setKernelUnitLength(float kernelUnitLengthX, float kernelUnitLengthY);
+private:
+ SVGFEConvolveMatrixElement(const QualifiedName&, Document*);
+
virtual void parseMappedAttribute(Attribute*);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEConvolveMatrixElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFEConvolveMatrixElement, SVGNames::orderXAttr, long, OrderX, orderX)
DECLARE_ANIMATED_PROPERTY(SVGFEConvolveMatrixElement, SVGNames::orderYAttr, long, OrderY, orderY)
diff --git a/WebCore/svg/SVGFEDiffuseLightingElement.cpp b/WebCore/svg/SVGFEDiffuseLightingElement.cpp
index 81144c6..8c7e7ed 100644
--- a/WebCore/svg/SVGFEDiffuseLightingElement.cpp
+++ b/WebCore/svg/SVGFEDiffuseLightingElement.cpp
@@ -35,15 +35,16 @@ namespace WebCore {
char SVGKernelUnitLengthXIdentifier[] = "SVGKernelUnitLengthX";
char SVGKernelUnitLengthYIdentifier[] = "SVGKernelUnitLengthY";
-SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , m_diffuseConstant(1.0f)
- , m_surfaceScale(1.0f)
+inline SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
+ , m_diffuseConstant(1)
+ , m_surfaceScale(1)
{
}
-SVGFEDiffuseLightingElement::~SVGFEDiffuseLightingElement()
+PassRefPtr<SVGFEDiffuseLightingElement> SVGFEDiffuseLightingElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEDiffuseLightingElement(tagName, document));
}
void SVGFEDiffuseLightingElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFEDiffuseLightingElement.h b/WebCore/svg/SVGFEDiffuseLightingElement.h
index c5bedf1..e0dbfc4 100644
--- a/WebCore/svg/SVGFEDiffuseLightingElement.h
+++ b/WebCore/svg/SVGFEDiffuseLightingElement.h
@@ -36,15 +36,16 @@ class SVGColor;
class SVGFEDiffuseLightingElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFEDiffuseLightingElement> create(const QualifiedName&, Document*);
+
+private:
SVGFEDiffuseLightingElement(const QualifiedName&, Document*);
- virtual ~SVGFEDiffuseLightingElement();
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEDiffuseLightingElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFEDiffuseLightingElement, SVGNames::diffuseConstantAttr, float, DiffuseConstant, diffuseConstant)
DECLARE_ANIMATED_PROPERTY(SVGFEDiffuseLightingElement, SVGNames::surfaceScaleAttr, float, SurfaceScale, surfaceScale)
diff --git a/WebCore/svg/SVGFEDisplacementMapElement.cpp b/WebCore/svg/SVGFEDisplacementMapElement.cpp
index 2706c78..013eca5 100644
--- a/WebCore/svg/SVGFEDisplacementMapElement.cpp
+++ b/WebCore/svg/SVGFEDisplacementMapElement.cpp
@@ -26,15 +26,16 @@
namespace WebCore {
-SVGFEDisplacementMapElement::SVGFEDisplacementMapElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEDisplacementMapElement::SVGFEDisplacementMapElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
, m_xChannelSelector(CHANNEL_A)
, m_yChannelSelector(CHANNEL_A)
{
}
-SVGFEDisplacementMapElement::~SVGFEDisplacementMapElement()
+PassRefPtr<SVGFEDisplacementMapElement> SVGFEDisplacementMapElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEDisplacementMapElement(tagName, document));
}
ChannelSelectorType SVGFEDisplacementMapElement::stringToChannel(const String& key)
diff --git a/WebCore/svg/SVGFEDisplacementMapElement.h b/WebCore/svg/SVGFEDisplacementMapElement.h
index 445c631..239c2c7 100644
--- a/WebCore/svg/SVGFEDisplacementMapElement.h
+++ b/WebCore/svg/SVGFEDisplacementMapElement.h
@@ -28,16 +28,17 @@ namespace WebCore {
class SVGFEDisplacementMapElement : public SVGFilterPrimitiveStandardAttributes {
public:
- SVGFEDisplacementMapElement(const QualifiedName& tagName, Document*);
- virtual ~SVGFEDisplacementMapElement();
-
+ static PassRefPtr<SVGFEDisplacementMapElement> create(const QualifiedName&, Document*);
+
static ChannelSelectorType stringToChannel(const String&);
+private:
+ SVGFEDisplacementMapElement(const QualifiedName& tagName, Document*);
+
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEDisplacementMapElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFEDisplacementMapElement, SVGNames::in2Attr, String, In2, in2)
DECLARE_ANIMATED_PROPERTY(SVGFEDisplacementMapElement, SVGNames::xChannelSelectorAttr, int, XChannelSelector, xChannelSelector)
diff --git a/WebCore/svg/SVGFEDistantLightElement.cpp b/WebCore/svg/SVGFEDistantLightElement.cpp
index 3a056af..59394d8 100644
--- a/WebCore/svg/SVGFEDistantLightElement.cpp
+++ b/WebCore/svg/SVGFEDistantLightElement.cpp
@@ -25,13 +25,14 @@
namespace WebCore {
-SVGFEDistantLightElement::SVGFEDistantLightElement(const QualifiedName& tagName, Document* doc)
- : SVGFELightElement(tagName, doc)
+inline SVGFEDistantLightElement::SVGFEDistantLightElement(const QualifiedName& tagName, Document* document)
+ : SVGFELightElement(tagName, document)
{
}
-SVGFEDistantLightElement::~SVGFEDistantLightElement()
+PassRefPtr<SVGFEDistantLightElement> SVGFEDistantLightElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEDistantLightElement(tagName, document));
}
PassRefPtr<LightSource> SVGFEDistantLightElement::lightSource() const
diff --git a/WebCore/svg/SVGFEDistantLightElement.h b/WebCore/svg/SVGFEDistantLightElement.h
index a625c04..9024cce 100644
--- a/WebCore/svg/SVGFEDistantLightElement.h
+++ b/WebCore/svg/SVGFEDistantLightElement.h
@@ -24,10 +24,13 @@
#include "SVGFELightElement.h"
namespace WebCore {
+
class SVGFEDistantLightElement : public SVGFELightElement {
public:
+ static PassRefPtr<SVGFEDistantLightElement> create(const QualifiedName&, Document*);
+
+ private:
SVGFEDistantLightElement(const QualifiedName&, Document*);
- virtual ~SVGFEDistantLightElement();
virtual PassRefPtr<LightSource> lightSource() const;
};
diff --git a/WebCore/svg/SVGFEFloodElement.cpp b/WebCore/svg/SVGFEFloodElement.cpp
index 050f2d4..321eb8f 100644
--- a/WebCore/svg/SVGFEFloodElement.cpp
+++ b/WebCore/svg/SVGFEFloodElement.cpp
@@ -29,13 +29,14 @@
namespace WebCore {
-SVGFEFloodElement::SVGFEFloodElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEFloodElement::SVGFEFloodElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
{
}
-SVGFEFloodElement::~SVGFEFloodElement()
+PassRefPtr<SVGFEFloodElement> SVGFEFloodElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEFloodElement(tagName, document));
}
PassRefPtr<FilterEffect> SVGFEFloodElement::build(SVGFilterBuilder*)
diff --git a/WebCore/svg/SVGFEFloodElement.h b/WebCore/svg/SVGFEFloodElement.h
index 73aa0ee..2f7d94d 100644
--- a/WebCore/svg/SVGFEFloodElement.h
+++ b/WebCore/svg/SVGFEFloodElement.h
@@ -26,10 +26,13 @@
#include "SVGFilterPrimitiveStandardAttributes.h"
namespace WebCore {
+
class SVGFEFloodElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFEFloodElement> create(const QualifiedName&, Document*);
+
+private:
SVGFEFloodElement(const QualifiedName&, Document*);
- virtual ~SVGFEFloodElement();
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
};
diff --git a/WebCore/svg/SVGFEFuncAElement.cpp b/WebCore/svg/SVGFEFuncAElement.cpp
index 3722826..8967efe 100644
--- a/WebCore/svg/SVGFEFuncAElement.cpp
+++ b/WebCore/svg/SVGFEFuncAElement.cpp
@@ -25,13 +25,14 @@
namespace WebCore {
-SVGFEFuncAElement::SVGFEFuncAElement(const QualifiedName& tagName, Document* doc)
- : SVGComponentTransferFunctionElement(tagName, doc)
+inline SVGFEFuncAElement::SVGFEFuncAElement(const QualifiedName& tagName, Document* document)
+ : SVGComponentTransferFunctionElement(tagName, document)
{
}
-SVGFEFuncAElement::~SVGFEFuncAElement()
+PassRefPtr<SVGFEFuncAElement> SVGFEFuncAElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEFuncAElement(tagName, document));
}
}
diff --git a/WebCore/svg/SVGFEFuncAElement.h b/WebCore/svg/SVGFEFuncAElement.h
index 500d630..f92ad5b 100644
--- a/WebCore/svg/SVGFEFuncAElement.h
+++ b/WebCore/svg/SVGFEFuncAElement.h
@@ -25,10 +25,13 @@
#include "SVGComponentTransferFunctionElement.h"
namespace WebCore {
+
class SVGFEFuncAElement : public SVGComponentTransferFunctionElement {
public:
+ static PassRefPtr<SVGFEFuncAElement> create(const QualifiedName&, Document*);
+
+ private:
SVGFEFuncAElement(const QualifiedName&, Document*);
- virtual ~SVGFEFuncAElement();
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEFuncBElement.cpp b/WebCore/svg/SVGFEFuncBElement.cpp
index 3ea448f..2b4287a 100644
--- a/WebCore/svg/SVGFEFuncBElement.cpp
+++ b/WebCore/svg/SVGFEFuncBElement.cpp
@@ -25,13 +25,14 @@
namespace WebCore {
-SVGFEFuncBElement::SVGFEFuncBElement(const QualifiedName& tagName, Document *doc)
- : SVGComponentTransferFunctionElement(tagName, doc)
+inline SVGFEFuncBElement::SVGFEFuncBElement(const QualifiedName& tagName, Document* document)
+ : SVGComponentTransferFunctionElement(tagName, document)
{
}
-SVGFEFuncBElement::~SVGFEFuncBElement()
+PassRefPtr<SVGFEFuncBElement> SVGFEFuncBElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEFuncBElement(tagName, document));
}
}
diff --git a/WebCore/svg/SVGFEFuncBElement.h b/WebCore/svg/SVGFEFuncBElement.h
index 85f9500..ea664f5 100644
--- a/WebCore/svg/SVGFEFuncBElement.h
+++ b/WebCore/svg/SVGFEFuncBElement.h
@@ -25,10 +25,13 @@
#include "SVGComponentTransferFunctionElement.h"
namespace WebCore {
+
class SVGFEFuncBElement : public SVGComponentTransferFunctionElement {
public:
+ static PassRefPtr<SVGFEFuncBElement> create(const QualifiedName&, Document*);
+
+ private:
SVGFEFuncBElement(const QualifiedName&, Document*);
- virtual ~SVGFEFuncBElement();
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEFuncGElement.cpp b/WebCore/svg/SVGFEFuncGElement.cpp
index c74a9ce..32cbdf3 100644
--- a/WebCore/svg/SVGFEFuncGElement.cpp
+++ b/WebCore/svg/SVGFEFuncGElement.cpp
@@ -25,13 +25,14 @@
namespace WebCore {
-SVGFEFuncGElement::SVGFEFuncGElement(const QualifiedName& tagName, Document* doc)
- : SVGComponentTransferFunctionElement(tagName, doc)
+inline SVGFEFuncGElement::SVGFEFuncGElement(const QualifiedName& tagName, Document* document)
+ : SVGComponentTransferFunctionElement(tagName, document)
{
}
-SVGFEFuncGElement::~SVGFEFuncGElement()
+PassRefPtr<SVGFEFuncGElement> SVGFEFuncGElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEFuncGElement(tagName, document));
}
}
diff --git a/WebCore/svg/SVGFEFuncGElement.h b/WebCore/svg/SVGFEFuncGElement.h
index 9950a53..df32106 100644
--- a/WebCore/svg/SVGFEFuncGElement.h
+++ b/WebCore/svg/SVGFEFuncGElement.h
@@ -25,10 +25,13 @@
#include "SVGComponentTransferFunctionElement.h"
namespace WebCore {
+
class SVGFEFuncGElement : public SVGComponentTransferFunctionElement {
public:
+ static PassRefPtr<SVGFEFuncGElement> create(const QualifiedName&, Document*);
+
+ private:
SVGFEFuncGElement(const QualifiedName&, Document*);
- virtual ~SVGFEFuncGElement();
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEFuncRElement.cpp b/WebCore/svg/SVGFEFuncRElement.cpp
index ce3355d..9c17909 100644
--- a/WebCore/svg/SVGFEFuncRElement.cpp
+++ b/WebCore/svg/SVGFEFuncRElement.cpp
@@ -25,13 +25,14 @@
namespace WebCore {
-SVGFEFuncRElement::SVGFEFuncRElement(const QualifiedName& tagName, Document* doc)
- : SVGComponentTransferFunctionElement(tagName, doc)
+inline SVGFEFuncRElement::SVGFEFuncRElement(const QualifiedName& tagName, Document* document)
+ : SVGComponentTransferFunctionElement(tagName, document)
{
}
-SVGFEFuncRElement::~SVGFEFuncRElement()
+PassRefPtr<SVGFEFuncRElement> SVGFEFuncRElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEFuncRElement(tagName, document));
}
}
diff --git a/WebCore/svg/SVGFEFuncRElement.h b/WebCore/svg/SVGFEFuncRElement.h
index 8e78091..601095f 100644
--- a/WebCore/svg/SVGFEFuncRElement.h
+++ b/WebCore/svg/SVGFEFuncRElement.h
@@ -25,10 +25,13 @@
#include "SVGComponentTransferFunctionElement.h"
namespace WebCore {
+
class SVGFEFuncRElement : public SVGComponentTransferFunctionElement {
public:
+ static PassRefPtr<SVGFEFuncRElement> create(const QualifiedName&, Document*);
+
+ private:
SVGFEFuncRElement(const QualifiedName&, Document*);
- virtual ~SVGFEFuncRElement();
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEGaussianBlurElement.cpp b/WebCore/svg/SVGFEGaussianBlurElement.cpp
index 2e5578a..f66fa90 100644
--- a/WebCore/svg/SVGFEGaussianBlurElement.cpp
+++ b/WebCore/svg/SVGFEGaussianBlurElement.cpp
@@ -32,13 +32,14 @@ namespace WebCore {
char SVGStdDeviationXAttrIdentifier[] = "SVGStdDeviationXAttr";
char SVGStdDeviationYAttrIdentifier[] = "SVGStdDeviationYAttr";
-SVGFEGaussianBlurElement::SVGFEGaussianBlurElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEGaussianBlurElement::SVGFEGaussianBlurElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
{
}
-SVGFEGaussianBlurElement::~SVGFEGaussianBlurElement()
+PassRefPtr<SVGFEGaussianBlurElement> SVGFEGaussianBlurElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEGaussianBlurElement(tagName, document));
}
void SVGFEGaussianBlurElement::setStdDeviation(float, float)
diff --git a/WebCore/svg/SVGFEGaussianBlurElement.h b/WebCore/svg/SVGFEGaussianBlurElement.h
index 10c0f5a..36b7383 100644
--- a/WebCore/svg/SVGFEGaussianBlurElement.h
+++ b/WebCore/svg/SVGFEGaussianBlurElement.h
@@ -32,16 +32,17 @@ extern char SVGStdDeviationYAttrIdentifier[];
class SVGFEGaussianBlurElement : public SVGFilterPrimitiveStandardAttributes {
public:
- SVGFEGaussianBlurElement(const QualifiedName&, Document*);
- virtual ~SVGFEGaussianBlurElement();
+ static PassRefPtr<SVGFEGaussianBlurElement> create(const QualifiedName&, Document*);
void setStdDeviation(float stdDeviationX, float stdDeviationY);
+private:
+ SVGFEGaussianBlurElement(const QualifiedName&, Document*);
+
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEGaussianBlurElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFEGaussianBlurElement, SVGNames::stdDeviationAttr, SVGStdDeviationXAttrIdentifier, float, StdDeviationX, stdDeviationX)
DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFEGaussianBlurElement, SVGNames::stdDeviationAttr, SVGStdDeviationYAttrIdentifier, float, StdDeviationY, stdDeviationY)
diff --git a/WebCore/svg/SVGFEImageElement.cpp b/WebCore/svg/SVGFEImageElement.cpp
index eb024f6..0808ad7 100644
--- a/WebCore/svg/SVGFEImageElement.cpp
+++ b/WebCore/svg/SVGFEImageElement.cpp
@@ -37,14 +37,16 @@
namespace WebCore {
-SVGFEImageElement::SVGFEImageElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , SVGURIReference()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGFEImageElement::SVGFEImageElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
{
}
+PassRefPtr<SVGFEImageElement> SVGFEImageElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGFEImageElement(tagName, document));
+}
+
SVGFEImageElement::~SVGFEImageElement()
{
if (m_cachedImage)
diff --git a/WebCore/svg/SVGFEImageElement.h b/WebCore/svg/SVGFEImageElement.h
index 2128c6d..b5fad48 100644
--- a/WebCore/svg/SVGFEImageElement.h
+++ b/WebCore/svg/SVGFEImageElement.h
@@ -40,9 +40,13 @@ class SVGFEImageElement : public SVGFilterPrimitiveStandardAttributes,
public SVGExternalResourcesRequired,
public CachedResourceClient {
public:
- SVGFEImageElement(const QualifiedName&, Document*);
+ static PassRefPtr<SVGFEImageElement> create(const QualifiedName&, Document*);
+
virtual ~SVGFEImageElement();
+private:
+ SVGFEImageElement(const QualifiedName&, Document*);
+
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual void notifyFinished(CachedResource*);
@@ -50,7 +54,6 @@ public:
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
void requestImageResource();
DECLARE_ANIMATED_PROPERTY(SVGFEImageElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
diff --git a/WebCore/svg/SVGFELightElement.cpp b/WebCore/svg/SVGFELightElement.cpp
index 5975033..dc10cf9 100644
--- a/WebCore/svg/SVGFELightElement.cpp
+++ b/WebCore/svg/SVGFELightElement.cpp
@@ -30,13 +30,9 @@
namespace WebCore {
-SVGFELightElement::SVGFELightElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
- , m_specularExponent(1.0f)
-{
-}
-
-SVGFELightElement::~SVGFELightElement()
+SVGFELightElement::SVGFELightElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
+ , m_specularExponent(1)
{
}
diff --git a/WebCore/svg/SVGFELightElement.h b/WebCore/svg/SVGFELightElement.h
index d0874cb..b86204d 100644
--- a/WebCore/svg/SVGFELightElement.h
+++ b/WebCore/svg/SVGFELightElement.h
@@ -31,16 +31,17 @@ namespace WebCore {
class SVGFELightElement : public SVGElement {
public:
- SVGFELightElement(const QualifiedName&, Document*);
- virtual ~SVGFELightElement();
-
virtual PassRefPtr<LightSource> lightSource() const = 0;
+
+protected:
+ SVGFELightElement(const QualifiedName&, Document*);
+
+private:
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);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFELightElement, SVGNames::azimuthAttr, float, Azimuth, azimuth)
DECLARE_ANIMATED_PROPERTY(SVGFELightElement, SVGNames::elevationAttr, float, Elevation, elevation)
DECLARE_ANIMATED_PROPERTY(SVGFELightElement, SVGNames::xAttr, float, X, x)
diff --git a/WebCore/svg/SVGFEMergeElement.cpp b/WebCore/svg/SVGFEMergeElement.cpp
index bbdfd52..6254b24 100644
--- a/WebCore/svg/SVGFEMergeElement.cpp
+++ b/WebCore/svg/SVGFEMergeElement.cpp
@@ -27,13 +27,14 @@
namespace WebCore {
-SVGFEMergeElement::SVGFEMergeElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEMergeElement::SVGFEMergeElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
{
}
-SVGFEMergeElement::~SVGFEMergeElement()
+PassRefPtr<SVGFEMergeElement> SVGFEMergeElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEMergeElement(tagName, document));
}
PassRefPtr<FilterEffect> SVGFEMergeElement::build(SVGFilterBuilder* filterBuilder)
diff --git a/WebCore/svg/SVGFEMergeElement.h b/WebCore/svg/SVGFEMergeElement.h
index 1ae6eb4..c07be4c 100644
--- a/WebCore/svg/SVGFEMergeElement.h
+++ b/WebCore/svg/SVGFEMergeElement.h
@@ -29,8 +29,10 @@ namespace WebCore {
class SVGFEMergeElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFEMergeElement> create(const QualifiedName&, Document*);
+
+private:
SVGFEMergeElement(const QualifiedName&, Document*);
- virtual ~SVGFEMergeElement();
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
};
diff --git a/WebCore/svg/SVGFEMergeNodeElement.cpp b/WebCore/svg/SVGFEMergeNodeElement.cpp
index 65f7a1d..4bd5ac5 100644
--- a/WebCore/svg/SVGFEMergeNodeElement.cpp
+++ b/WebCore/svg/SVGFEMergeNodeElement.cpp
@@ -27,13 +27,14 @@
namespace WebCore {
-SVGFEMergeNodeElement::SVGFEMergeNodeElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+inline SVGFEMergeNodeElement::SVGFEMergeNodeElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
-SVGFEMergeNodeElement::~SVGFEMergeNodeElement()
+PassRefPtr<SVGFEMergeNodeElement> SVGFEMergeNodeElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEMergeNodeElement(tagName, document));
}
void SVGFEMergeNodeElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFEMergeNodeElement.h b/WebCore/svg/SVGFEMergeNodeElement.h
index 944081f..65c5d3d 100644
--- a/WebCore/svg/SVGFEMergeNodeElement.h
+++ b/WebCore/svg/SVGFEMergeNodeElement.h
@@ -29,13 +29,14 @@ namespace WebCore {
class SVGFEMergeNodeElement : public SVGElement {
public:
+ static PassRefPtr<SVGFEMergeNodeElement> create(const QualifiedName&, Document*);
+
+ private:
SVGFEMergeNodeElement(const QualifiedName&, Document*);
- virtual ~SVGFEMergeNodeElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
- private:
DECLARE_ANIMATED_PROPERTY(SVGFEMergeNodeElement, SVGNames::inAttr, String, In1, in1)
};
diff --git a/WebCore/svg/SVGFEMorphologyElement.cpp b/WebCore/svg/SVGFEMorphologyElement.cpp
index 739517f..c3db844 100644
--- a/WebCore/svg/SVGFEMorphologyElement.cpp
+++ b/WebCore/svg/SVGFEMorphologyElement.cpp
@@ -31,14 +31,15 @@ namespace WebCore {
char SVGRadiusXAttrIdentifier[] = "SVGRadiusXAttr";
char SVGRadiusYAttrIdentifier[] = "SVGRadiusYAttr";
-SVGFEMorphologyElement::SVGFEMorphologyElement(const QualifiedName& tagName, Document* document)
+inline SVGFEMorphologyElement::SVGFEMorphologyElement(const QualifiedName& tagName, Document* document)
: SVGFilterPrimitiveStandardAttributes(tagName, document)
, m__operator(FEMORPHOLOGY_OPERATOR_ERODE)
{
}
-SVGFEMorphologyElement::~SVGFEMorphologyElement()
+PassRefPtr<SVGFEMorphologyElement> SVGFEMorphologyElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEMorphologyElement(tagName, document));
}
void SVGFEMorphologyElement::setRadius(float, float)
diff --git a/WebCore/svg/SVGFEMorphologyElement.h b/WebCore/svg/SVGFEMorphologyElement.h
index d976b92..9bf26ee 100644
--- a/WebCore/svg/SVGFEMorphologyElement.h
+++ b/WebCore/svg/SVGFEMorphologyElement.h
@@ -31,16 +31,17 @@ extern char SVGRadiusYAttrIdentifier[];
class SVGFEMorphologyElement : public SVGFilterPrimitiveStandardAttributes {
public:
- SVGFEMorphologyElement(const QualifiedName&, Document*);
- virtual ~SVGFEMorphologyElement();
+ static PassRefPtr<SVGFEMorphologyElement> create(const QualifiedName&, Document*);
void setRadius(float radiusX, float radiusY);
+private:
+ SVGFEMorphologyElement(const QualifiedName&, Document*);
+
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEMorphologyElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFEMorphologyElement, SVGNames::operatorAttr, int, _operator, _operator)
DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFEMorphologyElement, SVGNames::radiusAttr, SVGRadiusXAttrIdentifier, float, RadiusX, radiusX)
diff --git a/WebCore/svg/SVGFEOffsetElement.cpp b/WebCore/svg/SVGFEOffsetElement.cpp
index 006bb3b..b27db31 100644
--- a/WebCore/svg/SVGFEOffsetElement.cpp
+++ b/WebCore/svg/SVGFEOffsetElement.cpp
@@ -27,13 +27,14 @@
namespace WebCore {
-SVGFEOffsetElement::SVGFEOffsetElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEOffsetElement::SVGFEOffsetElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
{
}
-SVGFEOffsetElement::~SVGFEOffsetElement()
+PassRefPtr<SVGFEOffsetElement> SVGFEOffsetElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEOffsetElement(tagName, document));
}
void SVGFEOffsetElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFEOffsetElement.h b/WebCore/svg/SVGFEOffsetElement.h
index 8f93526..e522ce2 100644
--- a/WebCore/svg/SVGFEOffsetElement.h
+++ b/WebCore/svg/SVGFEOffsetElement.h
@@ -29,15 +29,16 @@ namespace WebCore {
class SVGFEOffsetElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFEOffsetElement> create(const QualifiedName&, Document*);
+
+private:
SVGFEOffsetElement(const QualifiedName&, Document*);
- virtual ~SVGFEOffsetElement();
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEOffsetElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFEOffsetElement, SVGNames::dxAttr, float, Dx, dx)
DECLARE_ANIMATED_PROPERTY(SVGFEOffsetElement, SVGNames::dyAttr, float, Dy, dy)
diff --git a/WebCore/svg/SVGFEPointLightElement.cpp b/WebCore/svg/SVGFEPointLightElement.cpp
index 46568ff..4436ab9 100644
--- a/WebCore/svg/SVGFEPointLightElement.cpp
+++ b/WebCore/svg/SVGFEPointLightElement.cpp
@@ -25,19 +25,19 @@
namespace WebCore {
-SVGFEPointLightElement::SVGFEPointLightElement(const QualifiedName& tagName, Document* doc)
- : SVGFELightElement(tagName, doc)
+inline SVGFEPointLightElement::SVGFEPointLightElement(const QualifiedName& tagName, Document* document)
+ : SVGFELightElement(tagName, document)
{
}
-SVGFEPointLightElement::~SVGFEPointLightElement()
+PassRefPtr<SVGFEPointLightElement> SVGFEPointLightElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEPointLightElement(tagName, document));
}
PassRefPtr<LightSource> SVGFEPointLightElement::lightSource() const
{
- FloatPoint3D pos(x(), y(), z());
- return PointLightSource::create(pos);
+ return PointLightSource::create(FloatPoint3D(x(), y(), z()));
}
}
diff --git a/WebCore/svg/SVGFEPointLightElement.h b/WebCore/svg/SVGFEPointLightElement.h
index d734f9e..270d36d 100644
--- a/WebCore/svg/SVGFEPointLightElement.h
+++ b/WebCore/svg/SVGFEPointLightElement.h
@@ -24,10 +24,13 @@
#include "SVGFELightElement.h"
namespace WebCore {
+
class SVGFEPointLightElement : public SVGFELightElement {
- public:
+ public:
+ static PassRefPtr<SVGFEPointLightElement> create(const QualifiedName&, Document*);
+
+ private:
SVGFEPointLightElement(const QualifiedName&, Document*);
- virtual ~SVGFEPointLightElement();
virtual PassRefPtr<LightSource> lightSource() const;
};
diff --git a/WebCore/svg/SVGFESpecularLightingElement.cpp b/WebCore/svg/SVGFESpecularLightingElement.cpp
index afbdefe..d07c6ce 100644
--- a/WebCore/svg/SVGFESpecularLightingElement.cpp
+++ b/WebCore/svg/SVGFESpecularLightingElement.cpp
@@ -32,16 +32,17 @@
namespace WebCore {
-SVGFESpecularLightingElement::SVGFESpecularLightingElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , m_specularConstant(1.0f)
- , m_specularExponent(1.0f)
- , m_surfaceScale(1.0f)
+inline SVGFESpecularLightingElement::SVGFESpecularLightingElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
+ , m_specularConstant(1)
+ , m_specularExponent(1)
+ , m_surfaceScale(1)
{
}
-SVGFESpecularLightingElement::~SVGFESpecularLightingElement()
+PassRefPtr<SVGFESpecularLightingElement> SVGFESpecularLightingElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFESpecularLightingElement(tagName, document));
}
void SVGFESpecularLightingElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFESpecularLightingElement.h b/WebCore/svg/SVGFESpecularLightingElement.h
index a506cf7..1fed36f 100644
--- a/WebCore/svg/SVGFESpecularLightingElement.h
+++ b/WebCore/svg/SVGFESpecularLightingElement.h
@@ -33,14 +33,15 @@ extern char SVGKernelUnitLengthYIdentifier[];
class SVGFESpecularLightingElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFESpecularLightingElement> create(const QualifiedName&, Document*);
+
+private:
SVGFESpecularLightingElement(const QualifiedName&, Document*);
- virtual ~SVGFESpecularLightingElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFESpecularLightingElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFESpecularLightingElement, SVGNames::specularConstantAttr, float, SpecularConstant, specularConstant)
DECLARE_ANIMATED_PROPERTY(SVGFESpecularLightingElement, SVGNames::specularExponentAttr, float, SpecularExponent, specularExponent)
diff --git a/WebCore/svg/SVGFESpotLightElement.cpp b/WebCore/svg/SVGFESpotLightElement.cpp
index 26d0e16..04731f0 100644
--- a/WebCore/svg/SVGFESpotLightElement.cpp
+++ b/WebCore/svg/SVGFESpotLightElement.cpp
@@ -25,13 +25,14 @@
namespace WebCore {
-SVGFESpotLightElement::SVGFESpotLightElement(const QualifiedName& tagName, Document* doc)
- : SVGFELightElement(tagName, doc)
+inline SVGFESpotLightElement::SVGFESpotLightElement(const QualifiedName& tagName, Document* document)
+ : SVGFELightElement(tagName, document)
{
}
-SVGFESpotLightElement::~SVGFESpotLightElement()
+PassRefPtr<SVGFESpotLightElement> SVGFESpotLightElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFESpotLightElement(tagName, document));
}
PassRefPtr<LightSource> SVGFESpotLightElement::lightSource() const
diff --git a/WebCore/svg/SVGFESpotLightElement.h b/WebCore/svg/SVGFESpotLightElement.h
index 6903c0b..79fc5fc 100644
--- a/WebCore/svg/SVGFESpotLightElement.h
+++ b/WebCore/svg/SVGFESpotLightElement.h
@@ -24,10 +24,13 @@
#include "SVGFELightElement.h"
namespace WebCore {
+
class SVGFESpotLightElement : public SVGFELightElement {
public:
+ static PassRefPtr<SVGFESpotLightElement> create(const QualifiedName&, Document*);
+
+ private:
SVGFESpotLightElement(const QualifiedName&, Document*);
- virtual ~SVGFESpotLightElement();
virtual PassRefPtr<LightSource> lightSource() const;
};
diff --git a/WebCore/svg/SVGFETileElement.cpp b/WebCore/svg/SVGFETileElement.cpp
index f3f5eaf..4379b96 100644
--- a/WebCore/svg/SVGFETileElement.cpp
+++ b/WebCore/svg/SVGFETileElement.cpp
@@ -28,13 +28,14 @@
namespace WebCore {
-SVGFETileElement::SVGFETileElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFETileElement::SVGFETileElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
{
}
-SVGFETileElement::~SVGFETileElement()
+PassRefPtr<SVGFETileElement> SVGFETileElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFETileElement(tagName, document));
}
void SVGFETileElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFETileElement.h b/WebCore/svg/SVGFETileElement.h
index 41355e2..03dc08d 100644
--- a/WebCore/svg/SVGFETileElement.h
+++ b/WebCore/svg/SVGFETileElement.h
@@ -29,14 +29,15 @@ namespace WebCore {
class SVGFETileElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFETileElement> create(const QualifiedName&, Document*);
+
+private:
SVGFETileElement(const QualifiedName&, Document*);
- virtual ~SVGFETileElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFETileElement, SVGNames::inAttr, String, In1, in1)
};
diff --git a/WebCore/svg/SVGFETurbulenceElement.cpp b/WebCore/svg/SVGFETurbulenceElement.cpp
index 0415e89..5c1d32f 100644
--- a/WebCore/svg/SVGFETurbulenceElement.cpp
+++ b/WebCore/svg/SVGFETurbulenceElement.cpp
@@ -31,16 +31,17 @@ namespace WebCore {
char SVGBaseFrequencyXIdentifier[] = "SVGBaseFrequencyX";
char SVGBaseFrequencyYIdentifier[] = "SVGBaseFrequencyY";
-SVGFETurbulenceElement::SVGFETurbulenceElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFETurbulenceElement::SVGFETurbulenceElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
, m_numOctaves(1)
, m_stitchTiles(SVG_STITCHTYPE_NOSTITCH)
, m_type(FETURBULENCE_TYPE_TURBULENCE)
{
}
-SVGFETurbulenceElement::~SVGFETurbulenceElement()
+PassRefPtr<SVGFETurbulenceElement> SVGFETurbulenceElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFETurbulenceElement(tagName, document));
}
void SVGFETurbulenceElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFETurbulenceElement.h b/WebCore/svg/SVGFETurbulenceElement.h
index c5820c8..78d47f9 100644
--- a/WebCore/svg/SVGFETurbulenceElement.h
+++ b/WebCore/svg/SVGFETurbulenceElement.h
@@ -38,14 +38,15 @@ enum SVGStitchOptions {
class SVGFETurbulenceElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFETurbulenceElement> create(const QualifiedName&, Document*);
+
+private:
SVGFETurbulenceElement(const QualifiedName&, Document*);
- virtual ~SVGFETurbulenceElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFETurbulenceElement, SVGNames::baseFrequencyAttr, SVGBaseFrequencyXIdentifier, float, BaseFrequencyX, baseFrequencyX)
DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFETurbulenceElement, SVGNames::baseFrequencyAttr, SVGBaseFrequencyYIdentifier, float, BaseFrequencyY, baseFrequencyY)
DECLARE_ANIMATED_PROPERTY(SVGFETurbulenceElement, SVGNames::numOctavesAttr, long, NumOctaves, numOctaves)
diff --git a/WebCore/svg/SVGFilterElement.cpp b/WebCore/svg/SVGFilterElement.cpp
index eb633c0..3418b9d 100644
--- a/WebCore/svg/SVGFilterElement.cpp
+++ b/WebCore/svg/SVGFilterElement.cpp
@@ -42,8 +42,8 @@ namespace WebCore {
char SVGFilterResXIdentifier[] = "SVGFilterResX";
char SVGFilterResYIdentifier[] = "SVGFilterResY";
-SVGFilterElement::SVGFilterElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
+inline SVGFilterElement::SVGFilterElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
, SVGURIReference()
, SVGLangSpace()
, SVGExternalResourcesRequired()
@@ -58,8 +58,9 @@ SVGFilterElement::SVGFilterElement(const QualifiedName& tagName, Document* doc)
// Spec: If the width/height attribute is not specified, the effect is as if a value of "120%" were specified.
}
-SVGFilterElement::~SVGFilterElement()
+PassRefPtr<SVGFilterElement> SVGFilterElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFilterElement(tagName, document));
}
void SVGFilterElement::setFilterRes(unsigned long filterResX, unsigned long filterResY)
diff --git a/WebCore/svg/SVGFilterElement.h b/WebCore/svg/SVGFilterElement.h
index ddcd953..67d0a47 100644
--- a/WebCore/svg/SVGFilterElement.h
+++ b/WebCore/svg/SVGFilterElement.h
@@ -40,21 +40,11 @@ class SVGFilterElement : public SVGStyledElement,
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
- SVGFilterElement(const QualifiedName&, Document*);
- virtual ~SVGFilterElement();
-
- virtual bool needsPendingResourceHandling() const { return false; }
+ static PassRefPtr<SVGFilterElement> create(const QualifiedName&, Document*);
void setFilterRes(unsigned long filterResX, unsigned long filterResY);
FloatRect filterBoundingBox(const FloatRect&) const;
- 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*);
-
static void invalidateFilter(SVGElement* element)
{
ASSERT(element);
@@ -72,6 +62,17 @@ public:
}
private:
+ SVGFilterElement(const QualifiedName&, Document*);
+
+ 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(SVGFilterElement, SVGNames::filterUnitsAttr, int, FilterUnits, filterUnits)
diff --git a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
index e91c0a1..07d9241 100644
--- a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
+++ b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
@@ -33,8 +33,8 @@
namespace WebCore {
-SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
+SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
, m_x(LengthModeWidth, "0%")
, m_y(LengthModeHeight, "0%")
, m_width(LengthModeWidth, "100%")
@@ -44,10 +44,6 @@ SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes(const
// Spec: If the width/height attribute is not specified, the effect is as if a value of "100%" were specified.
}
-SVGFilterPrimitiveStandardAttributes::~SVGFilterPrimitiveStandardAttributes()
-{
-}
-
void SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(Attribute* attr)
{
const AtomicString& value = attr->value();
diff --git a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
index 8754c6a..2fb41ea 100644
--- a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
+++ b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
@@ -35,22 +35,23 @@ namespace WebCore {
class SVGFilterPrimitiveStandardAttributes : public SVGStyledElement {
public:
+ void setStandardAttributes(bool, FilterEffect*) const;
+
+ virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*) = 0;
+
+protected:
SVGFilterPrimitiveStandardAttributes(const QualifiedName&, Document*);
- virtual ~SVGFilterPrimitiveStandardAttributes();
-
- virtual bool isFilterEffect() const { return true; }
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 PassRefPtr<FilterEffect> build(SVGFilterBuilder*) = 0;
- virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+private:
+ virtual bool isFilterEffect() const { return true; }
- void setStandardAttributes(bool, FilterEffect*) const;
+ virtual bool rendererIsNeeded(RenderStyle*) { return false; }
-private:
DECLARE_ANIMATED_PROPERTY(SVGFilterPrimitiveStandardAttributes, SVGNames::xAttr, SVGLength, X, x)
DECLARE_ANIMATED_PROPERTY(SVGFilterPrimitiveStandardAttributes, SVGNames::yAttr, SVGLength, Y, y)
DECLARE_ANIMATED_PROPERTY(SVGFilterPrimitiveStandardAttributes, SVGNames::widthAttr, SVGLength, Width, width)
diff --git a/WebCore/svg/SVGFitToViewBox.cpp b/WebCore/svg/SVGFitToViewBox.cpp
index c78a619..5297e8f 100644
--- a/WebCore/svg/SVGFitToViewBox.cpp
+++ b/WebCore/svg/SVGFitToViewBox.cpp
@@ -34,14 +34,6 @@
namespace WebCore {
-SVGFitToViewBox::SVGFitToViewBox()
-{
-}
-
-SVGFitToViewBox::~SVGFitToViewBox()
-{
-}
-
bool SVGFitToViewBox::parseViewBox(Document* doc, const String& s, FloatRect& viewBox)
{
const UChar* c = s.characters();
diff --git a/WebCore/svg/SVGFitToViewBox.h b/WebCore/svg/SVGFitToViewBox.h
index ca0fec8..d6551f5 100644
--- a/WebCore/svg/SVGFitToViewBox.h
+++ b/WebCore/svg/SVGFitToViewBox.h
@@ -31,8 +31,7 @@ class AffineTransform;
class SVGFitToViewBox {
public:
- SVGFitToViewBox();
- virtual ~SVGFitToViewBox();
+ virtual ~SVGFitToViewBox() { }
bool parseViewBox(Document*, const UChar*& start, const UChar* end, FloatRect& viewBox, bool validate = true);
static AffineTransform viewBoxToViewTransform(const FloatRect& viewBoxRect, const SVGPreserveAspectRatio&, float viewWidth, float viewHeight);
diff --git a/WebCore/svg/SVGFontData.cpp b/WebCore/svg/SVGFontData.cpp
index a88de66..63433ee 100644
--- a/WebCore/svg/SVGFontData.cpp
+++ b/WebCore/svg/SVGFontData.cpp
@@ -36,10 +36,6 @@ SVGFontData::SVGFontData(SVGFontFaceElement* fontFaceElement)
ASSERT_ARG(fontFaceElement, fontFaceElement);
}
-SVGFontData::~SVGFontData()
-{
-}
-
} // namespace WebCore
#endif
diff --git a/WebCore/svg/SVGFontData.h b/WebCore/svg/SVGFontData.h
index c66aa23..e897a59 100644
--- a/WebCore/svg/SVGFontData.h
+++ b/WebCore/svg/SVGFontData.h
@@ -28,7 +28,7 @@ namespace WebCore {
class SVGFontData : public Noncopyable {
public:
SVGFontData(SVGFontFaceElement*);
- virtual ~SVGFontData();
+ virtual ~SVGFontData() { }
SVGFontFaceElement* svgFontFaceElement() const { return m_svgFontFaceElement; }
diff --git a/WebCore/svg/SVGFontElement.cpp b/WebCore/svg/SVGFontElement.cpp
index 2d29042..ae0cb6e 100644
--- a/WebCore/svg/SVGFontElement.cpp
+++ b/WebCore/svg/SVGFontElement.cpp
@@ -40,14 +40,15 @@ namespace WebCore {
using namespace SVGNames;
-SVGFontElement::SVGFontElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
+inline SVGFontElement::SVGFontElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
, m_isGlyphCacheValid(false)
{
}
-SVGFontElement::~SVGFontElement()
+PassRefPtr<SVGFontElement> SVGFontElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFontElement(tagName, document));
}
void SVGFontElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGFontElement.h b/WebCore/svg/SVGFontElement.h
index 24c2fc5..98bf766 100644
--- a/WebCore/svg/SVGFontElement.h
+++ b/WebCore/svg/SVGFontElement.h
@@ -50,14 +50,11 @@ struct SVGKerningPair {
typedef Vector<SVGKerningPair> KerningPairVector;
class SVGMissingGlyphElement;
+
class SVGFontElement : public SVGStyledElement
, public SVGExternalResourcesRequired {
public:
- SVGFontElement(const QualifiedName&, Document*);
- virtual ~SVGFontElement();
-
- virtual void synchronizeProperty(const QualifiedName&);
- virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+ static PassRefPtr<SVGFontElement> create(const QualifiedName&, Document*);
void invalidateGlyphCache();
@@ -69,11 +66,16 @@ public:
SVGMissingGlyphElement* firstMissingGlyphElement() const;
private:
- // SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGFontElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ SVGFontElement(const QualifiedName&, Document*);
+
+ virtual void synchronizeProperty(const QualifiedName&);
+ virtual bool rendererIsNeeded(RenderStyle*) { return false; }
void ensureGlyphCache() const;
+ // SVGExternalResourcesRequired
+ DECLARE_ANIMATED_PROPERTY(SVGFontElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+
mutable KerningPairVector m_horizontalKerningPairs;
mutable KerningPairVector m_verticalKerningPairs;
mutable SVGGlyphMap m_glyphMap;
diff --git a/WebCore/svg/SVGFontFaceElement.cpp b/WebCore/svg/SVGFontFaceElement.cpp
index 42c1c75..4884074 100644
--- a/WebCore/svg/SVGFontFaceElement.cpp
+++ b/WebCore/svg/SVGFontFaceElement.cpp
@@ -46,18 +46,19 @@ namespace WebCore {
using namespace SVGNames;
-SVGFontFaceElement::SVGFontFaceElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+inline SVGFontFaceElement::SVGFontFaceElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
, m_fontFaceRule(CSSFontFaceRule::create())
, m_styleDeclaration(CSSMutableStyleDeclaration::create())
{
- m_styleDeclaration->setParent(document()->mappedElementSheet());
+ m_styleDeclaration->setParent(document->mappedElementSheet());
m_styleDeclaration->setStrictParsing(true);
m_fontFaceRule->setDeclaration(m_styleDeclaration.get());
}
-SVGFontFaceElement::~SVGFontFaceElement()
+PassRefPtr<SVGFontFaceElement> SVGFontFaceElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFontFaceElement(tagName, document));
}
static int cssPropertyIdForSVGAttributeName(const QualifiedName& attrName)
@@ -307,7 +308,7 @@ void SVGFontFaceElement::rebuildFontFace()
}
}
- document()->updateStyleSelector();
+ document()->styleSelectorChanged(DeferRecalcStyle);
}
void SVGFontFaceElement::insertedIntoDocument()
@@ -342,7 +343,7 @@ void SVGFontFaceElement::removeFromMappedElementSheet()
break;
}
}
- document()->updateStyleSelector();
+ document()->styleSelectorChanged(DeferRecalcStyle);
}
} // namespace WebCore
diff --git a/WebCore/svg/SVGFontFaceElement.h b/WebCore/svg/SVGFontFaceElement.h
index 7d1f457..3ee71d8 100644
--- a/WebCore/svg/SVGFontFaceElement.h
+++ b/WebCore/svg/SVGFontFaceElement.h
@@ -33,14 +33,7 @@ namespace WebCore {
class SVGFontFaceElement : public SVGElement {
public:
- SVGFontFaceElement(const QualifiedName&, Document*);
- virtual ~SVGFontFaceElement();
-
- virtual void parseMappedAttribute(Attribute*);
-
- virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
- virtual void insertedIntoDocument();
- virtual void removedFromDocument();
+ static PassRefPtr<SVGFontFaceElement> create(const QualifiedName&, Document*);
unsigned unitsPerEm() const;
int xHeight() const;
@@ -59,6 +52,14 @@ namespace WebCore {
void removeFromMappedElementSheet();
private:
+ SVGFontFaceElement(const QualifiedName&, Document*);
+
+ virtual void parseMappedAttribute(Attribute*);
+
+ virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+ virtual void insertedIntoDocument();
+ virtual void removedFromDocument();
+
RefPtr<CSSFontFaceRule> m_fontFaceRule;
RefPtr<CSSMutableStyleDeclaration> m_styleDeclaration;
diff --git a/WebCore/svg/SVGFontFaceFormatElement.cpp b/WebCore/svg/SVGFontFaceFormatElement.cpp
index d6e3a3d..e3182c4 100644
--- a/WebCore/svg/SVGFontFaceFormatElement.cpp
+++ b/WebCore/svg/SVGFontFaceFormatElement.cpp
@@ -29,11 +29,16 @@ namespace WebCore {
using namespace SVGNames;
-SVGFontFaceFormatElement::SVGFontFaceFormatElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+inline SVGFontFaceFormatElement::SVGFontFaceFormatElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
+PassRefPtr<SVGFontFaceFormatElement> SVGFontFaceFormatElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGFontFaceFormatElement(tagName, document));
+}
+
void SVGFontFaceFormatElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
{
SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
diff --git a/WebCore/svg/SVGFontFaceFormatElement.h b/WebCore/svg/SVGFontFaceFormatElement.h
index eae22bf..6ca6c1f 100644
--- a/WebCore/svg/SVGFontFaceFormatElement.h
+++ b/WebCore/svg/SVGFontFaceFormatElement.h
@@ -27,6 +27,9 @@ namespace WebCore {
class SVGFontFaceFormatElement : public SVGElement {
public:
+ static PassRefPtr<SVGFontFaceFormatElement> create(const QualifiedName&, Document*);
+
+private:
SVGFontFaceFormatElement(const QualifiedName&, Document*);
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
diff --git a/WebCore/svg/SVGFontFaceNameElement.cpp b/WebCore/svg/SVGFontFaceNameElement.cpp
index b9657b3..39ac2b3 100644
--- a/WebCore/svg/SVGFontFaceNameElement.cpp
+++ b/WebCore/svg/SVGFontFaceNameElement.cpp
@@ -27,11 +27,16 @@
namespace WebCore {
-SVGFontFaceNameElement::SVGFontFaceNameElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+inline SVGFontFaceNameElement::SVGFontFaceNameElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
+PassRefPtr<SVGFontFaceNameElement> SVGFontFaceNameElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGFontFaceNameElement(tagName, document));
+}
+
PassRefPtr<CSSFontFaceSrcValue> SVGFontFaceNameElement::srcValue() const
{
return CSSFontFaceSrcValue::createLocal(getAttribute(SVGNames::nameAttr));
diff --git a/WebCore/svg/SVGFontFaceNameElement.h b/WebCore/svg/SVGFontFaceNameElement.h
index ab71b7d..462d7a8 100644
--- a/WebCore/svg/SVGFontFaceNameElement.h
+++ b/WebCore/svg/SVGFontFaceNameElement.h
@@ -24,12 +24,17 @@
#include "SVGElement.h"
namespace WebCore {
+
class CSSFontFaceSrcValue;
+
class SVGFontFaceNameElement : public SVGElement {
public:
- SVGFontFaceNameElement(const QualifiedName&, Document*);
+ static PassRefPtr<SVGFontFaceNameElement> create(const QualifiedName&, Document*);
PassRefPtr<CSSFontFaceSrcValue> srcValue() const;
+
+ private:
+ SVGFontFaceNameElement(const QualifiedName&, Document*);
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFontFaceSrcElement.cpp b/WebCore/svg/SVGFontFaceSrcElement.cpp
index 77b2e5e..891ddcd 100644
--- a/WebCore/svg/SVGFontFaceSrcElement.cpp
+++ b/WebCore/svg/SVGFontFaceSrcElement.cpp
@@ -33,11 +33,16 @@ namespace WebCore {
using namespace SVGNames;
-SVGFontFaceSrcElement::SVGFontFaceSrcElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+inline SVGFontFaceSrcElement::SVGFontFaceSrcElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
+PassRefPtr<SVGFontFaceSrcElement> SVGFontFaceSrcElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGFontFaceSrcElement(tagName, document));
+}
+
PassRefPtr<CSSValueList> SVGFontFaceSrcElement::srcValue() const
{
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
diff --git a/WebCore/svg/SVGFontFaceSrcElement.h b/WebCore/svg/SVGFontFaceSrcElement.h
index 0277e9a..e6f8d30 100644
--- a/WebCore/svg/SVGFontFaceSrcElement.h
+++ b/WebCore/svg/SVGFontFaceSrcElement.h
@@ -24,13 +24,18 @@
#include "SVGElement.h"
namespace WebCore {
+
class CSSValueList;
+
class SVGFontFaceSrcElement : public SVGElement {
public:
- SVGFontFaceSrcElement(const QualifiedName&, Document*);
-
+ static PassRefPtr<SVGFontFaceSrcElement> create(const QualifiedName&, Document*);
+
PassRefPtr<CSSValueList> srcValue() const;
+ private:
+ SVGFontFaceSrcElement(const QualifiedName&, Document*);
+
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
};
diff --git a/WebCore/svg/SVGFontFaceUriElement.cpp b/WebCore/svg/SVGFontFaceUriElement.cpp
index a7ad370..4d03b2b 100644
--- a/WebCore/svg/SVGFontFaceUriElement.cpp
+++ b/WebCore/svg/SVGFontFaceUriElement.cpp
@@ -36,11 +36,16 @@ namespace WebCore {
using namespace SVGNames;
-SVGFontFaceUriElement::SVGFontFaceUriElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+inline SVGFontFaceUriElement::SVGFontFaceUriElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
+PassRefPtr<SVGFontFaceUriElement> SVGFontFaceUriElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGFontFaceUriElement(tagName, document));
+}
+
SVGFontFaceUriElement::~SVGFontFaceUriElement()
{
if (m_cachedFont)
diff --git a/WebCore/svg/SVGFontFaceUriElement.h b/WebCore/svg/SVGFontFaceUriElement.h
index b026160..74999ac 100644
--- a/WebCore/svg/SVGFontFaceUriElement.h
+++ b/WebCore/svg/SVGFontFaceUriElement.h
@@ -32,15 +32,20 @@ namespace WebCore {
class SVGFontFaceUriElement : public SVGElement, public CachedResourceClient {
public:
- SVGFontFaceUriElement(const QualifiedName&, Document*);
- ~SVGFontFaceUriElement();
-
+ static PassRefPtr<SVGFontFaceUriElement> create(const QualifiedName&, Document*);
+
+ virtual ~SVGFontFaceUriElement();
+
PassRefPtr<CSSFontFaceSrcValue> srcValue() const;
+ private:
+ SVGFontFaceUriElement(const QualifiedName&, Document*);
+
virtual void parseMappedAttribute(Attribute*);
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
virtual void insertedIntoDocument();
+<<<<<<< HEAD
#ifdef ANDROID_INSTRUMENT
void* operator new(size_t size) {
return SVGElement::operator new(size);
@@ -58,6 +63,8 @@ namespace WebCore {
#endif
private:
+=======
+>>>>>>> webkit.org at r66666
void loadFont();
CachedResourceHandle<CachedFont> m_cachedFont;
diff --git a/WebCore/svg/SVGForeignObjectElement.cpp b/WebCore/svg/SVGForeignObjectElement.cpp
index 3e9e90e..e4f7096 100644
--- a/WebCore/svg/SVGForeignObjectElement.cpp
+++ b/WebCore/svg/SVGForeignObjectElement.cpp
@@ -33,11 +33,8 @@
namespace WebCore {
-SVGForeignObjectElement::SVGForeignObjectElement(const QualifiedName& tagName, Document *doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+SVGForeignObjectElement::SVGForeignObjectElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
, m_x(LengthModeWidth)
, m_y(LengthModeHeight)
, m_width(LengthModeWidth)
@@ -45,8 +42,9 @@ SVGForeignObjectElement::SVGForeignObjectElement(const QualifiedName& tagName, D
{
}
-SVGForeignObjectElement::~SVGForeignObjectElement()
+PassRefPtr<SVGForeignObjectElement> SVGForeignObjectElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGForeignObjectElement(tagName, document));
}
void SVGForeignObjectElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGForeignObjectElement.h b/WebCore/svg/SVGForeignObjectElement.h
index 5ce16fd..a587134 100644
--- a/WebCore/svg/SVGForeignObjectElement.h
+++ b/WebCore/svg/SVGForeignObjectElement.h
@@ -35,18 +35,19 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGForeignObjectElement> create(const QualifiedName&, Document*);
+
+ private:
SVGForeignObjectElement(const QualifiedName&, Document*);
- virtual ~SVGForeignObjectElement();
virtual bool isValid() const { return SVGTests::isValid(); }
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
- bool childShouldCreateRenderer(Node*) const;
+ virtual bool childShouldCreateRenderer(Node*) const;
virtual RenderObject* createRenderer(RenderArena* arena, RenderStyle* style);
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGForeignObjectElement, SVGNames::xAttr, SVGLength, X, x)
diff --git a/WebCore/svg/SVGGElement.cpp b/WebCore/svg/SVGGElement.cpp
index 0c85a03..8174eac 100644
--- a/WebCore/svg/SVGGElement.cpp
+++ b/WebCore/svg/SVGGElement.cpp
@@ -29,16 +29,14 @@
namespace WebCore {
-SVGGElement::SVGGElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+SVGGElement::SVGGElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
{
}
-SVGGElement::~SVGGElement()
+PassRefPtr<SVGGElement> SVGGElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGGElement(tagName, document));
}
void SVGGElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGGElement.h b/WebCore/svg/SVGGElement.h
index 107fa3c..a149351 100644
--- a/WebCore/svg/SVGGElement.h
+++ b/WebCore/svg/SVGGElement.h
@@ -34,10 +34,16 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
- SVGGElement(const QualifiedName&, Document*);
- virtual ~SVGGElement();
+ static PassRefPtr<SVGGElement> create(const QualifiedName&, Document*);
virtual bool isShadowTreeContainerElement() const { return false; }
+
+ protected:
+ SVGGElement(const QualifiedName&, Document*);
+
+ virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+
+ private:
virtual bool isValid() const { return SVGTests::isValid(); }
virtual void parseMappedAttribute(Attribute*);
@@ -45,9 +51,7 @@ namespace WebCore {
virtual void synchronizeProperty(const QualifiedName&);
virtual bool rendererIsNeeded(RenderStyle*) { return true; }
- virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- private:
// SVGExternalResourcesRequired
DECLARE_ANIMATED_PROPERTY(SVGGElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
diff --git a/WebCore/svg/SVGGlyphElement.cpp b/WebCore/svg/SVGGlyphElement.cpp
index 2c84841..8ded0fc 100644
--- a/WebCore/svg/SVGGlyphElement.cpp
+++ b/WebCore/svg/SVGGlyphElement.cpp
@@ -37,13 +37,14 @@ namespace WebCore {
using namespace SVGNames;
-SVGGlyphElement::SVGGlyphElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
+inline SVGGlyphElement::SVGGlyphElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
{
}
-SVGGlyphElement::~SVGGlyphElement()
+PassRefPtr<SVGGlyphElement> SVGGlyphElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGGlyphElement(tagName, document));
}
void SVGGlyphElement::invalidateGlyphCache()
diff --git a/WebCore/svg/SVGGlyphElement.h b/WebCore/svg/SVGGlyphElement.h
index 5b5408d..a7dd570 100644
--- a/WebCore/svg/SVGGlyphElement.h
+++ b/WebCore/svg/SVGGlyphElement.h
@@ -103,15 +103,7 @@ namespace WebCore {
class SVGGlyphElement : public SVGStyledElement {
public:
- SVGGlyphElement(const QualifiedName&, Document*);
- virtual ~SVGGlyphElement();
-
- virtual void parseMappedAttribute(Attribute*);
-
- virtual void insertedIntoDocument();
- virtual void removedFromDocument();
-
- virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+ static PassRefPtr<SVGGlyphElement> create(const QualifiedName&, Document*);
SVGGlyphIdentifier buildGlyphIdentifier() const;
@@ -121,7 +113,17 @@ namespace WebCore {
// Helper function shared between SVGGlyphElement & SVGMissingGlyphElement
static SVGGlyphIdentifier buildGenericGlyphIdentifier(const SVGElement*);
+
private:
+ SVGGlyphElement(const QualifiedName&, Document*);
+
+ virtual void parseMappedAttribute(Attribute*);
+
+ virtual void insertedIntoDocument();
+ virtual void removedFromDocument();
+
+ virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+
void invalidateGlyphCache();
};
diff --git a/WebCore/svg/SVGGradientElement.cpp b/WebCore/svg/SVGGradientElement.cpp
index f2d9712..523e4df 100644
--- a/WebCore/svg/SVGGradientElement.cpp
+++ b/WebCore/svg/SVGGradientElement.cpp
@@ -38,19 +38,13 @@
namespace WebCore {
-SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
- , SVGURIReference()
- , SVGExternalResourcesRequired()
+SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
, m_gradientUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
, m_gradientTransform(SVGTransformList::create(SVGNames::gradientTransformAttr))
{
}
-SVGGradientElement::~SVGGradientElement()
-{
-}
-
void SVGGradientElement::parseMappedAttribute(Attribute* attr)
{
if (attr->name() == SVGNames::gradientUnitsAttr) {
diff --git a/WebCore/svg/SVGGradientElement.h b/WebCore/svg/SVGGradientElement.h
index 9976d7d..d1e7914 100644
--- a/WebCore/svg/SVGGradientElement.h
+++ b/WebCore/svg/SVGGradientElement.h
@@ -34,20 +34,20 @@ namespace WebCore {
public SVGURIReference,
public SVGExternalResourcesRequired {
public:
+ Vector<Gradient::ColorStop> buildStops();
+
+ protected:
SVGGradientElement(const QualifiedName&, Document*);
- virtual ~SVGGradientElement();
-
- virtual bool needsPendingResourceHandling() const { return false; }
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
+ private:
+ virtual bool needsPendingResourceHandling() const { return false; }
+
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
- Vector<Gradient::ColorStop> buildStops();
-
- protected:
DECLARE_ANIMATED_PROPERTY(SVGGradientElement, SVGNames::spreadMethodAttr, int, SpreadMethod, spreadMethod)
DECLARE_ANIMATED_PROPERTY(SVGGradientElement, SVGNames::gradientUnitsAttr, int, GradientUnits, gradientUnits)
DECLARE_ANIMATED_PROPERTY(SVGGradientElement, SVGNames::gradientTransformAttr, SVGTransformList*, GradientTransform, gradientTransform)
diff --git a/WebCore/svg/SVGHKernElement.cpp b/WebCore/svg/SVGHKernElement.cpp
index eb8a4b5..a432daa 100644
--- a/WebCore/svg/SVGHKernElement.cpp
+++ b/WebCore/svg/SVGHKernElement.cpp
@@ -35,13 +35,14 @@ namespace WebCore {
using namespace SVGNames;
-SVGHKernElement::SVGHKernElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+inline SVGHKernElement::SVGHKernElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
-SVGHKernElement::~SVGHKernElement()
+PassRefPtr<SVGHKernElement> SVGHKernElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGHKernElement(tagName, document));
}
void SVGHKernElement::insertedIntoDocument()
diff --git a/WebCore/svg/SVGHKernElement.h b/WebCore/svg/SVGHKernElement.h
index bd893d8..7249fac 100644
--- a/WebCore/svg/SVGHKernElement.h
+++ b/WebCore/svg/SVGHKernElement.h
@@ -24,27 +24,22 @@
#if ENABLE(SVG_FONTS)
#include "SVGFontElement.h"
-#include "SVGParserUtilities.h"
-#include "SVGStyledElement.h"
-#include <wtf/Forward.h>
-
-#include <limits>
namespace WebCore {
- class SVGFontData;
-
class SVGHKernElement : public SVGElement {
public:
+ static PassRefPtr<SVGHKernElement> create(const QualifiedName&, Document*);
+
+ void buildHorizontalKerningPair(KerningPairVector&);
+
+ private:
SVGHKernElement(const QualifiedName&, Document*);
- virtual ~SVGHKernElement();
virtual void insertedIntoDocument();
virtual void removedFromDocument();
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
-
- void buildHorizontalKerningPair(KerningPairVector&);
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGImageElement.cpp b/WebCore/svg/SVGImageElement.cpp
index c5e4802..f6fa013 100644
--- a/WebCore/svg/SVGImageElement.cpp
+++ b/WebCore/svg/SVGImageElement.cpp
@@ -26,6 +26,7 @@
#include "Attribute.h"
#include "CSSPropertyNames.h"
+#include "RenderImageResource.h"
#include "RenderSVGImage.h"
#include "RenderSVGResource.h"
#include "SVGDocument.h"
@@ -36,12 +37,8 @@
namespace WebCore {
-SVGImageElement::SVGImageElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
- , SVGURIReference()
+inline SVGImageElement::SVGImageElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
, m_x(LengthModeWidth)
, m_y(LengthModeHeight)
, m_width(LengthModeWidth)
@@ -50,8 +47,9 @@ SVGImageElement::SVGImageElement(const QualifiedName& tagName, Document* doc)
{
}
-SVGImageElement::~SVGImageElement()
+PassRefPtr<SVGImageElement> SVGImageElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGImageElement(tagName, document));
}
void SVGImageElement::parseMappedAttribute(Attribute* attr)
@@ -172,10 +170,10 @@ void SVGImageElement::attach()
SVGStyledTransformableElement::attach();
if (RenderSVGImage* imageObj = toRenderSVGImage(renderer())) {
- if (imageObj->hasImage())
+ if (imageObj->imageResource()->hasImage())
return;
- imageObj->setCachedImage(m_imageLoader.image());
+ imageObj->imageResource()->setCachedImage(m_imageLoader.image());
}
}
diff --git a/WebCore/svg/SVGImageElement.h b/WebCore/svg/SVGImageElement.h
index cf4cf88..9024415 100644
--- a/WebCore/svg/SVGImageElement.h
+++ b/WebCore/svg/SVGImageElement.h
@@ -40,8 +40,10 @@ namespace WebCore {
public SVGExternalResourcesRequired,
public SVGURIReference {
public:
+ static PassRefPtr<SVGImageElement> create(const QualifiedName&, Document*);
+
+ private:
SVGImageElement(const QualifiedName&, Document*);
- virtual ~SVGImageElement();
virtual bool isValid() const { return SVGTests::isValid(); }
@@ -57,10 +59,8 @@ namespace WebCore {
virtual const QualifiedName& imageSourceAttributeName() const;
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
- protected:
virtual bool haveLoadedRequiredResources();
- private:
virtual bool selfHasRelativeLengths() const;
virtual void willMoveToNewOwnerDocument();
diff --git a/WebCore/svg/SVGImageLoader.cpp b/WebCore/svg/SVGImageLoader.cpp
index 3d04863..5ba9c81 100644
--- a/WebCore/svg/SVGImageLoader.cpp
+++ b/WebCore/svg/SVGImageLoader.cpp
@@ -35,10 +35,6 @@ SVGImageLoader::SVGImageLoader(SVGImageElement* node)
{
}
-SVGImageLoader::~SVGImageLoader()
-{
-}
-
void SVGImageLoader::dispatchLoadEvent()
{
if (image()->errorOccurred())
diff --git a/WebCore/svg/SVGImageLoader.h b/WebCore/svg/SVGImageLoader.h
index 807a9bc..98dcffc 100644
--- a/WebCore/svg/SVGImageLoader.h
+++ b/WebCore/svg/SVGImageLoader.h
@@ -30,8 +30,8 @@ namespace WebCore {
class SVGImageLoader : public ImageLoader {
public:
SVGImageLoader(SVGImageElement*);
- virtual ~SVGImageLoader();
+ private:
virtual void dispatchLoadEvent();
virtual String sourceURI(const AtomicString&) const;
};
diff --git a/WebCore/svg/SVGLangSpace.cpp b/WebCore/svg/SVGLangSpace.cpp
index 4ac7c00..ad6458c 100644
--- a/WebCore/svg/SVGLangSpace.cpp
+++ b/WebCore/svg/SVGLangSpace.cpp
@@ -30,19 +30,6 @@
namespace WebCore {
-SVGLangSpace::SVGLangSpace()
-{
-}
-
-SVGLangSpace::~SVGLangSpace()
-{
-}
-
-const AtomicString& SVGLangSpace::xmllang() const
-{
- return m_lang;
-}
-
void SVGLangSpace::setXmllang(const AtomicString& xmlLang)
{
m_lang = xmlLang;
diff --git a/WebCore/svg/SVGLangSpace.h b/WebCore/svg/SVGLangSpace.h
index 64e435d..723fa7a 100644
--- a/WebCore/svg/SVGLangSpace.h
+++ b/WebCore/svg/SVGLangSpace.h
@@ -31,10 +31,7 @@ namespace WebCore {
class SVGLangSpace {
public:
- SVGLangSpace();
- virtual ~SVGLangSpace();
-
- const AtomicString& xmllang() const;
+ const AtomicString& xmllang() const { return m_lang; }
void setXmllang(const AtomicString& xmlLang);
const AtomicString& xmlspace() const;
diff --git a/WebCore/svg/SVGLengthList.cpp b/WebCore/svg/SVGLengthList.cpp
index d144ca0..2149e04 100644
--- a/WebCore/svg/SVGLengthList.cpp
+++ b/WebCore/svg/SVGLengthList.cpp
@@ -32,10 +32,6 @@ SVGLengthList::SVGLengthList(const QualifiedName& attributeName)
{
}
-SVGLengthList::~SVGLengthList()
-{
-}
-
void SVGLengthList::parse(const String& value, SVGLengthMode mode)
{
ExceptionCode ec = 0;
diff --git a/WebCore/svg/SVGLengthList.h b/WebCore/svg/SVGLengthList.h
index bbabf62..27b958f 100644
--- a/WebCore/svg/SVGLengthList.h
+++ b/WebCore/svg/SVGLengthList.h
@@ -30,9 +30,8 @@ namespace WebCore {
class SVGLengthList : public SVGPODList<SVGLength> {
public:
static PassRefPtr<SVGLengthList> create(const QualifiedName& attributeName) { return adoptRef(new SVGLengthList(attributeName)); }
- virtual ~SVGLengthList();
- void parse(const String& value, SVGLengthMode mode);
+ void parse(const String& value, SVGLengthMode);
String valueAsString() const;
diff --git a/WebCore/svg/SVGLineElement.cpp b/WebCore/svg/SVGLineElement.cpp
index ebbcdf6..bd15890 100644
--- a/WebCore/svg/SVGLineElement.cpp
+++ b/WebCore/svg/SVGLineElement.cpp
@@ -32,11 +32,8 @@
namespace WebCore {
-SVGLineElement::SVGLineElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGLineElement::SVGLineElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
, m_x1(LengthModeWidth)
, m_y1(LengthModeHeight)
, m_x2(LengthModeWidth)
@@ -44,8 +41,9 @@ SVGLineElement::SVGLineElement(const QualifiedName& tagName, Document* doc)
{
}
-SVGLineElement::~SVGLineElement()
+PassRefPtr<SVGLineElement> SVGLineElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGLineElement(tagName, document));
}
void SVGLineElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGLineElement.h b/WebCore/svg/SVGLineElement.h
index cdfa2aa..21007f0 100644
--- a/WebCore/svg/SVGLineElement.h
+++ b/WebCore/svg/SVGLineElement.h
@@ -36,8 +36,10 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGLineElement> create(const QualifiedName&, Document*);
+
+ private:
SVGLineElement(const QualifiedName&, Document*);
- virtual ~SVGLineElement();
virtual bool isValid() const { return SVGTests::isValid(); }
@@ -49,7 +51,6 @@ namespace WebCore {
virtual bool supportsMarkers() const { return true; }
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGLineElement, SVGNames::x1Attr, SVGLength, X1, x1)
diff --git a/WebCore/svg/SVGLinearGradientElement.cpp b/WebCore/svg/SVGLinearGradientElement.cpp
index d3c81b0..ec351d7 100644
--- a/WebCore/svg/SVGLinearGradientElement.cpp
+++ b/WebCore/svg/SVGLinearGradientElement.cpp
@@ -39,8 +39,8 @@
namespace WebCore {
-SVGLinearGradientElement::SVGLinearGradientElement(const QualifiedName& tagName, Document* doc)
- : SVGGradientElement(tagName, doc)
+inline SVGLinearGradientElement::SVGLinearGradientElement(const QualifiedName& tagName, Document* document)
+ : SVGGradientElement(tagName, document)
, m_x1(LengthModeWidth)
, m_y1(LengthModeHeight)
, m_x2(LengthModeWidth, "100%")
@@ -49,8 +49,9 @@ SVGLinearGradientElement::SVGLinearGradientElement(const QualifiedName& tagName,
// Spec: If the x2 attribute is not specified, the effect is as if a value of "100%" were specified.
}
-SVGLinearGradientElement::~SVGLinearGradientElement()
+PassRefPtr<SVGLinearGradientElement> SVGLinearGradientElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGLinearGradientElement(tagName, document));
}
void SVGLinearGradientElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGLinearGradientElement.h b/WebCore/svg/SVGLinearGradientElement.h
index b329d8b..dec912f 100644
--- a/WebCore/svg/SVGLinearGradientElement.h
+++ b/WebCore/svg/SVGLinearGradientElement.h
@@ -31,8 +31,13 @@ namespace WebCore {
class SVGLinearGradientElement : public SVGGradientElement {
public:
+ static PassRefPtr<SVGLinearGradientElement> create(const QualifiedName&, Document*);
+
+ LinearGradientAttributes collectGradientProperties();
+ void calculateStartEndPoints(const LinearGradientAttributes&, FloatPoint& startPoint, FloatPoint& endPoint);
+
+ private:
SVGLinearGradientElement(const QualifiedName&, Document*);
- virtual ~SVGLinearGradientElement();
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
@@ -40,10 +45,6 @@ namespace WebCore {
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- LinearGradientAttributes collectGradientProperties();
- void calculateStartEndPoints(const LinearGradientAttributes&, FloatPoint& startPoint, FloatPoint& endPoint);
-
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGLinearGradientElement, SVGNames::x1Attr, SVGLength, X1, x1)
diff --git a/WebCore/svg/SVGLocatable.cpp b/WebCore/svg/SVGLocatable.cpp
index b7b4440..3311a5a 100644
--- a/WebCore/svg/SVGLocatable.cpp
+++ b/WebCore/svg/SVGLocatable.cpp
@@ -31,14 +31,6 @@
namespace WebCore {
-SVGLocatable::SVGLocatable()
-{
-}
-
-SVGLocatable::~SVGLocatable()
-{
-}
-
static bool isViewportElement(Node* node)
{
return (node->hasTagName(SVGNames::svgTag)
diff --git a/WebCore/svg/SVGLocatable.h b/WebCore/svg/SVGLocatable.h
index 2e51dc5..b19f5cd 100644
--- a/WebCore/svg/SVGLocatable.h
+++ b/WebCore/svg/SVGLocatable.h
@@ -33,8 +33,7 @@ class SVGElement;
class SVGLocatable {
public:
- SVGLocatable();
- virtual ~SVGLocatable();
+ virtual ~SVGLocatable() { }
// 'SVGLocatable' functions
virtual SVGElement* nearestViewportElement() const = 0;
diff --git a/WebCore/svg/SVGMPathElement.cpp b/WebCore/svg/SVGMPathElement.cpp
index 7165c11..c6da308 100644
--- a/WebCore/svg/SVGMPathElement.cpp
+++ b/WebCore/svg/SVGMPathElement.cpp
@@ -27,13 +27,14 @@
namespace WebCore {
-SVGMPathElement::SVGMPathElement(const QualifiedName& qname, Document* doc)
- : SVGElement(qname, doc)
+inline SVGMPathElement::SVGMPathElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
-SVGMPathElement::~SVGMPathElement()
+PassRefPtr<SVGMPathElement> SVGMPathElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGMPathElement(tagName, document));
}
void SVGMPathElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGMPathElement.h b/WebCore/svg/SVGMPathElement.h
index 7543b6e..1bbe7d3 100644
--- a/WebCore/svg/SVGMPathElement.h
+++ b/WebCore/svg/SVGMPathElement.h
@@ -32,15 +32,16 @@ namespace WebCore {
public SVGURIReference,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGMPathElement> create(const QualifiedName&, Document*);
+
+ SVGPathElement* pathElement();
+
+ private:
SVGMPathElement(const QualifiedName&, Document*);
- virtual ~SVGMPathElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
- SVGPathElement* pathElement();
-
- private:
// SVGURIReference
DECLARE_ANIMATED_PROPERTY(SVGMPathElement, XLinkNames::hrefAttr, String, Href, href)
diff --git a/WebCore/svg/SVGMarkerElement.cpp b/WebCore/svg/SVGMarkerElement.cpp
index 8e6296d..4ff420d 100644
--- a/WebCore/svg/SVGMarkerElement.cpp
+++ b/WebCore/svg/SVGMarkerElement.cpp
@@ -38,11 +38,8 @@ namespace WebCore {
char SVGOrientTypeAttrIdentifier[] = "SVGOrientTypeAttr";
char SVGOrientAngleAttrIdentifier[] = "SVGOrientAngleAttr";
-SVGMarkerElement::SVGMarkerElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
- , SVGFitToViewBox()
+SVGMarkerElement::SVGMarkerElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
, m_refX(LengthModeWidth)
, m_refY(LengthModeHeight)
, m_markerWidth(LengthModeWidth, "3")
@@ -53,8 +50,9 @@ SVGMarkerElement::SVGMarkerElement(const QualifiedName& tagName, Document* doc)
// Spec: If the markerWidth/markerHeight attribute is not specified, the effect is as if a value of "3" were specified.
}
-SVGMarkerElement::~SVGMarkerElement()
+PassRefPtr<SVGMarkerElement> SVGMarkerElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGMarkerElement(tagName, document));
}
AffineTransform SVGMarkerElement::viewBoxToViewTransform(float viewWidth, float viewHeight) const
diff --git a/WebCore/svg/SVGMarkerElement.h b/WebCore/svg/SVGMarkerElement.h
index 436aaa7..7782739 100644
--- a/WebCore/svg/SVGMarkerElement.h
+++ b/WebCore/svg/SVGMarkerElement.h
@@ -53,16 +53,18 @@ public:
SVG_MARKER_ORIENT_ANGLE = 2
};
- SVGMarkerElement(const QualifiedName&, Document*);
- virtual ~SVGMarkerElement();
-
- virtual bool needsPendingResourceHandling() const { return false; }
+ static PassRefPtr<SVGMarkerElement> create(const QualifiedName&, Document*);
AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) const;
void setOrientToAuto();
void setOrientToAngle(const SVGAngle&);
+private:
+ SVGMarkerElement(const QualifiedName&, Document*);
+
+ virtual bool needsPendingResourceHandling() const { return false; }
+
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
@@ -70,7 +72,6 @@ public:
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
-private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGMarkerElement, SVGNames::refXAttr, SVGLength, RefX, refX)
diff --git a/WebCore/svg/SVGMaskElement.cpp b/WebCore/svg/SVGMaskElement.cpp
index 4f245ce..78c3732 100644
--- a/WebCore/svg/SVGMaskElement.cpp
+++ b/WebCore/svg/SVGMaskElement.cpp
@@ -38,11 +38,8 @@ using namespace std;
namespace WebCore {
-SVGMaskElement::SVGMaskElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledLocatableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGMaskElement::SVGMaskElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledLocatableElement(tagName, document)
, m_maskUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
, m_maskContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
, m_x(LengthModeWidth, "-10%")
@@ -54,8 +51,9 @@ SVGMaskElement::SVGMaskElement(const QualifiedName& tagName, Document* doc)
// Spec: If the width/height attribute is not specified, the effect is as if a value of "120%" were specified.
}
-SVGMaskElement::~SVGMaskElement()
+PassRefPtr<SVGMaskElement> SVGMaskElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGMaskElement(tagName, document));
}
void SVGMaskElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGMaskElement.h b/WebCore/svg/SVGMaskElement.h
index 91d9bc9..c951beb 100644
--- a/WebCore/svg/SVGMaskElement.h
+++ b/WebCore/svg/SVGMaskElement.h
@@ -36,13 +36,16 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGMaskElement> create(const QualifiedName&, Document*);
+
+ FloatRect maskBoundingBox(const FloatRect&) const;
+
+ private:
SVGMaskElement(const QualifiedName&, Document*);
- virtual ~SVGMaskElement();
virtual bool isValid() const { return SVGTests::isValid(); }
virtual bool needsPendingResourceHandling() const { return false; }
- FloatRect maskBoundingBox(const FloatRect&) const;
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
@@ -50,7 +53,6 @@ namespace WebCore {
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::maskUnitsAttr, int, MaskUnits, maskUnits)
diff --git a/WebCore/svg/SVGMetadataElement.cpp b/WebCore/svg/SVGMetadataElement.cpp
index 28a34d6..6db3806 100644
--- a/WebCore/svg/SVGMetadataElement.cpp
+++ b/WebCore/svg/SVGMetadataElement.cpp
@@ -22,15 +22,18 @@
#if ENABLE(SVG)
#include "SVGMetadataElement.h"
-using namespace WebCore;
+namespace WebCore {
-SVGMetadataElement::SVGMetadataElement(const QualifiedName& tagName, Document *doc)
-: SVGElement(tagName, doc)
+inline SVGMetadataElement::SVGMetadataElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
-SVGMetadataElement::~SVGMetadataElement()
+PassRefPtr<SVGMetadataElement> SVGMetadataElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGMetadataElement(tagName, document));
+}
+
}
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGMetadataElement.h b/WebCore/svg/SVGMetadataElement.h
index 6323f12..4cac5bc 100644
--- a/WebCore/svg/SVGMetadataElement.h
+++ b/WebCore/svg/SVGMetadataElement.h
@@ -25,10 +25,13 @@
#include "SVGElement.h"
namespace WebCore {
+
class SVGMetadataElement : public SVGElement {
public:
+ static PassRefPtr<SVGMetadataElement> create(const QualifiedName&, Document*);
+
+ private:
SVGMetadataElement(const QualifiedName&, Document*);
- virtual ~SVGMetadataElement();
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGMissingGlyphElement.cpp b/WebCore/svg/SVGMissingGlyphElement.cpp
index 3fe531c..4c80494 100644
--- a/WebCore/svg/SVGMissingGlyphElement.cpp
+++ b/WebCore/svg/SVGMissingGlyphElement.cpp
@@ -24,11 +24,16 @@
namespace WebCore {
-SVGMissingGlyphElement::SVGMissingGlyphElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
+inline SVGMissingGlyphElement::SVGMissingGlyphElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
{
}
+PassRefPtr<SVGMissingGlyphElement> SVGMissingGlyphElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGMissingGlyphElement(tagName, document));
+}
+
}
#endif // ENABLE(SVG_FONTS)
diff --git a/WebCore/svg/SVGMissingGlyphElement.h b/WebCore/svg/SVGMissingGlyphElement.h
index 9dde843..ecae295 100644
--- a/WebCore/svg/SVGMissingGlyphElement.h
+++ b/WebCore/svg/SVGMissingGlyphElement.h
@@ -24,8 +24,12 @@
#include "SVGStyledElement.h"
namespace WebCore {
+
class SVGMissingGlyphElement : public SVGStyledElement {
public:
+ static PassRefPtr<SVGMissingGlyphElement> create(const QualifiedName&, Document*);
+
+ private:
SVGMissingGlyphElement(const QualifiedName&, Document*);
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
diff --git a/WebCore/svg/SVGNumberList.cpp b/WebCore/svg/SVGNumberList.cpp
index 0603af7..96fe55f 100644
--- a/WebCore/svg/SVGNumberList.cpp
+++ b/WebCore/svg/SVGNumberList.cpp
@@ -32,10 +32,6 @@ SVGNumberList::SVGNumberList(const QualifiedName& attributeName)
{
}
-SVGNumberList::~SVGNumberList()
-{
-}
-
void SVGNumberList::parse(const String& value)
{
ExceptionCode ec = 0;
diff --git a/WebCore/svg/SVGNumberList.h b/WebCore/svg/SVGNumberList.h
index fa29356..e64b0b7 100644
--- a/WebCore/svg/SVGNumberList.h
+++ b/WebCore/svg/SVGNumberList.h
@@ -31,7 +31,6 @@ namespace WebCore {
class SVGNumberList : public SVGPODList<float> {
public:
static PassRefPtr<SVGNumberList> create(const QualifiedName& attributeName) { return adoptRef(new SVGNumberList(attributeName)); }
- virtual ~SVGNumberList();
void parse(const String& value);
diff --git a/WebCore/svg/SVGPaint.cpp b/WebCore/svg/SVGPaint.cpp
index a2100aa..b36e97d 100644
--- a/WebCore/svg/SVGPaint.cpp
+++ b/WebCore/svg/SVGPaint.cpp
@@ -63,10 +63,6 @@ SVGPaint::SVGPaint(const String& uri, const Color& c)
setUri(uri);
}
-SVGPaint::~SVGPaint()
-{
-}
-
SVGPaint* SVGPaint::defaultFill()
{
static SVGPaint* staticDefaultFill = create(Color::black).releaseRef();
diff --git a/WebCore/svg/SVGPaint.h b/WebCore/svg/SVGPaint.h
index e86c315..f0ceb4c 100644
--- a/WebCore/svg/SVGPaint.h
+++ b/WebCore/svg/SVGPaint.h
@@ -64,16 +64,12 @@ namespace WebCore {
return adoptRef(new SVGPaint(uri, color));
}
- virtual ~SVGPaint();
-
// 'SVGPaint' functions
SVGPaintType paintType() const { return m_paintType; }
String uri() const;
void setUri(const String&);
void setPaint(SVGPaintType, const String& uri, const String& rgbPaint, const String& iccPaint, ExceptionCode&);
-
- virtual String cssText() const;
static SVGPaint* defaultFill();
static SVGPaint* defaultStroke();
@@ -90,6 +86,8 @@ namespace WebCore {
virtual bool isSVGPaint() const { return true; }
+ virtual String cssText() const;
+
SVGPaintType m_paintType;
String m_uri;
};
diff --git a/WebCore/svg/SVGParserUtilities.cpp b/WebCore/svg/SVGParserUtilities.cpp
index 5bf2fbc..b8b6d85 100644
--- a/WebCore/svg/SVGParserUtilities.cpp
+++ b/WebCore/svg/SVGParserUtilities.cpp
@@ -34,11 +34,10 @@
namespace WebCore {
-/* We use this generic _parseNumber function to allow the Path parsing code to work
- * at a higher precision internally, without any unnecessary runtime cost or code
- * complexity
- */
-template <typename FloatType> static bool _parseNumber(const UChar*& ptr, const UChar* end, FloatType& number, bool skip)
+// We use this generic parseNumber function to allow the Path parsing code to work
+// at a higher precision internally, without any unnecessary runtime cost or code
+// complexity.
+template <typename FloatType> static bool genericParseNumber(const UChar*& ptr, const UChar* end, FloatType& number, bool skip)
{
int exponent;
FloatType integer, decimal, frac;
@@ -127,7 +126,7 @@ template <typename FloatType> static bool _parseNumber(const UChar*& ptr, const
bool parseNumber(const UChar*& ptr, const UChar* end, float& number, bool skip)
{
- return _parseNumber(ptr, end, number, skip);
+ return genericParseNumber(ptr, end, number, skip);
}
// only used to parse largeArcFlag and sweepFlag which must be a "0" or "1"
diff --git a/WebCore/svg/SVGPathBlender.cpp b/WebCore/svg/SVGPathBlender.cpp
index 8320890..d46e24a 100644
--- a/WebCore/svg/SVGPathBlender.cpp
+++ b/WebCore/svg/SVGPathBlender.cpp
@@ -34,10 +34,6 @@ SVGPathBlender::SVGPathBlender()
{
}
-SVGPathBlender::~SVGPathBlender()
-{
-}
-
float SVGPathBlender::blendAnimatedFloat(float from, float to)
{
return (to - from) * m_progress + from;
diff --git a/WebCore/svg/SVGPathBlender.h b/WebCore/svg/SVGPathBlender.h
index a15c0ad..c0ae7f3 100644
--- a/WebCore/svg/SVGPathBlender.h
+++ b/WebCore/svg/SVGPathBlender.h
@@ -30,7 +30,6 @@ namespace WebCore {
class SVGPathBlender : public Noncopyable {
public:
SVGPathBlender();
- ~SVGPathBlender();
bool blendAnimatedPath(float, SVGPathSource*, SVGPathSource*, SVGPathConsumer*);
void cleanup();
diff --git a/WebCore/svg/SVGPathBuilder.h b/WebCore/svg/SVGPathBuilder.h
index 38eabd4..f3c2632 100644
--- a/WebCore/svg/SVGPathBuilder.h
+++ b/WebCore/svg/SVGPathBuilder.h
@@ -36,18 +36,18 @@ public:
SVGPathBuilder();
void setCurrentPath(Path* path) { m_path = path; }
+
+private:
virtual void incrementPathSegmentCount() { }
virtual bool continueConsuming() { return true; }
virtual void cleanup() { m_path = 0; }
-private:
// Used in UnalteredParisng/NormalizedParsing modes.
virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode);
virtual void lineTo(const FloatPoint&, PathCoordinateMode);
virtual void curveToCubic(const FloatPoint&, const FloatPoint&, const FloatPoint&, PathCoordinateMode);
virtual void closePath();
-private:
// Only used in UnalteredParsing mode.
virtual void lineToHorizontal(float, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
virtual void lineToVertical(float, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
diff --git a/WebCore/svg/SVGPathByteStreamBuilder.h b/WebCore/svg/SVGPathByteStreamBuilder.h
index c89856f..55803aa 100644
--- a/WebCore/svg/SVGPathByteStreamBuilder.h
+++ b/WebCore/svg/SVGPathByteStreamBuilder.h
@@ -34,18 +34,18 @@ public:
SVGPathByteStreamBuilder();
void setCurrentByteStream(SVGPathByteStream* byteStream) { m_byteStream = byteStream; }
+
+private:
virtual void incrementPathSegmentCount() { }
virtual bool continueConsuming() { return true; }
virtual void cleanup() { m_byteStream = 0; }
-private:
// Used in UnalteredParsing/NormalizedParsing modes.
virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode);
virtual void lineTo(const FloatPoint&, PathCoordinateMode);
virtual void curveToCubic(const FloatPoint&, const FloatPoint&, const FloatPoint&, PathCoordinateMode);
virtual void closePath();
-private:
// Only used in UnalteredParsing mode.
virtual void lineToHorizontal(float, PathCoordinateMode);
virtual void lineToVertical(float, PathCoordinateMode);
@@ -54,7 +54,6 @@ private:
virtual void curveToQuadraticSmooth(const FloatPoint&, PathCoordinateMode);
virtual void arcTo(float, float, float, bool largeArcFlag, bool sweepFlag, const FloatPoint&, PathCoordinateMode);
-private:
template<typename ByteType>
void writeType(const ByteType& type)
{
diff --git a/WebCore/svg/SVGPathByteStreamSource.cpp b/WebCore/svg/SVGPathByteStreamSource.cpp
index e6a60e3..d0475f3 100644
--- a/WebCore/svg/SVGPathByteStreamSource.cpp
+++ b/WebCore/svg/SVGPathByteStreamSource.cpp
@@ -32,10 +32,6 @@ SVGPathByteStreamSource::SVGPathByteStreamSource(SVGPathByteStream* stream)
m_streamEnd = stream->end();
}
-SVGPathByteStreamSource::~SVGPathByteStreamSource()
-{
-}
-
bool SVGPathByteStreamSource::hasMoreData() const
{
return m_streamCurrent < m_streamEnd;
diff --git a/WebCore/svg/SVGPathByteStreamSource.h b/WebCore/svg/SVGPathByteStreamSource.h
index 2537ad2..6895c73 100644
--- a/WebCore/svg/SVGPathByteStreamSource.h
+++ b/WebCore/svg/SVGPathByteStreamSource.h
@@ -35,7 +35,8 @@ public:
return adoptPtr(new SVGPathByteStreamSource(stream));
}
- virtual ~SVGPathByteStreamSource();
+private:
+ SVGPathByteStreamSource(SVGPathByteStream*);
virtual bool hasMoreData() const;
virtual bool moveToNextToken() { return true; }
@@ -52,9 +53,6 @@ public:
virtual bool parseCurveToQuadraticSmoothSegment(FloatPoint&);
virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, FloatPoint&);
-private:
- SVGPathByteStreamSource(SVGPathByteStream*);
-
#if COMPILER(MSVC)
#pragma warning(disable: 4701)
#endif
diff --git a/WebCore/svg/SVGPathConsumer.h b/WebCore/svg/SVGPathConsumer.h
index 629c1bf..b7c5e73 100644
--- a/WebCore/svg/SVGPathConsumer.h
+++ b/WebCore/svg/SVGPathConsumer.h
@@ -46,14 +46,12 @@ public:
virtual bool continueConsuming() = 0;
virtual void cleanup() = 0;
-public:
// Used in UnalteredParisng/NormalizedParsing modes.
virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode) = 0;
virtual void lineTo(const FloatPoint&, PathCoordinateMode) = 0;
virtual void curveToCubic(const FloatPoint&, const FloatPoint&, const FloatPoint&, PathCoordinateMode) = 0;
virtual void closePath() = 0;
-public:
// Only used in UnalteredParsing mode.
virtual void lineToHorizontal(float, PathCoordinateMode) = 0;
virtual void lineToVertical(float, PathCoordinateMode) = 0;
@@ -63,7 +61,6 @@ public:
virtual void arcTo(float, float, float, bool largeArcFlag, bool sweepFlag, const FloatPoint&, PathCoordinateMode) = 0;
protected:
- SVGPathConsumer() { }
virtual ~SVGPathConsumer() { }
};
diff --git a/WebCore/svg/SVGPathElement.cpp b/WebCore/svg/SVGPathElement.cpp
index 6d801fb..3ed85a3 100644
--- a/WebCore/svg/SVGPathElement.cpp
+++ b/WebCore/svg/SVGPathElement.cpp
@@ -44,16 +44,14 @@
namespace WebCore {
-SVGPathElement::SVGPathElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGPathElement::SVGPathElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
{
}
-SVGPathElement::~SVGPathElement()
+PassRefPtr<SVGPathElement> SVGPathElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGPathElement(tagName, document));
}
float SVGPathElement::getTotalLength()
diff --git a/WebCore/svg/SVGPathElement.h b/WebCore/svg/SVGPathElement.h
index 07612c6..cc4e7bd 100644
--- a/WebCore/svg/SVGPathElement.h
+++ b/WebCore/svg/SVGPathElement.h
@@ -50,16 +50,15 @@ namespace WebCore {
class SVGPathSegCurvetoCubicSmoothRel;
class SVGPathSegCurvetoQuadraticSmoothAbs;
class SVGPathSegCurvetoQuadraticSmoothRel;
+
class SVGPathElement : public SVGStyledTransformableElement,
public SVGTests,
public SVGLangSpace,
public SVGExternalResourcesRequired,
public SVGAnimatedPathData {
public:
- SVGPathElement(const QualifiedName&, Document*);
- virtual ~SVGPathElement();
+ static PassRefPtr<SVGPathElement> create(const QualifiedName&, Document*);
- virtual bool isValid() const { return SVGTests::isValid(); }
float getTotalLength();
FloatPoint getPointAtLength(float distance);
unsigned long getPathSegAtLength(float distance);
@@ -90,15 +89,19 @@ namespace WebCore {
virtual SVGPathSegList* animatedPathSegList() const;
virtual SVGPathSegList* animatedNormalizedPathSegList() const;
+ virtual Path toPathData() const;
+
+ private:
+ SVGPathElement(const QualifiedName&, Document*);
+
+ virtual bool isValid() const { return SVGTests::isValid(); }
+
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
- virtual Path toPathData() const;
-
virtual bool supportsMarkers() const { return true; }
- private:
mutable RefPtr<SVGPathSegList> m_pathSegList;
DECLARE_ANIMATED_PROPERTY(SVGPathElement, SVGNames::pathLengthAttr, float, PathLength, pathLength)
diff --git a/WebCore/svg/SVGPathParser.cpp b/WebCore/svg/SVGPathParser.cpp
index 66bd00f..a0d6847 100644
--- a/WebCore/svg/SVGPathParser.cpp
+++ b/WebCore/svg/SVGPathParser.cpp
@@ -38,10 +38,6 @@ SVGPathParser::SVGPathParser()
{
}
-SVGPathParser::~SVGPathParser()
-{
-}
-
void SVGPathParser::parseClosePathSegment()
{
// Reset m_currentPoint for the next path.
diff --git a/WebCore/svg/SVGPathParser.h b/WebCore/svg/SVGPathParser.h
index 5393fc2..7679a95 100644
--- a/WebCore/svg/SVGPathParser.h
+++ b/WebCore/svg/SVGPathParser.h
@@ -37,7 +37,6 @@ namespace WebCore {
class SVGPathParser : public Noncopyable {
public:
SVGPathParser();
- ~SVGPathParser();
bool parsePathDataFromSource(PathParsingMode pathParsingMode);
void setCurrentConsumer(SVGPathConsumer* consumer) { m_consumer = consumer; }
diff --git a/WebCore/svg/SVGPathSeg.cpp b/WebCore/svg/SVGPathSeg.cpp
index 56ee56c..5939976 100644
--- a/WebCore/svg/SVGPathSeg.cpp
+++ b/WebCore/svg/SVGPathSeg.cpp
@@ -31,20 +31,6 @@
namespace WebCore {
-SVGPathSeg::~SVGPathSeg()
-{
-}
-
-unsigned short SVGPathSeg::pathSegType() const
-{
- return PATHSEG_UNKNOWN;
-}
-
-String SVGPathSeg::pathSegTypeAsLetter() const
-{
- return "";
-}
-
const QualifiedName& SVGPathSeg::associatedAttributeName() const
{
return SVGNames::dAttr;
diff --git a/WebCore/svg/SVGPathSeg.h b/WebCore/svg/SVGPathSeg.h
index 6c4db89..a2cf261 100644
--- a/WebCore/svg/SVGPathSeg.h
+++ b/WebCore/svg/SVGPathSeg.h
@@ -50,13 +50,11 @@ enum SVGPathSegType {
PathSegCurveToQuadraticSmoothRel = 19
};
-class SVGPathElement;
-class SVGStyledElement;
class QualifiedName;
class SVGPathSeg : public RefCounted<SVGPathSeg> {
public:
- virtual ~SVGPathSeg();
+ virtual ~SVGPathSeg() { }
// Forward declare these enums in the w3c naming scheme, for IDL generation
enum {
@@ -83,29 +81,27 @@ public:
};
- virtual unsigned short pathSegType() const;
- virtual String pathSegTypeAsLetter() const;
+ virtual unsigned short pathSegType() const = 0;
+ virtual String pathSegTypeAsLetter() const = 0;
const QualifiedName& associatedAttributeName() const;
-
-protected:
- SVGPathSeg() { }
};
class SVGPathSegSingleCoord : public SVGPathSeg {
public:
- SVGPathSegSingleCoord(float x, float y)
- : m_x(x)
- , m_y(y)
- {
- }
-
void setX(float x) { m_x = x; }
float x() const { return m_x; }
void setY(float y) { m_y = y; }
float y() const { return m_y; }
+protected:
+ SVGPathSegSingleCoord(float x, float y)
+ : m_x(x)
+ , m_y(y)
+ {
+ }
+
private:
float m_x;
float m_y;
diff --git a/WebCore/svg/SVGPathSegArc.h b/WebCore/svg/SVGPathSegArc.h
index c7bbbb0..5d5c332 100644
--- a/WebCore/svg/SVGPathSegArc.h
+++ b/WebCore/svg/SVGPathSegArc.h
@@ -80,11 +80,11 @@ namespace WebCore {
return adoptRef(new SVGPathSegArcAbs(x, y, r1, r2, angle, largeArcFlag, sweepFlag));
}
- virtual unsigned short pathSegType() const { return PATHSEG_ARC_ABS; }
- virtual String pathSegTypeAsLetter() const { return "A"; }
-
private:
SVGPathSegArcAbs(float x, float y, float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_ARC_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "A"; }
};
class SVGPathSegArcRel : public SVGPathSegArc {
@@ -94,11 +94,11 @@ namespace WebCore {
return adoptRef(new SVGPathSegArcRel(x, y, r1, r2, angle, largeArcFlag, sweepFlag));
}
- virtual unsigned short pathSegType() const { return PATHSEG_ARC_REL; }
- virtual String pathSegTypeAsLetter() const { return "a"; }
-
private:
SVGPathSegArcRel(float x, float y, float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_ARC_REL; }
+ virtual String pathSegTypeAsLetter() const { return "a"; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegClosePath.cpp b/WebCore/svg/SVGPathSegClosePath.cpp
index d3c8c3b..6f54888 100644
--- a/WebCore/svg/SVGPathSegClosePath.cpp
+++ b/WebCore/svg/SVGPathSegClosePath.cpp
@@ -1,41 +1 @@
-/*
- * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-
-#if ENABLE(SVG)
-#include "SVGPathSegClosePath.h"
-
-namespace WebCore {
-
-SVGPathSegClosePath::SVGPathSegClosePath()
- : SVGPathSeg()
-{
-}
-
-SVGPathSegClosePath::~SVGPathSegClosePath()
-{
-}
-
-}
-
-#endif // ENABLE(SVG)
-
-// vim:ts=4:noet
+// This file is now intentionally empty. Delete it after removing it from all the build systems and project files.
diff --git a/WebCore/svg/SVGPathSegClosePath.h b/WebCore/svg/SVGPathSegClosePath.h
index 635c970..8f074ed 100644
--- a/WebCore/svg/SVGPathSegClosePath.h
+++ b/WebCore/svg/SVGPathSegClosePath.h
@@ -31,13 +31,12 @@ namespace WebCore {
class SVGPathSegClosePath : public SVGPathSeg {
public:
static PassRefPtr<SVGPathSegClosePath> create() { return adoptRef(new SVGPathSegClosePath); }
- virtual ~SVGPathSegClosePath();
+
+private:
+ SVGPathSegClosePath() { }
virtual unsigned short pathSegType() const { return PATHSEG_CLOSEPATH; }
virtual String pathSegTypeAsLetter() const { return "Z"; }
-
-private:
- SVGPathSegClosePath();
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegCurvetoCubic.h b/WebCore/svg/SVGPathSegCurvetoCubic.h
index 7e2735e..ae4a21d 100644
--- a/WebCore/svg/SVGPathSegCurvetoCubic.h
+++ b/WebCore/svg/SVGPathSegCurvetoCubic.h
@@ -30,7 +30,7 @@ namespace WebCore {
class SVGPathSegCurvetoCubic : public SVGPathSeg {
public:
- SVGPathSegCurvetoCubic(float x, float y, float x1, float y1, float x2, float y2) : SVGPathSeg() , m_x(x) , m_y(y) , m_x1(x1) , m_y1(y1) , m_x2(x2) , m_y2(y2) {}
+ SVGPathSegCurvetoCubic(float x, float y, float x1, float y1, float x2, float y2) : m_x(x), m_y(y), m_x1(x1), m_y1(y1), m_x2(x2), m_y2(y2) { }
void setX(float x) { m_x = x; }
float x() const { return m_x; }
@@ -66,11 +66,11 @@ namespace WebCore {
return adoptRef(new SVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2));
}
- virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_ABS; }
- virtual String pathSegTypeAsLetter() const { return "C"; }
-
private:
SVGPathSegCurvetoCubicAbs(float x, float y, float x1, float y1, float x2, float y2);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "C"; }
};
class SVGPathSegCurvetoCubicRel : public SVGPathSegCurvetoCubic {
@@ -80,11 +80,11 @@ namespace WebCore {
return adoptRef(new SVGPathSegCurvetoCubicRel(x, y, x1, y1, x2, y2));
}
- virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_REL; }
- virtual String pathSegTypeAsLetter() const { return "c"; }
-
private:
SVGPathSegCurvetoCubicRel(float x, float y, float x1, float y1, float x2, float y2);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_REL; }
+ virtual String pathSegTypeAsLetter() const { return "c"; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h b/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h
index bc8895c..2227951 100644
--- a/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h
+++ b/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h
@@ -31,7 +31,12 @@ namespace WebCore {
class SVGPathSegCurvetoCubicSmooth : public SVGPathSeg {
public:
SVGPathSegCurvetoCubicSmooth(float x, float y, float x2, float y2)
- : m_x(x), m_y(y), m_x2(x2), m_y2(y2) { }
+ : m_x(x)
+ , m_y(y)
+ , m_x2(x2)
+ , m_y2(y2)
+ {
+ }
void setX(float x) { m_x = x; }
float x() const { return m_x; }
@@ -56,22 +61,22 @@ namespace WebCore {
public:
static PassRefPtr<SVGPathSegCurvetoCubicSmoothAbs> create(float x, float y, float x2, float y2) { return adoptRef(new SVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2)); }
- virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_ABS; }
- virtual String pathSegTypeAsLetter() const { return "S"; }
-
private:
SVGPathSegCurvetoCubicSmoothAbs(float x, float y, float x2, float y2);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "S"; }
};
class SVGPathSegCurvetoCubicSmoothRel : public SVGPathSegCurvetoCubicSmooth {
public:
static PassRefPtr<SVGPathSegCurvetoCubicSmoothRel> create(float x, float y, float x2, float y2) { return adoptRef(new SVGPathSegCurvetoCubicSmoothRel(x, y, x2, y2)); }
- virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_REL; }
- virtual String pathSegTypeAsLetter() const { return "s"; }
-
private:
SVGPathSegCurvetoCubicSmoothRel(float x, float y, float x2, float y2);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_REL; }
+ virtual String pathSegTypeAsLetter() const { return "s"; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegCurvetoQuadratic.h b/WebCore/svg/SVGPathSegCurvetoQuadratic.h
index 967442f..f84cfaa 100644
--- a/WebCore/svg/SVGPathSegCurvetoQuadratic.h
+++ b/WebCore/svg/SVGPathSegCurvetoQuadratic.h
@@ -31,7 +31,12 @@ namespace WebCore {
class SVGPathSegCurvetoQuadratic : public SVGPathSeg {
public:
SVGPathSegCurvetoQuadratic(float x, float y, float x1, float y1)
- : SVGPathSeg(), m_x(x), m_y(y), m_x1(x1), m_y1(y1) {}
+ : m_x(x)
+ , m_y(y)
+ , m_x1(x1)
+ , m_y1(y1)
+ {
+ }
void setX(float x) { m_x = x; }
float x() const { return m_x; }
@@ -56,22 +61,22 @@ namespace WebCore {
public:
static PassRefPtr<SVGPathSegCurvetoQuadraticAbs> create(float x, float y, float x1, float y1) { return adoptRef(new SVGPathSegCurvetoQuadraticAbs(x, y, x1, y1)); }
- virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_ABS; }
- virtual String pathSegTypeAsLetter() const { return "Q"; }
-
private:
SVGPathSegCurvetoQuadraticAbs(float x, float y, float x1, float y1);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "Q"; }
};
class SVGPathSegCurvetoQuadraticRel : public SVGPathSegCurvetoQuadratic {
public:
static PassRefPtr<SVGPathSegCurvetoQuadraticRel> create(float x, float y, float x1, float y1) { return adoptRef(new SVGPathSegCurvetoQuadraticRel(x, y, x1, y1)); }
- virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_REL; }
- virtual String pathSegTypeAsLetter() const { return "q"; }
-
private:
SVGPathSegCurvetoQuadraticRel(float x, float y, float x1, float y1);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_REL; }
+ virtual String pathSegTypeAsLetter() const { return "q"; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h b/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h
index fb3d51f..109799e 100644
--- a/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h
+++ b/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h
@@ -32,22 +32,22 @@ namespace WebCore {
public:
static PassRefPtr<SVGPathSegCurvetoQuadraticSmoothAbs> create(float x, float y) { return adoptRef(new SVGPathSegCurvetoQuadraticSmoothAbs(x, y)); }
- virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS; }
- virtual String pathSegTypeAsLetter() const { return "T"; }
-
private:
SVGPathSegCurvetoQuadraticSmoothAbs(float x, float y);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "T"; }
};
class SVGPathSegCurvetoQuadraticSmoothRel : public SVGPathSegSingleCoord {
public:
static PassRefPtr<SVGPathSegCurvetoQuadraticSmoothRel> create(float x, float y) { return adoptRef(new SVGPathSegCurvetoQuadraticSmoothRel(x, y)); }
- virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL; }
- virtual String pathSegTypeAsLetter() const { return "t"; }
-
private:
SVGPathSegCurvetoQuadraticSmoothRel(float x, float y);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL; }
+ virtual String pathSegTypeAsLetter() const { return "t"; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegLineto.h b/WebCore/svg/SVGPathSegLineto.h
index 9b69bf0..3cd3b7f 100644
--- a/WebCore/svg/SVGPathSegLineto.h
+++ b/WebCore/svg/SVGPathSegLineto.h
@@ -27,27 +27,27 @@
#include "SVGPathSeg.h"
namespace WebCore {
+
class SVGPathSegLinetoAbs : public SVGPathSegSingleCoord {
public:
static PassRefPtr<SVGPathSegLinetoAbs> create(float x, float y) { return adoptRef(new SVGPathSegLinetoAbs(x, y)); }
- virtual unsigned short pathSegType() const { return PATHSEG_LINETO_ABS; }
- virtual String pathSegTypeAsLetter() const { return "L"; }
-
private:
SVGPathSegLinetoAbs(float x, float y);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_LINETO_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "L"; }
};
class SVGPathSegLinetoRel : public SVGPathSegSingleCoord {
public:
static PassRefPtr<SVGPathSegLinetoRel> create(float x, float y) { return adoptRef(new SVGPathSegLinetoRel(x, y)); }
+ private:
+ SVGPathSegLinetoRel(float x, float y);
virtual unsigned short pathSegType() const { return PATHSEG_LINETO_REL; }
virtual String pathSegTypeAsLetter() const { return "l"; }
-
- private:
- SVGPathSegLinetoRel(float x, float y);
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegLinetoHorizontal.h b/WebCore/svg/SVGPathSegLinetoHorizontal.h
index 3a16ad1..da59f05 100644
--- a/WebCore/svg/SVGPathSegLinetoHorizontal.h
+++ b/WebCore/svg/SVGPathSegLinetoHorizontal.h
@@ -43,22 +43,22 @@ namespace WebCore {
public:
static PassRefPtr<SVGPathSegLinetoHorizontalAbs> create(float x) { return adoptRef(new SVGPathSegLinetoHorizontalAbs(x)); }
- virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_ABS; }
- virtual String pathSegTypeAsLetter() const { return "H"; }
-
private:
SVGPathSegLinetoHorizontalAbs(float x);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "H"; }
};
class SVGPathSegLinetoHorizontalRel : public SVGPathSegLinetoHorizontal {
public:
static PassRefPtr<SVGPathSegLinetoHorizontalRel> create(float x) { return adoptRef(new SVGPathSegLinetoHorizontalRel(x)); }
- virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_REL; }
- virtual String pathSegTypeAsLetter() const { return "h"; }
-
private:
SVGPathSegLinetoHorizontalRel(float x);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_REL; }
+ virtual String pathSegTypeAsLetter() const { return "h"; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegLinetoVertical.h b/WebCore/svg/SVGPathSegLinetoVertical.h
index d4d9f85..b13b9f4 100644
--- a/WebCore/svg/SVGPathSegLinetoVertical.h
+++ b/WebCore/svg/SVGPathSegLinetoVertical.h
@@ -43,22 +43,22 @@ namespace WebCore {
public:
static PassRefPtr<SVGPathSegLinetoVerticalAbs> create(float y) { return adoptRef(new SVGPathSegLinetoVerticalAbs(y)); }
- virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_ABS; }
- virtual String pathSegTypeAsLetter() const { return "V"; }
-
private:
SVGPathSegLinetoVerticalAbs(float y);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "V"; }
};
class SVGPathSegLinetoVerticalRel : public SVGPathSegLinetoVertical {
public:
static PassRefPtr<SVGPathSegLinetoVerticalRel> create(float y) { return adoptRef(new SVGPathSegLinetoVerticalRel(y)); }
- virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_REL; }
- virtual String pathSegTypeAsLetter() const { return "v"; }
-
private:
SVGPathSegLinetoVerticalRel(float y);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_REL; }
+ virtual String pathSegTypeAsLetter() const { return "v"; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegList.cpp b/WebCore/svg/SVGPathSegList.cpp
index 3b86f55..5a40c64 100644
--- a/WebCore/svg/SVGPathSegList.cpp
+++ b/WebCore/svg/SVGPathSegList.cpp
@@ -32,10 +32,6 @@ SVGPathSegList::SVGPathSegList(const QualifiedName& attributeName)
{
}
-SVGPathSegList::~SVGPathSegList()
-{
-}
-
}
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGPathSegList.h b/WebCore/svg/SVGPathSegList.h
index f27c653..6e61c06 100644
--- a/WebCore/svg/SVGPathSegList.h
+++ b/WebCore/svg/SVGPathSegList.h
@@ -31,7 +31,6 @@ class SVGElement;
class SVGPathSegList : public SVGList<RefPtr<SVGPathSeg> > {
public:
static PassRefPtr<SVGPathSegList> create(const QualifiedName& attributeName) { return adoptRef(new SVGPathSegList(attributeName)); }
- virtual ~SVGPathSegList();
private:
SVGPathSegList(const QualifiedName&);
diff --git a/WebCore/svg/SVGPathSegListBuilder.h b/WebCore/svg/SVGPathSegListBuilder.h
index 2fd2667..f376706 100644
--- a/WebCore/svg/SVGPathSegListBuilder.h
+++ b/WebCore/svg/SVGPathSegListBuilder.h
@@ -36,18 +36,18 @@ public:
SVGPathSegListBuilder();
void setCurrentSVGPathSegList(SVGPathSegList* pathSegList) { m_pathSegList = pathSegList; }
+
+private:
virtual void incrementPathSegmentCount() { }
virtual bool continueConsuming() { return true; }
virtual void cleanup() { m_pathSegList = 0; }
-private:
// Used in UnalteredParisng/NormalizedParsing modes.
virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode);
virtual void lineTo(const FloatPoint&, PathCoordinateMode);
virtual void curveToCubic(const FloatPoint&, const FloatPoint&, const FloatPoint&, PathCoordinateMode);
virtual void closePath();
-private:
// Only used in UnalteredParsing mode.
virtual void lineToHorizontal(float, PathCoordinateMode);
virtual void lineToVertical(float, PathCoordinateMode);
diff --git a/WebCore/svg/SVGPathSegListSource.cpp b/WebCore/svg/SVGPathSegListSource.cpp
index 48fa094..2378743 100644
--- a/WebCore/svg/SVGPathSegListSource.cpp
+++ b/WebCore/svg/SVGPathSegListSource.cpp
@@ -39,10 +39,6 @@ SVGPathSegListSource::SVGPathSegListSource(SVGPathSegList* pathSegList)
m_itemEnd = m_pathSegList->numberOfItems();
}
-SVGPathSegListSource::~SVGPathSegListSource()
-{
-}
-
bool SVGPathSegListSource::hasMoreData() const
{
return m_itemCurrent < m_itemEnd;
diff --git a/WebCore/svg/SVGPathSegListSource.h b/WebCore/svg/SVGPathSegListSource.h
index fd89e3e..4f93be1 100644
--- a/WebCore/svg/SVGPathSegListSource.h
+++ b/WebCore/svg/SVGPathSegListSource.h
@@ -37,7 +37,8 @@ public:
return adoptPtr(new SVGPathSegListSource(pathSegList));
}
- virtual ~SVGPathSegListSource();
+private:
+ SVGPathSegListSource(SVGPathSegList*);
virtual bool hasMoreData() const;
virtual bool moveToNextToken() { return true; }
@@ -54,9 +55,6 @@ public:
virtual bool parseCurveToQuadraticSmoothSegment(FloatPoint&);
virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, FloatPoint&);
-private:
- SVGPathSegListSource(SVGPathSegList*);
-
SVGPathSegList* m_pathSegList;
RefPtr<SVGPathSeg> m_segment;
int m_itemCurrent;
diff --git a/WebCore/svg/SVGPathSegMoveto.h b/WebCore/svg/SVGPathSegMoveto.h
index 194b1a6..edaff4b 100644
--- a/WebCore/svg/SVGPathSegMoveto.h
+++ b/WebCore/svg/SVGPathSegMoveto.h
@@ -31,22 +31,22 @@ namespace WebCore {
public:
static PassRefPtr<SVGPathSegMovetoAbs> create(float x, float y) { return adoptRef(new SVGPathSegMovetoAbs(x, y)); }
- virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_ABS; }
- virtual String pathSegTypeAsLetter() const { return "M"; }
-
private:
SVGPathSegMovetoAbs(float x, float y);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "M"; }
};
class SVGPathSegMovetoRel : public SVGPathSegSingleCoord {
public:
static PassRefPtr<SVGPathSegMovetoRel> create(float x, float y) { return adoptRef(new SVGPathSegMovetoRel(x, y)); }
- virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_REL; }
- virtual String pathSegTypeAsLetter() const { return "m"; }
-
private:
SVGPathSegMovetoRel(float x, float y);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_REL; }
+ virtual String pathSegTypeAsLetter() const { return "m"; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSource.h b/WebCore/svg/SVGPathSource.h
index 6d7ec5f..d1a6149 100644
--- a/WebCore/svg/SVGPathSource.h
+++ b/WebCore/svg/SVGPathSource.h
@@ -43,9 +43,6 @@ public:
virtual bool parseCurveToQuadraticSegment(FloatPoint&, FloatPoint&) = 0;
virtual bool parseCurveToQuadraticSmoothSegment(FloatPoint&) = 0;
virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, FloatPoint&) = 0;
-
-public:
- SVGPathSource() { }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathStringBuilder.cpp b/WebCore/svg/SVGPathStringBuilder.cpp
index 0a166ad..951956d 100644
--- a/WebCore/svg/SVGPathStringBuilder.cpp
+++ b/WebCore/svg/SVGPathStringBuilder.cpp
@@ -24,10 +24,6 @@
namespace WebCore {
-SVGPathStringBuilder::SVGPathStringBuilder()
-{
-}
-
void SVGPathStringBuilder::moveTo(const FloatPoint& targetPoint, bool, PathCoordinateMode mode)
{
if (mode == AbsoluteCoordinates)
diff --git a/WebCore/svg/SVGPathStringBuilder.h b/WebCore/svg/SVGPathStringBuilder.h
index ebb8596..a51c40c 100644
--- a/WebCore/svg/SVGPathStringBuilder.h
+++ b/WebCore/svg/SVGPathStringBuilder.h
@@ -29,21 +29,19 @@ namespace WebCore {
class SVGPathStringBuilder : public SVGPathConsumer {
public:
- SVGPathStringBuilder();
+ String result() { return m_stringBuilder.toString(ConcatAddingSpacesBetweenIndividualStrings); }
+private:
virtual void cleanup() { m_stringBuilder.clear(); }
virtual void incrementPathSegmentCount() { }
virtual bool continueConsuming() { return true; }
- String result() { return m_stringBuilder.toString(ConcatAddingSpacesBetweenIndividualStrings); }
-private:
// Used in UnalteredParsing/NormalizedParsing modes.
virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode);
virtual void lineTo(const FloatPoint&, PathCoordinateMode);
virtual void curveToCubic(const FloatPoint&, const FloatPoint&, const FloatPoint&, PathCoordinateMode);
virtual void closePath();
-private:
// Only used in UnalteredParsing mode.
virtual void lineToHorizontal(float, PathCoordinateMode);
virtual void lineToVertical(float, PathCoordinateMode);
diff --git a/WebCore/svg/SVGPathStringSource.cpp b/WebCore/svg/SVGPathStringSource.cpp
index 0efbfd0..5154ee6 100644
--- a/WebCore/svg/SVGPathStringSource.cpp
+++ b/WebCore/svg/SVGPathStringSource.cpp
@@ -34,10 +34,6 @@ SVGPathStringSource::SVGPathStringSource(const String& string)
ASSERT(!string.isEmpty());
}
-SVGPathStringSource::~SVGPathStringSource()
-{
-}
-
bool SVGPathStringSource::hasMoreData() const
{
return m_current < m_end;
diff --git a/WebCore/svg/SVGPathStringSource.h b/WebCore/svg/SVGPathStringSource.h
index d0266f4..a3c8a95 100644
--- a/WebCore/svg/SVGPathStringSource.h
+++ b/WebCore/svg/SVGPathStringSource.h
@@ -35,7 +35,8 @@ public:
return adoptPtr(new SVGPathStringSource(string));
}
- virtual ~SVGPathStringSource();
+private:
+ SVGPathStringSource(const String&);
virtual bool hasMoreData() const;
virtual bool moveToNextToken();
@@ -52,8 +53,6 @@ public:
virtual bool parseCurveToQuadraticSmoothSegment(FloatPoint&);
virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, FloatPoint&);
-private:
- SVGPathStringSource(const String&);
String m_string;
const UChar* m_current;
diff --git a/WebCore/svg/SVGPatternElement.cpp b/WebCore/svg/SVGPatternElement.cpp
index 94d3572..6a8a108 100644
--- a/WebCore/svg/SVGPatternElement.cpp
+++ b/WebCore/svg/SVGPatternElement.cpp
@@ -49,13 +49,8 @@ using namespace std;
namespace WebCore {
-SVGPatternElement::SVGPatternElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
- , SVGURIReference()
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
- , SVGFitToViewBox()
+inline SVGPatternElement::SVGPatternElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
, m_x(LengthModeWidth)
, m_y(LengthModeHeight)
, m_width(LengthModeWidth)
@@ -66,8 +61,9 @@ SVGPatternElement::SVGPatternElement(const QualifiedName& tagName, Document* doc
{
}
-SVGPatternElement::~SVGPatternElement()
+PassRefPtr<SVGPatternElement> SVGPatternElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGPatternElement(tagName, document));
}
void SVGPatternElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGPatternElement.h b/WebCore/svg/SVGPatternElement.h
index 32ec808..497660a 100644
--- a/WebCore/svg/SVGPatternElement.h
+++ b/WebCore/svg/SVGPatternElement.h
@@ -43,8 +43,12 @@ namespace WebCore {
public SVGExternalResourcesRequired,
public SVGFitToViewBox {
public:
+ static PassRefPtr<SVGPatternElement> create(const QualifiedName&, Document*);
+
+ PatternAttributes collectPatternProperties() const;
+
+ private:
SVGPatternElement(const QualifiedName&, Document*);
- virtual ~SVGPatternElement();
virtual bool isValid() const { return SVGTests::isValid(); }
virtual bool needsPendingResourceHandling() const { return false; }
@@ -56,9 +60,6 @@ namespace WebCore {
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- PatternAttributes collectPatternProperties() const;
-
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::xAttr, SVGLength, X, x)
diff --git a/WebCore/svg/SVGPointList.cpp b/WebCore/svg/SVGPointList.cpp
index 8a3d870..0d8e10c 100644
--- a/WebCore/svg/SVGPointList.cpp
+++ b/WebCore/svg/SVGPointList.cpp
@@ -32,10 +32,6 @@ SVGPointList::SVGPointList(const QualifiedName& attributeName)
{
}
-SVGPointList::~SVGPointList()
-{
-}
-
String SVGPointList::valueAsString() const
{
String result;
diff --git a/WebCore/svg/SVGPointList.h b/WebCore/svg/SVGPointList.h
index 853c7b1..43edbbb 100644
--- a/WebCore/svg/SVGPointList.h
+++ b/WebCore/svg/SVGPointList.h
@@ -32,7 +32,6 @@ namespace WebCore {
class SVGPointList : public SVGPODList<FloatPoint> {
public:
static PassRefPtr<SVGPointList> create(const QualifiedName& attributeName) { return adoptRef(new SVGPointList(attributeName)); }
- virtual ~SVGPointList();
String valueAsString() const;
diff --git a/WebCore/svg/SVGPolyElement.cpp b/WebCore/svg/SVGPolyElement.cpp
index 8475309..da8aba4 100644
--- a/WebCore/svg/SVGPolyElement.cpp
+++ b/WebCore/svg/SVGPolyElement.cpp
@@ -34,16 +34,8 @@
namespace WebCore {
-SVGPolyElement::SVGPolyElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
- , SVGAnimatedPoints()
-{
-}
-
-SVGPolyElement::~SVGPolyElement()
+SVGPolyElement::SVGPolyElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
{
}
diff --git a/WebCore/svg/SVGPolyElement.h b/WebCore/svg/SVGPolyElement.h
index bbcdb67..6d36f4b 100644
--- a/WebCore/svg/SVGPolyElement.h
+++ b/WebCore/svg/SVGPolyElement.h
@@ -36,21 +36,21 @@ namespace WebCore {
public SVGExternalResourcesRequired,
public SVGAnimatedPoints {
public:
- SVGPolyElement(const QualifiedName&, Document*);
- virtual ~SVGPolyElement();
-
- virtual bool isValid() const { return SVGTests::isValid(); }
-
virtual SVGPointList* points() const;
virtual SVGPointList* animatedPoints() const;
+ protected:
+ SVGPolyElement(const QualifiedName&, Document*);
+
+ private:
+ virtual bool isValid() const { return SVGTests::isValid(); }
+
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
virtual bool supportsMarkers() const { return true; }
- private:
// SVGExternalResourcesRequired
DECLARE_ANIMATED_PROPERTY(SVGPolyElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
diff --git a/WebCore/svg/SVGPolygonElement.cpp b/WebCore/svg/SVGPolygonElement.cpp
index c7ab09b..57e2d53 100644
--- a/WebCore/svg/SVGPolygonElement.cpp
+++ b/WebCore/svg/SVGPolygonElement.cpp
@@ -27,13 +27,14 @@
namespace WebCore {
-SVGPolygonElement::SVGPolygonElement(const QualifiedName& tagName, Document* doc)
- : SVGPolyElement(tagName, doc)
+inline SVGPolygonElement::SVGPolygonElement(const QualifiedName& tagName, Document* document)
+ : SVGPolyElement(tagName, document)
{
}
-SVGPolygonElement::~SVGPolygonElement()
+PassRefPtr<SVGPolygonElement> SVGPolygonElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGPolygonElement(tagName, document));
}
Path SVGPolygonElement::toPathData() const
diff --git a/WebCore/svg/SVGPolygonElement.h b/WebCore/svg/SVGPolygonElement.h
index 76b11a2..7a5bda8 100644
--- a/WebCore/svg/SVGPolygonElement.h
+++ b/WebCore/svg/SVGPolygonElement.h
@@ -28,8 +28,10 @@ namespace WebCore {
class SVGPolygonElement : public SVGPolyElement {
public:
+ static PassRefPtr<SVGPolygonElement> create(const QualifiedName&, Document*);
+
+ private:
SVGPolygonElement(const QualifiedName&, Document*);
- virtual ~SVGPolygonElement();
virtual Path toPathData() const;
};
diff --git a/WebCore/svg/SVGPolylineElement.cpp b/WebCore/svg/SVGPolylineElement.cpp
index a1dfcd6..7ec8431 100644
--- a/WebCore/svg/SVGPolylineElement.cpp
+++ b/WebCore/svg/SVGPolylineElement.cpp
@@ -27,13 +27,14 @@
namespace WebCore {
-SVGPolylineElement::SVGPolylineElement(const QualifiedName& tagName, Document* doc)
- : SVGPolyElement(tagName, doc)
+inline SVGPolylineElement::SVGPolylineElement(const QualifiedName& tagName, Document* document)
+ : SVGPolyElement(tagName, document)
{
}
-SVGPolylineElement::~SVGPolylineElement()
+PassRefPtr<SVGPolylineElement> SVGPolylineElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGPolylineElement(tagName, document));
}
Path SVGPolylineElement::toPathData() const
diff --git a/WebCore/svg/SVGPolylineElement.h b/WebCore/svg/SVGPolylineElement.h
index fbdaa81..d3fe555 100644
--- a/WebCore/svg/SVGPolylineElement.h
+++ b/WebCore/svg/SVGPolylineElement.h
@@ -28,8 +28,10 @@ namespace WebCore {
class SVGPolylineElement : public SVGPolyElement {
public:
+ static PassRefPtr<SVGPolylineElement> create(const QualifiedName&, Document*);
+
+ private:
SVGPolylineElement(const QualifiedName&, Document*);
- virtual ~SVGPolylineElement();
virtual Path toPathData() const;
};
diff --git a/WebCore/svg/SVGPreserveAspectRatio.cpp b/WebCore/svg/SVGPreserveAspectRatio.cpp
index 00a7a65..a129fe6 100644
--- a/WebCore/svg/SVGPreserveAspectRatio.cpp
+++ b/WebCore/svg/SVGPreserveAspectRatio.cpp
@@ -37,10 +37,6 @@ SVGPreserveAspectRatio::SVGPreserveAspectRatio()
// FIXME: Should the two values default to UNKNOWN instead?
}
-SVGPreserveAspectRatio::~SVGPreserveAspectRatio()
-{
-}
-
void SVGPreserveAspectRatio::setAlign(unsigned short align)
{
m_align = align;
diff --git a/WebCore/svg/SVGPreserveAspectRatio.h b/WebCore/svg/SVGPreserveAspectRatio.h
index 9ed27fe..f29b7d3 100644
--- a/WebCore/svg/SVGPreserveAspectRatio.h
+++ b/WebCore/svg/SVGPreserveAspectRatio.h
@@ -54,7 +54,6 @@ namespace WebCore {
};
SVGPreserveAspectRatio();
- virtual ~SVGPreserveAspectRatio();
void setAlign(unsigned short);
unsigned short align() const;
diff --git a/WebCore/svg/SVGRadialGradientElement.cpp b/WebCore/svg/SVGRadialGradientElement.cpp
index 4448c67..80aba78 100644
--- a/WebCore/svg/SVGRadialGradientElement.cpp
+++ b/WebCore/svg/SVGRadialGradientElement.cpp
@@ -40,8 +40,8 @@
namespace WebCore {
-SVGRadialGradientElement::SVGRadialGradientElement(const QualifiedName& tagName, Document* doc)
- : SVGGradientElement(tagName, doc)
+inline SVGRadialGradientElement::SVGRadialGradientElement(const QualifiedName& tagName, Document* document)
+ : SVGGradientElement(tagName, document)
, m_cx(LengthModeWidth, "50%")
, m_cy(LengthModeHeight, "50%")
, m_r(LengthModeOther, "50%")
@@ -51,8 +51,9 @@ SVGRadialGradientElement::SVGRadialGradientElement(const QualifiedName& tagName,
// Spec: If the cx/cy/r attribute is not specified, the effect is as if a value of "50%" were specified.
}
-SVGRadialGradientElement::~SVGRadialGradientElement()
+PassRefPtr<SVGRadialGradientElement> SVGRadialGradientElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGRadialGradientElement(tagName, document));
}
void SVGRadialGradientElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGRadialGradientElement.h b/WebCore/svg/SVGRadialGradientElement.h
index 2c3db56..e528a13 100644
--- a/WebCore/svg/SVGRadialGradientElement.h
+++ b/WebCore/svg/SVGRadialGradientElement.h
@@ -31,8 +31,13 @@ namespace WebCore {
class SVGRadialGradientElement : public SVGGradientElement {
public:
+ static PassRefPtr<SVGRadialGradientElement> create(const QualifiedName&, Document*);
+
+ RadialGradientAttributes collectGradientProperties();
+ void calculateFocalCenterPointsAndRadius(const RadialGradientAttributes&, FloatPoint& focalPoint, FloatPoint& centerPoint, float& radius);
+
+ private:
SVGRadialGradientElement(const QualifiedName&, Document*);
- virtual ~SVGRadialGradientElement();
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
@@ -40,10 +45,6 @@ namespace WebCore {
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- RadialGradientAttributes collectGradientProperties();
- void calculateFocalCenterPointsAndRadius(const RadialGradientAttributes&, FloatPoint& focalPoint, FloatPoint& centerPoint, float& radius);
-
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGRadialGradientElement, SVGNames::cxAttr, SVGLength, Cx, cx)
diff --git a/WebCore/svg/SVGRectElement.cpp b/WebCore/svg/SVGRectElement.cpp
index d5451e2..43ba888 100644
--- a/WebCore/svg/SVGRectElement.cpp
+++ b/WebCore/svg/SVGRectElement.cpp
@@ -31,11 +31,8 @@
namespace WebCore {
-SVGRectElement::SVGRectElement(const QualifiedName& tagName, Document *doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGRectElement::SVGRectElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
, m_x(LengthModeWidth)
, m_y(LengthModeHeight)
, m_width(LengthModeWidth)
@@ -45,8 +42,9 @@ SVGRectElement::SVGRectElement(const QualifiedName& tagName, Document *doc)
{
}
-SVGRectElement::~SVGRectElement()
+PassRefPtr<SVGRectElement> SVGRectElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGRectElement(tagName, document));
}
void SVGRectElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGRectElement.h b/WebCore/svg/SVGRectElement.h
index bc90919..382078d 100644
--- a/WebCore/svg/SVGRectElement.h
+++ b/WebCore/svg/SVGRectElement.h
@@ -34,8 +34,10 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGRectElement> create(const QualifiedName&, Document*);
+
+ private:
SVGRectElement(const QualifiedName&, Document*);
- virtual ~SVGRectElement();
virtual bool isValid() const { return SVGTests::isValid(); }
@@ -45,7 +47,6 @@ namespace WebCore {
virtual Path toPathData() const;
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGRectElement, SVGNames::xAttr, SVGLength, X, x)
diff --git a/WebCore/svg/SVGSVGElement.cpp b/WebCore/svg/SVGSVGElement.cpp
index b7f9717..bc669a3 100644
--- a/WebCore/svg/SVGSVGElement.cpp
+++ b/WebCore/svg/SVGSVGElement.cpp
@@ -78,6 +78,11 @@ SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document* doc)
doc->registerForDocumentActivationCallbacks(this);
}
+PassRefPtr<SVGSVGElement> SVGSVGElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGSVGElement(tagName, document));
+}
+
SVGSVGElement::~SVGSVGElement()
{
document()->unregisterForDocumentActivationCallbacks(this);
@@ -181,8 +186,7 @@ void SVGSVGElement::setUseCurrentView(bool currentView)
SVGViewSpec* SVGSVGElement::currentView() const
{
if (!m_viewSpec)
- m_viewSpec.set(new SVGViewSpec(this));
-
+ m_viewSpec = adoptPtr(new SVGViewSpec(this));
return m_viewSpec.get();
}
@@ -472,6 +476,12 @@ AffineTransform SVGSVGElement::localCoordinateSpaceTransform(SVGLocatable::CTMSc
// RenderSVGRoot::localToBorderBoxTransform() (called through mapLocalToContainer(), called from localToAbsolute())
// also takes the viewBoxToViewTransform() into account, so we have to subtract it here (original cause of bug #27183)
transform.translate(location.x() - viewBoxTransform.e(), location.y() - viewBoxTransform.f());
+
+ // Respect scroll offset.
+ if (FrameView* view = document()->view()) {
+ IntSize scrollOffset = view->scrollOffset();
+ transform.translate(-scrollOffset.width(), -scrollOffset.height());
+ }
}
}
diff --git a/WebCore/svg/SVGSVGElement.h b/WebCore/svg/SVGSVGElement.h
index b7c9b16..b5b10b1 100644
--- a/WebCore/svg/SVGSVGElement.h
+++ b/WebCore/svg/SVGSVGElement.h
@@ -45,11 +45,8 @@ namespace WebCore {
public SVGFitToViewBox,
public SVGZoomAndPan {
public:
- SVGSVGElement(const QualifiedName&, Document*);
- virtual ~SVGSVGElement();
+ static PassRefPtr<SVGSVGElement> create(const QualifiedName&, Document*);
- virtual bool isSVG() const { return true; }
-
virtual bool isValid() const { return SVGTests::isValid(); }
// 'SVGSVGElement' functions
@@ -112,6 +109,20 @@ namespace WebCore {
static SVGTransform createSVGTransform();
static SVGTransform createSVGTransformFromMatrix(const AffineTransform&);
+ AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) const;
+
+ void inheritViewAttributes(SVGViewElement*);
+
+ bool isOutermostSVG() const;
+
+ Element* getElementById(const AtomicString&) const;
+
+ private:
+ SVGSVGElement(const QualifiedName&, Document*);
+ virtual ~SVGSVGElement();
+
+ virtual bool isSVG() const { return true; }
+
virtual void parseMappedAttribute(Attribute*);
virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
@@ -123,15 +134,6 @@ namespace WebCore {
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
- AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) const;
-
- void inheritViewAttributes(SVGViewElement*);
-
- bool isOutermostSVG() const;
-
- Element* getElementById(const AtomicString&) const;
-
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGSVGElement, SVGNames::xAttr, SVGLength, X, x)
diff --git a/WebCore/svg/SVGScriptElement.cpp b/WebCore/svg/SVGScriptElement.cpp
index 4109aad..6532ac2 100644
--- a/WebCore/svg/SVGScriptElement.cpp
+++ b/WebCore/svg/SVGScriptElement.cpp
@@ -31,17 +31,16 @@
namespace WebCore {
-SVGScriptElement::SVGScriptElement(const QualifiedName& tagName, Document* doc, bool createdByParser)
- : SVGElement(tagName, doc)
- , SVGURIReference()
- , SVGExternalResourcesRequired()
+inline SVGScriptElement::SVGScriptElement(const QualifiedName& tagName, Document* document, bool createdByParser)
+ : SVGElement(tagName, document)
, m_data(this, this)
{
m_data.setCreatedByParser(createdByParser);
}
-SVGScriptElement::~SVGScriptElement()
+PassRefPtr<SVGScriptElement> SVGScriptElement::create(const QualifiedName& tagName, Document* document, bool createdByParser)
{
+ return adoptRef(new SVGScriptElement(tagName, document, createdByParser));
}
String SVGScriptElement::scriptContent() const
diff --git a/WebCore/svg/SVGScriptElement.h b/WebCore/svg/SVGScriptElement.h
index 8f2a393..6dffea6 100644
--- a/WebCore/svg/SVGScriptElement.h
+++ b/WebCore/svg/SVGScriptElement.h
@@ -34,8 +34,13 @@ namespace WebCore {
, public SVGExternalResourcesRequired
, public ScriptElement {
public:
+ static PassRefPtr<SVGScriptElement> create(const QualifiedName&, Document*, bool createdByParser);
+
+ String type() const;
+ void setType(const String&);
+
+ private:
SVGScriptElement(const QualifiedName&, Document*, bool createdByParser);
- virtual ~SVGScriptElement();
virtual String scriptContent() const;
@@ -49,16 +54,12 @@ namespace WebCore {
virtual bool isURLAttribute(Attribute*) const;
virtual void finishParsingChildren();
- String type() const;
- void setType(const String&);
-
virtual String scriptCharset() const;
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
virtual bool shouldExecuteAsJavaScript() const;
- protected:
virtual bool haveLoadedRequiredResources();
virtual String sourceAttributeValue() const;
@@ -73,14 +74,12 @@ namespace WebCore {
virtual void dispatchLoadEvent();
virtual void dispatchErrorEvent();
- private:
// SVGURIReference
DECLARE_ANIMATED_PROPERTY(SVGScriptElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
DECLARE_ANIMATED_PROPERTY(SVGScriptElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
- private:
ScriptElementData m_data;
String m_type;
};
diff --git a/WebCore/svg/SVGSetElement.cpp b/WebCore/svg/SVGSetElement.cpp
index eceed12..d455c9b 100644
--- a/WebCore/svg/SVGSetElement.cpp
+++ b/WebCore/svg/SVGSetElement.cpp
@@ -24,10 +24,16 @@
namespace WebCore {
-SVGSetElement::SVGSetElement(const QualifiedName& tagName, Document *doc)
- : SVGAnimateElement(tagName, doc)
+inline SVGSetElement::SVGSetElement(const QualifiedName& tagName, Document* document)
+ : SVGAnimateElement(tagName, document)
{
}
+
+PassRefPtr<SVGSetElement> SVGSetElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGSetElement(tagName, document));
+}
+
}
// vim:ts=4:noet
diff --git a/WebCore/svg/SVGSetElement.h b/WebCore/svg/SVGSetElement.h
index 975ad27..a519973 100644
--- a/WebCore/svg/SVGSetElement.h
+++ b/WebCore/svg/SVGSetElement.h
@@ -25,9 +25,13 @@
#include "SVGAnimateElement.h"
namespace WebCore {
+
// SVGAnimateElement implements superset of the functionality.
class SVGSetElement : public SVGAnimateElement {
public:
+ static PassRefPtr<SVGSetElement> create(const QualifiedName&, Document*);
+
+ private:
SVGSetElement(const QualifiedName&, Document*);
};
diff --git a/WebCore/svg/SVGStopElement.cpp b/WebCore/svg/SVGStopElement.cpp
index 317774a..cd78a46 100644
--- a/WebCore/svg/SVGStopElement.cpp
+++ b/WebCore/svg/SVGStopElement.cpp
@@ -32,14 +32,15 @@
namespace WebCore {
-SVGStopElement::SVGStopElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
+inline SVGStopElement::SVGStopElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
, m_offset(0)
{
}
-SVGStopElement::~SVGStopElement()
+PassRefPtr<SVGStopElement> SVGStopElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGStopElement(tagName, document));
}
void SVGStopElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGStopElement.h b/WebCore/svg/SVGStopElement.h
index 1fb60b5..232b97a 100644
--- a/WebCore/svg/SVGStopElement.h
+++ b/WebCore/svg/SVGStopElement.h
@@ -29,16 +29,17 @@ namespace WebCore {
class SVGStopElement : public SVGStyledElement {
public:
+ static PassRefPtr<SVGStopElement> create(const QualifiedName&, Document*);
+
+ Color stopColorIncludingOpacity() const;
+
+ private:
SVGStopElement(const QualifiedName&, Document*);
- virtual ~SVGStopElement();
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
- Color stopColorIncludingOpacity() const;
-
- private:
virtual bool isGradientStop() const { return true; }
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
diff --git a/WebCore/svg/SVGStringList.cpp b/WebCore/svg/SVGStringList.cpp
index 806c70a..9f4809f 100644
--- a/WebCore/svg/SVGStringList.cpp
+++ b/WebCore/svg/SVGStringList.cpp
@@ -32,10 +32,6 @@ SVGStringList::SVGStringList(const QualifiedName& attributeName)
{
}
-SVGStringList::~SVGStringList()
-{
-}
-
void SVGStringList::reset(const String& str)
{
ExceptionCode ec = 0;
diff --git a/WebCore/svg/SVGStringList.h b/WebCore/svg/SVGStringList.h
index bc234ff..e8841ea 100644
--- a/WebCore/svg/SVGStringList.h
+++ b/WebCore/svg/SVGStringList.h
@@ -30,7 +30,6 @@ namespace WebCore {
class SVGStringList : public SVGList<String> {
public:
static PassRefPtr<SVGStringList> create(const QualifiedName& attributeName) { return adoptRef(new SVGStringList(attributeName)); }
- virtual ~SVGStringList();
void reset(const String& str);
void parse(const String& data, UChar delimiter = ',');
diff --git a/WebCore/svg/SVGStylable.cpp b/WebCore/svg/SVGStylable.cpp
index 510467d..6f54888 100644
--- a/WebCore/svg/SVGStylable.cpp
+++ b/WebCore/svg/SVGStylable.cpp
@@ -1,38 +1 @@
-/*
- * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-
-#if ENABLE(SVG)
-#include "SVGStylable.h"
-
-namespace WebCore {
-
-SVGStylable::SVGStylable()
-{
-}
-
-SVGStylable::~SVGStylable()
-{
-}
-
-}
-
-#endif // ENABLE(SVG)
+// This file is now intentionally empty. Delete it after removing it from all the build systems and project files.
diff --git a/WebCore/svg/SVGStylable.h b/WebCore/svg/SVGStylable.h
index 37148f9..fee4e63 100644
--- a/WebCore/svg/SVGStylable.h
+++ b/WebCore/svg/SVGStylable.h
@@ -29,12 +29,10 @@ namespace WebCore {
class CSSValue;
class CSSStyleDeclaration;
- class QualifiedName;
class SVGStylable {
public:
- SVGStylable();
- virtual ~SVGStylable();
+ virtual ~SVGStylable() { }
virtual CSSStyleDeclaration* style() = 0;
virtual PassRefPtr<CSSValue> getPresentationAttribute(const String&) = 0;
diff --git a/WebCore/svg/SVGStyleElement.cpp b/WebCore/svg/SVGStyleElement.cpp
index bb50e67..4a80319 100644
--- a/WebCore/svg/SVGStyleElement.cpp
+++ b/WebCore/svg/SVGStyleElement.cpp
@@ -34,13 +34,17 @@
namespace WebCore {
-SVGStyleElement::SVGStyleElement(const QualifiedName& tagName, Document* document, bool createdByParser)
+inline SVGStyleElement::SVGStyleElement(const QualifiedName& tagName, Document* document, bool createdByParser)
: SVGElement(tagName, document)
- , SVGLangSpace()
, StyleElement(document, createdByParser)
{
}
+PassRefPtr<SVGStyleElement> SVGStyleElement::create(const QualifiedName& tagName, Document* document, bool createdByParser)
+{
+ return adoptRef(new SVGStyleElement(tagName, document, createdByParser));
+}
+
const AtomicString& SVGStyleElement::type() const
{
DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/css"));
diff --git a/WebCore/svg/SVGStyleElement.h b/WebCore/svg/SVGStyleElement.h
index 6385039..bb46549 100644
--- a/WebCore/svg/SVGStyleElement.h
+++ b/WebCore/svg/SVGStyleElement.h
@@ -32,17 +32,9 @@ class SVGStyleElement : public SVGElement
, public SVGLangSpace
, public StyleElement {
public:
- SVGStyleElement(const QualifiedName&, Document*, bool createdByParser);
-
- virtual void parseMappedAttribute(Attribute*);
- virtual void insertedIntoDocument();
- virtual void removedFromDocument();
- virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+ static PassRefPtr<SVGStyleElement> create(const QualifiedName&, Document*, bool createdByParser);
- virtual void finishParsingChildren();
-
- virtual bool isLoading() const { return StyleElement::isLoading(); }
- virtual bool sheetLoaded() { return StyleElement::sheetLoaded(document()); }
+ StyleSheet* sheet();
virtual const AtomicString& type() const;
void setType(const AtomicString&, ExceptionCode&);
@@ -53,7 +45,18 @@ public:
virtual String title() const;
void setTitle(const AtomicString&, ExceptionCode&);
- StyleSheet* sheet();
+private:
+ SVGStyleElement(const QualifiedName&, Document*, bool createdByParser);
+
+ virtual void parseMappedAttribute(Attribute*);
+ virtual void insertedIntoDocument();
+ virtual void removedFromDocument();
+ virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+
+ virtual void finishParsingChildren();
+
+ virtual bool isLoading() const { return StyleElement::isLoading(); }
+ virtual bool sheetLoaded() { return StyleElement::sheetLoaded(document()); }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGStyledElement.cpp b/WebCore/svg/SVGStyledElement.cpp
index 6f04382..f554846 100644
--- a/WebCore/svg/SVGStyledElement.cpp
+++ b/WebCore/svg/SVGStyledElement.cpp
@@ -55,12 +55,8 @@ void mapAttributeToCSSProperty(HashMap<AtomicStringImpl*, int>* propertyNameToId
propertyNameToIdMap->set(attrName.localName().impl(), propertyId);
}
-SVGStyledElement::SVGStyledElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
-{
-}
-
-SVGStyledElement::~SVGStyledElement()
+SVGStyledElement::SVGStyledElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
diff --git a/WebCore/svg/SVGStyledElement.h b/WebCore/svg/SVGStyledElement.h
index 8431458..3482a4f 100644
--- a/WebCore/svg/SVGStyledElement.h
+++ b/WebCore/svg/SVGStyledElement.h
@@ -35,21 +35,29 @@ namespace WebCore {
class SVGStyledElement : public SVGElement,
public SVGStylable {
public:
- SVGStyledElement(const QualifiedName&, Document*);
- virtual ~SVGStyledElement();
-
virtual String title() const;
bool hasRelativeLengths() const { return !m_elementsWithRelativeLengths.isEmpty(); }
- virtual bool isStyled() const { return true; }
virtual bool supportsMarkers() const { return false; }
virtual PassRefPtr<CSSValue> getPresentationAttribute(const String& name);
- virtual CSSStyleDeclaration* style() { return StyledElement::style(); }
bool isKnownAttribute(const QualifiedName&);
+ // Centralized place to force a manual style resolution. Hacky but needed for now.
+ PassRefPtr<RenderStyle> resolveStyle(RenderStyle* parentStyle);
+
+ bool instanceUpdatesBlocked() const;
+ void setInstanceUpdatesBlocked(bool);
+
+ virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope) const;
+
+ virtual CSSStyleDeclaration* style() { return StyledElement::style(); }
+
+ protected:
+ SVGStyledElement(const QualifiedName&, Document*);
+
virtual bool rendererIsNeeded(RenderStyle*);
virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
@@ -62,15 +70,6 @@ namespace WebCore {
virtual void removedFromDocument();
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
- // Centralized place to force a manual style resolution. Hacky but needed for now.
- PassRefPtr<RenderStyle> resolveStyle(RenderStyle* parentStyle);
-
- bool instanceUpdatesBlocked() const;
- void setInstanceUpdatesBlocked(bool);
-
- virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope) const;
-
- protected:
static int cssPropertyIdForSVGAttributeName(const QualifiedName&);
void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(selfHasRelativeLengths(), this); }
void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGStyledElement*);
@@ -78,7 +77,10 @@ namespace WebCore {
virtual bool selfHasRelativeLengths() const { return false; }
private:
+ virtual bool isStyled() const { return true; }
+
HashSet<SVGStyledElement*> m_elementsWithRelativeLengths;
+
DECLARE_ANIMATED_PROPERTY(SVGStyledElement, HTMLNames::classAttr, String, ClassName, className)
};
diff --git a/WebCore/svg/SVGStyledLocatableElement.cpp b/WebCore/svg/SVGStyledLocatableElement.cpp
index 6b49542..d22e708 100644
--- a/WebCore/svg/SVGStyledLocatableElement.cpp
+++ b/WebCore/svg/SVGStyledLocatableElement.cpp
@@ -30,13 +30,8 @@
namespace WebCore {
-SVGStyledLocatableElement::SVGStyledLocatableElement(const QualifiedName& tagName, Document* doc)
- : SVGLocatable()
- , SVGStyledElement(tagName, doc)
-{
-}
-
-SVGStyledLocatableElement::~SVGStyledLocatableElement()
+SVGStyledLocatableElement::SVGStyledLocatableElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
{
}
diff --git a/WebCore/svg/SVGStyledLocatableElement.h b/WebCore/svg/SVGStyledLocatableElement.h
index 6eab7b0..82b3436 100644
--- a/WebCore/svg/SVGStyledLocatableElement.h
+++ b/WebCore/svg/SVGStyledLocatableElement.h
@@ -32,11 +32,6 @@ namespace WebCore {
class SVGStyledLocatableElement : public SVGStyledElement,
virtual public SVGLocatable {
public:
- SVGStyledLocatableElement(const QualifiedName&, Document*);
- virtual ~SVGStyledLocatableElement();
-
- virtual bool isStyledLocatable() const { return true; }
-
virtual SVGElement* nearestViewportElement() const;
virtual SVGElement* farthestViewportElement() const;
@@ -45,6 +40,12 @@ namespace WebCore {
virtual AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope mode) const { return SVGLocatable::localCoordinateSpaceTransform(mode); }
+
+ protected:
+ SVGStyledLocatableElement(const QualifiedName&, Document*);
+
+ private:
+ virtual bool isStyledLocatable() const { return true; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGStyledTransformableElement.cpp b/WebCore/svg/SVGStyledTransformableElement.cpp
index 279f437..af10ed7 100644
--- a/WebCore/svg/SVGStyledTransformableElement.cpp
+++ b/WebCore/svg/SVGStyledTransformableElement.cpp
@@ -32,17 +32,12 @@
namespace WebCore {
-SVGStyledTransformableElement::SVGStyledTransformableElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledLocatableElement(tagName, doc)
- , SVGTransformable()
+SVGStyledTransformableElement::SVGStyledTransformableElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledLocatableElement(tagName, document)
, m_transform(SVGTransformList::create(SVGNames::transformAttr))
{
}
-SVGStyledTransformableElement::~SVGStyledTransformableElement()
-{
-}
-
AffineTransform SVGStyledTransformableElement::getCTM(StyleUpdateStrategy styleUpdateStrategy) const
{
return SVGLocatable::computeCTM(this, SVGLocatable::NearestViewportScope, styleUpdateStrategy);
diff --git a/WebCore/svg/SVGStyledTransformableElement.h b/WebCore/svg/SVGStyledTransformableElement.h
index 1d7b197..7668889 100644
--- a/WebCore/svg/SVGStyledTransformableElement.h
+++ b/WebCore/svg/SVGStyledTransformableElement.h
@@ -33,11 +33,6 @@ class AffineTransform;
class SVGStyledTransformableElement : public SVGStyledLocatableElement,
public SVGTransformable {
public:
- SVGStyledTransformableElement(const QualifiedName&, Document*);
- virtual ~SVGStyledTransformableElement();
-
- virtual bool isStyledTransformable() const { return true; }
-
virtual AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
virtual AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
virtual SVGElement* nearestViewportElement() const;
@@ -49,8 +44,6 @@ public:
virtual FloatRect getBBox(StyleUpdateStrategy = AllowStyleUpdate) const;
- virtual void parseMappedAttribute(Attribute*);
- virtual void synchronizeProperty(const QualifiedName&);
bool isKnownAttribute(const QualifiedName&);
// "base class" methods for all the elements which render as paths
@@ -59,9 +52,16 @@ public:
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
protected:
+ SVGStyledTransformableElement(const QualifiedName&, Document*);
+
+ virtual void parseMappedAttribute(Attribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
+
DECLARE_ANIMATED_PROPERTY(SVGStyledTransformableElement, SVGNames::transformAttr, SVGTransformList*, Transform, transform)
private:
+ virtual bool isStyledTransformable() const { return true; }
+
// Used by <animateMotion>
OwnPtr<AffineTransform> m_supplementalTransform;
};
diff --git a/WebCore/svg/SVGSwitchElement.cpp b/WebCore/svg/SVGSwitchElement.cpp
index 5f397af..9b40a02 100644
--- a/WebCore/svg/SVGSwitchElement.cpp
+++ b/WebCore/svg/SVGSwitchElement.cpp
@@ -27,20 +27,21 @@
namespace WebCore {
-SVGSwitchElement::SVGSwitchElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGSwitchElement::SVGSwitchElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
{
}
-SVGSwitchElement::~SVGSwitchElement()
+PassRefPtr<SVGSwitchElement> SVGSwitchElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGSwitchElement(tagName, document));
}
bool SVGSwitchElement::childShouldCreateRenderer(Node* child) const
{
+ // FIXME: This function does not do what the comment below implies it does.
+ // It will create a renderer for any valid SVG element children, not just the first one.
+
for (Node* n = firstChild(); n != 0; n = n->nextSibling()) {
if (n->isSVGElement()) {
SVGElement* element = static_cast<SVGElement*>(n);
diff --git a/WebCore/svg/SVGSwitchElement.h b/WebCore/svg/SVGSwitchElement.h
index 83b02d5..970cc1f 100644
--- a/WebCore/svg/SVGSwitchElement.h
+++ b/WebCore/svg/SVGSwitchElement.h
@@ -33,8 +33,10 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGSwitchElement> create(const QualifiedName&, Document*);
+
+ private:
SVGSwitchElement(const QualifiedName&, Document*);
- virtual ~SVGSwitchElement();
virtual bool isValid() const { return SVGTests::isValid(); }
@@ -43,7 +45,6 @@ namespace WebCore {
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual void synchronizeProperty(const QualifiedName&);
- private:
// SVGExternalResourcesRequired
DECLARE_ANIMATED_PROPERTY(SVGSwitchElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
diff --git a/WebCore/svg/SVGSymbolElement.cpp b/WebCore/svg/SVGSymbolElement.cpp
index 9c110cb..7dab3e1 100644
--- a/WebCore/svg/SVGSymbolElement.cpp
+++ b/WebCore/svg/SVGSymbolElement.cpp
@@ -27,16 +27,14 @@
namespace WebCore {
-SVGSymbolElement::SVGSymbolElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
- , SVGFitToViewBox()
+inline SVGSymbolElement::SVGSymbolElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
{
}
-SVGSymbolElement::~SVGSymbolElement()
+PassRefPtr<SVGSymbolElement> SVGSymbolElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGSymbolElement(tagName, document));
}
void SVGSymbolElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGSymbolElement.h b/WebCore/svg/SVGSymbolElement.h
index 7d6fdd3..1f310f8 100644
--- a/WebCore/svg/SVGSymbolElement.h
+++ b/WebCore/svg/SVGSymbolElement.h
@@ -34,15 +34,16 @@ namespace WebCore {
public SVGExternalResourcesRequired,
public SVGFitToViewBox {
public:
+ static PassRefPtr<SVGSymbolElement> create(const QualifiedName&, Document*);
+
+ private:
SVGSymbolElement(const QualifiedName&, Document*);
- virtual ~SVGSymbolElement();
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
- private:
virtual bool selfHasRelativeLengths() const;
// SVGExternalResourcesRequired
diff --git a/WebCore/svg/SVGTRefElement.cpp b/WebCore/svg/SVGTRefElement.cpp
index c140f05..72a037a 100644
--- a/WebCore/svg/SVGTRefElement.cpp
+++ b/WebCore/svg/SVGTRefElement.cpp
@@ -32,14 +32,14 @@
namespace WebCore {
-SVGTRefElement::SVGTRefElement(const QualifiedName& tagName, Document* doc)
- : SVGTextPositioningElement(tagName, doc)
- , SVGURIReference()
+inline SVGTRefElement::SVGTRefElement(const QualifiedName& tagName, Document* document)
+ : SVGTextPositioningElement(tagName, document)
{
}
-SVGTRefElement::~SVGTRefElement()
+PassRefPtr<SVGTRefElement> SVGTRefElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGTRefElement(tagName, document));
}
void SVGTRefElement::updateReferencedText()
diff --git a/WebCore/svg/SVGTRefElement.h b/WebCore/svg/SVGTRefElement.h
index f86f015..7a79ae5 100644
--- a/WebCore/svg/SVGTRefElement.h
+++ b/WebCore/svg/SVGTRefElement.h
@@ -30,17 +30,18 @@ namespace WebCore {
class SVGTRefElement : public SVGTextPositioningElement,
public SVGURIReference {
public:
+ static PassRefPtr<SVGTRefElement> create(const QualifiedName&, Document*);
+
+ private:
SVGTRefElement(const QualifiedName&, Document*);
- virtual ~SVGTRefElement();
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- bool childShouldCreateRenderer(Node*) const;
+ virtual bool childShouldCreateRenderer(Node*) const;
- private:
void updateReferencedText();
// SVGURIReference
diff --git a/WebCore/svg/SVGTSpanElement.cpp b/WebCore/svg/SVGTSpanElement.cpp
index ef36780..d1deb70 100644
--- a/WebCore/svg/SVGTSpanElement.cpp
+++ b/WebCore/svg/SVGTSpanElement.cpp
@@ -29,13 +29,14 @@
namespace WebCore {
-SVGTSpanElement::SVGTSpanElement(const QualifiedName& tagName, Document* doc)
- : SVGTextPositioningElement(tagName, doc)
+inline SVGTSpanElement::SVGTSpanElement(const QualifiedName& tagName, Document* document)
+ : SVGTextPositioningElement(tagName, document)
{
}
-SVGTSpanElement::~SVGTSpanElement()
+PassRefPtr<SVGTSpanElement> SVGTSpanElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGTSpanElement(tagName, document));
}
bool SVGTSpanElement::childShouldCreateRenderer(Node* child) const
diff --git a/WebCore/svg/SVGTSpanElement.h b/WebCore/svg/SVGTSpanElement.h
index 3b9357b..9b276a8 100644
--- a/WebCore/svg/SVGTSpanElement.h
+++ b/WebCore/svg/SVGTSpanElement.h
@@ -28,11 +28,13 @@ namespace WebCore {
class SVGTSpanElement : public SVGTextPositioningElement {
public:
+ static PassRefPtr<SVGTSpanElement> create(const QualifiedName&, Document*);
+
+ private:
SVGTSpanElement(const QualifiedName&, Document*);
- virtual ~SVGTSpanElement();
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- bool childShouldCreateRenderer(Node*) const;
+ virtual bool childShouldCreateRenderer(Node*) const;
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGTests.cpp b/WebCore/svg/SVGTests.cpp
index 9767432..e4813cd 100644
--- a/WebCore/svg/SVGTests.cpp
+++ b/WebCore/svg/SVGTests.cpp
@@ -64,11 +64,6 @@ SVGStringList* SVGTests::systemLanguage() const
return m_systemLanguage.get();
}
-bool SVGTests::hasExtension(const String&) const
-{
- return false;
-}
-
bool SVGTests::isValid() const
{
ExceptionCode ec = 0;
diff --git a/WebCore/svg/SVGTests.h b/WebCore/svg/SVGTests.h
index b638c0a..c5bb70f 100644
--- a/WebCore/svg/SVGTests.h
+++ b/WebCore/svg/SVGTests.h
@@ -33,20 +33,21 @@ namespace WebCore {
class SVGTests {
public:
- SVGTests();
- virtual ~SVGTests();
-
SVGStringList* requiredFeatures() const;
SVGStringList* requiredExtensions() const;
SVGStringList* systemLanguage() const;
- bool hasExtension(const String&) const;
+ bool hasExtension(const String&) const { return false; }
bool isValid() const;
bool parseMappedAttribute(Attribute*);
bool isKnownAttribute(const QualifiedName&);
+ protected:
+ SVGTests();
+ ~SVGTests();
+
private:
mutable RefPtr<SVGStringList> m_features;
mutable RefPtr<SVGStringList> m_extensions;
diff --git a/WebCore/svg/SVGTextContentElement.cpp b/WebCore/svg/SVGTextContentElement.cpp
index a96ce63..9d44b10 100644
--- a/WebCore/svg/SVGTextContentElement.cpp
+++ b/WebCore/svg/SVGTextContentElement.cpp
@@ -32,20 +32,13 @@
namespace WebCore {
-SVGTextContentElement::SVGTextContentElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+SVGTextContentElement::SVGTextContentElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
, m_textLength(LengthModeOther)
, m_lengthAdjust(LENGTHADJUST_SPACING)
{
}
-SVGTextContentElement::~SVGTextContentElement()
-{
-}
-
unsigned SVGTextContentElement::getNumberOfChars() const
{
document()->updateLayoutIgnorePendingStylesheets();
diff --git a/WebCore/svg/SVGTextContentElement.h b/WebCore/svg/SVGTextContentElement.h
index d006a89..cf3698b 100644
--- a/WebCore/svg/SVGTextContentElement.h
+++ b/WebCore/svg/SVGTextContentElement.h
@@ -42,12 +42,6 @@ namespace WebCore {
LENGTHADJUST_SPACINGANDGLYPHS = 2
};
- SVGTextContentElement(const QualifiedName&, Document*);
- virtual ~SVGTextContentElement();
-
- virtual bool isValid() const { return SVGTests::isValid(); }
- virtual bool isTextContent() const { return true; }
-
unsigned getNumberOfChars() const;
float getComputedTextLength() const;
float getSubStringLength(unsigned charnum, unsigned nchars, ExceptionCode&) const;
@@ -58,15 +52,21 @@ namespace WebCore {
int getCharNumAtPosition(const FloatPoint&) const;
void selectSubString(unsigned charnum, unsigned nchars, ExceptionCode&) const;
- virtual void parseMappedAttribute(Attribute*);
- virtual void synchronizeProperty(const QualifiedName&);
-
bool isKnownAttribute(const QualifiedName&);
protected:
+ SVGTextContentElement(const QualifiedName&, Document*);
+
+ virtual bool isValid() const { return SVGTests::isValid(); }
+
+ virtual void parseMappedAttribute(Attribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
+
virtual bool selfHasRelativeLengths() const;
private:
+ virtual bool isTextContent() const { return true; }
+
DECLARE_ANIMATED_PROPERTY(SVGTextContentElement, SVGNames::textLengthAttr, SVGLength, TextLength, textLength)
DECLARE_ANIMATED_PROPERTY(SVGTextContentElement, SVGNames::lengthAdjustAttr, int, LengthAdjust, lengthAdjust)
diff --git a/WebCore/svg/SVGTextElement.cpp b/WebCore/svg/SVGTextElement.cpp
index e13e611..c8f280e 100644
--- a/WebCore/svg/SVGTextElement.cpp
+++ b/WebCore/svg/SVGTextElement.cpp
@@ -35,15 +35,16 @@
namespace WebCore {
-SVGTextElement::SVGTextElement(const QualifiedName& tagName, Document* doc)
+inline SVGTextElement::SVGTextElement(const QualifiedName& tagName, Document* doc)
: SVGTextPositioningElement(tagName, doc)
, SVGTransformable()
, m_transform(SVGTransformList::create(SVGNames::transformAttr))
{
}
-SVGTextElement::~SVGTextElement()
+PassRefPtr<SVGTextElement> SVGTextElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGTextElement(tagName, document));
}
void SVGTextElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGTextElement.h b/WebCore/svg/SVGTextElement.h
index 1788ea9..00afa59 100644
--- a/WebCore/svg/SVGTextElement.h
+++ b/WebCore/svg/SVGTextElement.h
@@ -30,10 +30,7 @@ namespace WebCore {
class SVGTextElement : public SVGTextPositioningElement,
public SVGTransformable {
public:
- SVGTextElement(const QualifiedName&, Document*);
- virtual ~SVGTextElement();
-
- virtual void parseMappedAttribute(Attribute*);
+ static PassRefPtr<SVGTextElement> create(const QualifiedName&, Document*);
virtual SVGElement* nearestViewportElement() const;
virtual SVGElement* farthestViewportElement() const;
@@ -42,6 +39,12 @@ namespace WebCore {
virtual AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
virtual AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
virtual AffineTransform animatedLocalTransform() const;
+
+ private:
+ SVGTextElement(const QualifiedName&, Document*);
+
+ virtual void parseMappedAttribute(Attribute*);
+
virtual AffineTransform* supplementalTransform();
virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope mode) const { return SVGTransformable::localCoordinateSpaceTransform(mode); }
@@ -51,11 +54,10 @@ namespace WebCore {
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
- private:
DECLARE_ANIMATED_PROPERTY(SVGTextElement, SVGNames::transformAttr, SVGTransformList*, Transform, transform)
- // Used by <animateMotion>
- OwnPtr<AffineTransform> m_supplementalTransform;
+ // Used by <animateMotion>
+ OwnPtr<AffineTransform> m_supplementalTransform;
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGTextPathElement.cpp b/WebCore/svg/SVGTextPathElement.cpp
index 8f21ab3..82adb29 100644
--- a/WebCore/svg/SVGTextPathElement.cpp
+++ b/WebCore/svg/SVGTextPathElement.cpp
@@ -34,17 +34,17 @@
namespace WebCore {
-SVGTextPathElement::SVGTextPathElement(const QualifiedName& tagName, Document* doc)
- : SVGTextContentElement(tagName, doc)
- , SVGURIReference()
+inline SVGTextPathElement::SVGTextPathElement(const QualifiedName& tagName, Document* document)
+ : SVGTextContentElement(tagName, document)
, m_startOffset(LengthModeOther)
, m_method(SVG_TEXTPATH_METHODTYPE_ALIGN)
, m_spacing(SVG_TEXTPATH_SPACINGTYPE_EXACT)
{
}
-SVGTextPathElement::~SVGTextPathElement()
+PassRefPtr<SVGTextPathElement> SVGTextPathElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGTextPathElement(tagName, document));
}
void SVGTextPathElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGTextPathElement.h b/WebCore/svg/SVGTextPathElement.h
index 537a107..b87dfa5 100644
--- a/WebCore/svg/SVGTextPathElement.h
+++ b/WebCore/svg/SVGTextPathElement.h
@@ -51,9 +51,11 @@ namespace WebCore {
TEXTPATH_SPACINGTYPE_EXACT = SVG_TEXTPATH_SPACINGTYPE_EXACT
};
- SVGTextPathElement(const QualifiedName&, Document*);
- virtual ~SVGTextPathElement();
+ static PassRefPtr<SVGTextPathElement> create(const QualifiedName&, Document*);
+ private:
+ SVGTextPathElement(const QualifiedName&, Document*);
+
virtual void insertedIntoDocument();
virtual void parseMappedAttribute(Attribute*);
@@ -61,9 +63,8 @@ namespace WebCore {
virtual void synchronizeProperty(const QualifiedName&);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- bool childShouldCreateRenderer(Node*) const;
+ virtual bool childShouldCreateRenderer(Node*) const;
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGTextPathElement, SVGNames::startOffsetAttr, SVGLength, StartOffset, startOffset)
diff --git a/WebCore/svg/SVGTextPositioningElement.cpp b/WebCore/svg/SVGTextPositioningElement.cpp
index 86231f8..4703482 100644
--- a/WebCore/svg/SVGTextPositioningElement.cpp
+++ b/WebCore/svg/SVGTextPositioningElement.cpp
@@ -32,8 +32,8 @@
namespace WebCore {
-SVGTextPositioningElement::SVGTextPositioningElement(const QualifiedName& tagName, Document* doc)
- : SVGTextContentElement(tagName, doc)
+SVGTextPositioningElement::SVGTextPositioningElement(const QualifiedName& tagName, Document* document)
+ : SVGTextContentElement(tagName, document)
, m_x(SVGLengthList::create(SVGNames::xAttr))
, m_y(SVGLengthList::create(SVGNames::yAttr))
, m_dx(SVGLengthList::create(SVGNames::dxAttr))
@@ -42,10 +42,6 @@ SVGTextPositioningElement::SVGTextPositioningElement(const QualifiedName& tagNam
{
}
-SVGTextPositioningElement::~SVGTextPositioningElement()
-{
-}
-
void SVGTextPositioningElement::parseMappedAttribute(Attribute* attr)
{
if (attr->name() == SVGNames::xAttr)
diff --git a/WebCore/svg/SVGTextPositioningElement.h b/WebCore/svg/SVGTextPositioningElement.h
index 0ad3090..57a4028 100644
--- a/WebCore/svg/SVGTextPositioningElement.h
+++ b/WebCore/svg/SVGTextPositioningElement.h
@@ -29,9 +29,8 @@
namespace WebCore {
class SVGTextPositioningElement : public SVGTextContentElement {
- public:
+ protected:
SVGTextPositioningElement(const QualifiedName&, Document*);
- virtual ~SVGTextPositioningElement();
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
@@ -39,7 +38,6 @@ namespace WebCore {
bool isKnownAttribute(const QualifiedName&);
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGTextPositioningElement, SVGNames::xAttr, SVGLengthList*, X, x)
diff --git a/WebCore/svg/SVGTitleElement.cpp b/WebCore/svg/SVGTitleElement.cpp
index 7fdb2e0..5eb2204 100644
--- a/WebCore/svg/SVGTitleElement.cpp
+++ b/WebCore/svg/SVGTitleElement.cpp
@@ -26,11 +26,16 @@
namespace WebCore {
-SVGTitleElement::SVGTitleElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
+inline SVGTitleElement::SVGTitleElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
{
}
+PassRefPtr<SVGTitleElement> SVGTitleElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGTitleElement(tagName, document));
+}
+
void SVGTitleElement::insertedIntoDocument()
{
SVGStyledElement::insertedIntoDocument();
diff --git a/WebCore/svg/SVGTitleElement.h b/WebCore/svg/SVGTitleElement.h
index f3381b1..986f73e 100644
--- a/WebCore/svg/SVGTitleElement.h
+++ b/WebCore/svg/SVGTitleElement.h
@@ -26,9 +26,13 @@
#include "SVGStyledElement.h"
namespace WebCore {
+
class SVGTitleElement : public SVGStyledElement,
public SVGLangSpace {
public:
+ static PassRefPtr<SVGTitleElement> create(const QualifiedName&, Document*);
+
+ private:
SVGTitleElement(const QualifiedName&, Document*);
virtual void insertedIntoDocument();
diff --git a/WebCore/svg/SVGTransform.cpp b/WebCore/svg/SVGTransform.cpp
index 594af16..86774db 100644
--- a/WebCore/svg/SVGTransform.cpp
+++ b/WebCore/svg/SVGTransform.cpp
@@ -52,10 +52,6 @@ SVGTransform::SVGTransform(const AffineTransform& matrix)
{
}
-SVGTransform::~SVGTransform()
-{
-}
-
bool SVGTransform::isValid()
{
return (m_type != SVG_TRANSFORM_UNKNOWN);
diff --git a/WebCore/svg/SVGTransform.h b/WebCore/svg/SVGTransform.h
index 071d908..db6a42f 100644
--- a/WebCore/svg/SVGTransform.h
+++ b/WebCore/svg/SVGTransform.h
@@ -44,8 +44,7 @@ namespace WebCore {
SVGTransform();
SVGTransform(SVGTransformType);
explicit SVGTransform(const AffineTransform&);
- virtual ~SVGTransform();
-
+
SVGTransformType type() const;
AffineTransform matrix() const;
diff --git a/WebCore/svg/SVGTransformable.cpp b/WebCore/svg/SVGTransformable.cpp
index a47cd1f..a25e086 100644
--- a/WebCore/svg/SVGTransformable.cpp
+++ b/WebCore/svg/SVGTransformable.cpp
@@ -33,15 +33,6 @@
namespace WebCore {
-SVGTransformable::SVGTransformable()
- : SVGLocatable()
-{
-}
-
-SVGTransformable::~SVGTransformable()
-{
-}
-
static int parseTransformParamList(const UChar*& ptr, const UChar* end, float* values, int required, int optional)
{
int optionalParams = 0, requiredParams = 0;
diff --git a/WebCore/svg/SVGTransformable.h b/WebCore/svg/SVGTransformable.h
index 8979eb1..e2fec4e 100644
--- a/WebCore/svg/SVGTransformable.h
+++ b/WebCore/svg/SVGTransformable.h
@@ -35,9 +35,6 @@ class QualifiedName;
class SVGTransformable : virtual public SVGLocatable {
public:
- SVGTransformable();
- virtual ~SVGTransformable();
-
enum TransformParsingMode {
ClearList,
DoNotClearList
diff --git a/WebCore/svg/SVGURIReference.cpp b/WebCore/svg/SVGURIReference.cpp
index 97003e5..af62eb4 100644
--- a/WebCore/svg/SVGURIReference.cpp
+++ b/WebCore/svg/SVGURIReference.cpp
@@ -27,14 +27,6 @@
namespace WebCore {
-SVGURIReference::SVGURIReference()
-{
-}
-
-SVGURIReference::~SVGURIReference()
-{
-}
-
bool SVGURIReference::parseMappedAttribute(Attribute* attr)
{
if (attr->name().matches(XLinkNames::hrefAttr)) {
diff --git a/WebCore/svg/SVGURIReference.h b/WebCore/svg/SVGURIReference.h
index 0900215..92a93a9 100644
--- a/WebCore/svg/SVGURIReference.h
+++ b/WebCore/svg/SVGURIReference.h
@@ -31,8 +31,7 @@ namespace WebCore {
class SVGURIReference {
public:
- SVGURIReference();
- virtual ~SVGURIReference();
+ virtual ~SVGURIReference() { }
bool parseMappedAttribute(Attribute*);
bool isKnownAttribute(const QualifiedName&);
diff --git a/WebCore/svg/SVGUseElement.cpp b/WebCore/svg/SVGUseElement.cpp
index 68c087c..fc6c9fc 100644
--- a/WebCore/svg/SVGUseElement.cpp
+++ b/WebCore/svg/SVGUseElement.cpp
@@ -54,12 +54,8 @@
namespace WebCore {
-SVGUseElement::SVGUseElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
- , SVGURIReference()
+inline SVGUseElement::SVGUseElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
, m_x(LengthModeWidth)
, m_y(LengthModeHeight)
, m_width(LengthModeWidth)
@@ -70,8 +66,9 @@ SVGUseElement::SVGUseElement(const QualifiedName& tagName, Document* doc)
{
}
-SVGUseElement::~SVGUseElement()
+PassRefPtr<SVGUseElement> SVGUseElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGUseElement(tagName, document));
}
SVGElementInstance* SVGUseElement::instanceRoot() const
@@ -798,7 +795,7 @@ void SVGUseElement::expandUseElementsInShadowTree(SVGShadowTreeRootElement* shad
// Don't ASSERT(target) here, it may be "pending", too.
// Setup sub-shadow tree root node
- RefPtr<SVGShadowTreeContainerElement> cloneParent = new SVGShadowTreeContainerElement(document());
+ RefPtr<SVGShadowTreeContainerElement> cloneParent = SVGShadowTreeContainerElement::create(document());
// Spec: In the generated content, the 'use' will be replaced by 'g', where all attributes from the
// 'use' element except for x, y, width, height and xlink:href are transferred to the generated 'g' element.
@@ -848,7 +845,7 @@ void SVGUseElement::expandSymbolElementsInShadowTree(SVGShadowTreeRootElement* s
// height are provided on the 'use' element, then these attributes will be transferred to
// the generated 'svg'. If attributes width and/or height are not specified, the generated
// 'svg' element will use values of 100% for these attributes.
- RefPtr<SVGSVGElement> svgElement = new SVGSVGElement(SVGNames::svgTag, document());
+ RefPtr<SVGSVGElement> svgElement = SVGSVGElement::create(SVGNames::svgTag, document());
// Transfer all attributes from <symbol> to the new <svg> element
svgElement->attributes()->setAttributes(*element->attributes());
diff --git a/WebCore/svg/SVGUseElement.h b/WebCore/svg/SVGUseElement.h
index 52f3f6e..9366d25 100644
--- a/WebCore/svg/SVGUseElement.h
+++ b/WebCore/svg/SVGUseElement.h
@@ -40,11 +40,17 @@ namespace WebCore {
public SVGExternalResourcesRequired,
public SVGURIReference {
public:
- SVGUseElement(const QualifiedName&, Document*);
- virtual ~SVGUseElement();
+ static PassRefPtr<SVGUseElement> create(const QualifiedName&, Document*);
SVGElementInstance* instanceRoot() const;
SVGElementInstance* animatedInstanceRoot() const;
+ SVGElementInstance* instanceForShadowTreeElement(Node*) const;
+ void invalidateShadowTree();
+
+ RenderObject* rendererClipChild() const;
+
+ private:
+ SVGUseElement(const QualifiedName&, Document*);
virtual bool isValid() const { return SVGTests::isValid(); }
@@ -62,20 +68,15 @@ namespace WebCore {
virtual void detach();
virtual Path toClipPath() const;
- RenderObject* rendererClipChild() const;
static void removeDisallowedElementsFromSubtree(Node* element);
- SVGElementInstance* instanceForShadowTreeElement(Node* element) const;
- void invalidateShadowTree();
void setUpdatesBlocked(bool blocked) { m_updatesBlocked = blocked; }
- private:
friend class RenderSVGShadowTreeRootContainer;
bool isPendingResource() const { return m_isPendingResource; }
void buildShadowAndInstanceTree(SVGShadowTreeRootElement*);
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGUseElement, SVGNames::xAttr, SVGLength, X, x)
@@ -89,7 +90,6 @@ namespace WebCore {
// SVGExternalResourcesRequired
DECLARE_ANIMATED_PROPERTY(SVGUseElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
- private:
// Instance tree handling
void buildInstanceTree(SVGElement* target, SVGElementInstance* targetInstance, bool& foundCycle);
void handleDeepUseReferencing(SVGUseElement* use, SVGElementInstance* targetInstance, bool& foundCycle);
diff --git a/WebCore/svg/SVGVKernElement.cpp b/WebCore/svg/SVGVKernElement.cpp
index 662f714..b9f3c17 100644
--- a/WebCore/svg/SVGVKernElement.cpp
+++ b/WebCore/svg/SVGVKernElement.cpp
@@ -33,13 +33,14 @@ namespace WebCore {
using namespace SVGNames;
-SVGVKernElement::SVGVKernElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+inline SVGVKernElement::SVGVKernElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
-SVGVKernElement::~SVGVKernElement()
+PassRefPtr<SVGVKernElement> SVGVKernElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGVKernElement(tagName, document));
}
void SVGVKernElement::insertedIntoDocument()
diff --git a/WebCore/svg/SVGVKernElement.h b/WebCore/svg/SVGVKernElement.h
index c4bc90f..c8bb1d4 100644
--- a/WebCore/svg/SVGVKernElement.h
+++ b/WebCore/svg/SVGVKernElement.h
@@ -34,15 +34,17 @@ class SVGFontData;
class SVGVKernElement : public SVGElement {
public:
+ static PassRefPtr<SVGVKernElement> create(const QualifiedName&, Document*);
+
+ void buildVerticalKerningPair(KerningPairVector&);
+
+private:
SVGVKernElement(const QualifiedName&, Document*);
- virtual ~SVGVKernElement();
virtual void insertedIntoDocument();
virtual void removedFromDocument();
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
-
- void buildVerticalKerningPair(KerningPairVector&);
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGViewElement.cpp b/WebCore/svg/SVGViewElement.cpp
index 2b9b6cc..6a83066 100644
--- a/WebCore/svg/SVGViewElement.cpp
+++ b/WebCore/svg/SVGViewElement.cpp
@@ -32,16 +32,14 @@
namespace WebCore {
-SVGViewElement::SVGViewElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
- , SVGExternalResourcesRequired()
- , SVGFitToViewBox()
- , SVGZoomAndPan()
+inline SVGViewElement::SVGViewElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
{
}
-SVGViewElement::~SVGViewElement()
+PassRefPtr<SVGViewElement> SVGViewElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGViewElement(tagName, document));
}
SVGStringList* SVGViewElement::viewTarget() const
diff --git a/WebCore/svg/SVGViewElement.h b/WebCore/svg/SVGViewElement.h
index 14ea19e..b483236 100644
--- a/WebCore/svg/SVGViewElement.h
+++ b/WebCore/svg/SVGViewElement.h
@@ -35,17 +35,18 @@ namespace WebCore {
public SVGFitToViewBox,
public SVGZoomAndPan {
public:
+ static PassRefPtr<SVGViewElement> create(const QualifiedName&, Document*);
+
+ SVGStringList* viewTarget() const;
+
+ private:
SVGViewElement(const QualifiedName&, Document*);
- virtual ~SVGViewElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
- SVGStringList* viewTarget() const;
-
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
- private:
// SVGExternalResourcesRequired
DECLARE_ANIMATED_PROPERTY(SVGViewElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
diff --git a/WebCore/svg/SVGViewSpec.cpp b/WebCore/svg/SVGViewSpec.cpp
index 25fb66b..20c58ac 100644
--- a/WebCore/svg/SVGViewSpec.cpp
+++ b/WebCore/svg/SVGViewSpec.cpp
@@ -32,17 +32,11 @@
namespace WebCore {
SVGViewSpec::SVGViewSpec(const SVGSVGElement* contextElement)
- : SVGFitToViewBox()
- , SVGZoomAndPan()
- , m_contextElement(contextElement)
+ : m_contextElement(contextElement)
, m_transform(SVGTransformList::create(SVGNames::transformAttr))
{
}
-SVGViewSpec::~SVGViewSpec()
-{
-}
-
void SVGViewSpec::setTransform(const String& transform)
{
SVGTransformable::parseTransformAttribute(m_transform.get(), transform);
diff --git a/WebCore/svg/SVGViewSpec.h b/WebCore/svg/SVGViewSpec.h
index 3355fce..cf64bca 100644
--- a/WebCore/svg/SVGViewSpec.h
+++ b/WebCore/svg/SVGViewSpec.h
@@ -37,7 +37,6 @@ namespace WebCore {
public Noncopyable {
public:
SVGViewSpec(const SVGSVGElement*);
- virtual ~SVGViewSpec();
bool parseViewSpec(const String&);
diff --git a/WebCore/svg/SVGZoomAndPan.cpp b/WebCore/svg/SVGZoomAndPan.cpp
index d256bd0..93ab3ad 100644
--- a/WebCore/svg/SVGZoomAndPan.cpp
+++ b/WebCore/svg/SVGZoomAndPan.cpp
@@ -29,20 +29,6 @@
namespace WebCore {
-SVGZoomAndPan::SVGZoomAndPan()
- : m_zoomAndPan(SVG_ZOOMANDPAN_MAGNIFY)
-{
-}
-
-SVGZoomAndPan::~SVGZoomAndPan()
-{
-}
-
-unsigned short SVGZoomAndPan::zoomAndPan() const
-{
- return m_zoomAndPan;
-}
-
void SVGZoomAndPan::setZoomAndPan(unsigned short zoomAndPan)
{
m_zoomAndPan = zoomAndPan;
diff --git a/WebCore/svg/SVGZoomAndPan.h b/WebCore/svg/SVGZoomAndPan.h
index a85304d..b2e9d83 100644
--- a/WebCore/svg/SVGZoomAndPan.h
+++ b/WebCore/svg/SVGZoomAndPan.h
@@ -22,7 +22,8 @@
#define SVGZoomAndPan_h
#if ENABLE(SVG)
-#include "PlatformString.h"
+
+#include <wtf/unicode/Unicode.h>
namespace WebCore {
@@ -37,10 +38,10 @@ namespace WebCore {
SVG_ZOOMANDPAN_MAGNIFY = 2
};
- SVGZoomAndPan();
- virtual ~SVGZoomAndPan();
+ SVGZoomAndPan() : m_zoomAndPan(SVG_ZOOMANDPAN_MAGNIFY) { }
+ virtual ~SVGZoomAndPan() { }
- unsigned short zoomAndPan() const;
+ unsigned short zoomAndPan() const { return m_zoomAndPan; }
virtual void setZoomAndPan(unsigned short zoomAndPan);
bool parseMappedAttribute(Attribute*);
@@ -55,4 +56,5 @@ namespace WebCore {
} // namespace WebCore
#endif // ENABLE(SVG)
+
#endif // SVGZoomAndPan_h
diff --git a/WebCore/svg/SVGZoomEvent.cpp b/WebCore/svg/SVGZoomEvent.cpp
index f8d94e4..784c32b 100644
--- a/WebCore/svg/SVGZoomEvent.cpp
+++ b/WebCore/svg/SVGZoomEvent.cpp
@@ -31,10 +31,6 @@ SVGZoomEvent::SVGZoomEvent()
{
}
-SVGZoomEvent::~SVGZoomEvent()
-{
-}
-
FloatRect SVGZoomEvent::zoomRectScreen() const
{
return m_zoomRectScreen;
diff --git a/WebCore/svg/SVGZoomEvent.h b/WebCore/svg/SVGZoomEvent.h
index d4b7de0..48a3636 100644
--- a/WebCore/svg/SVGZoomEvent.h
+++ b/WebCore/svg/SVGZoomEvent.h
@@ -31,7 +31,6 @@ namespace WebCore {
class SVGZoomEvent : public UIEvent {
public:
static PassRefPtr<SVGZoomEvent> create() { return adoptRef(new SVGZoomEvent); }
- virtual ~SVGZoomEvent();
// 'SVGZoomEvent' functions
FloatRect zoomRectScreen() const;
@@ -46,11 +45,11 @@ namespace WebCore {
FloatPoint newTranslate() const;
- virtual bool isSVGZoomEvent() const;
-
private:
SVGZoomEvent();
+ virtual bool isSVGZoomEvent() const;
+
float m_newScale;
float m_previousScale;
diff --git a/WebCore/svg/graphics/SVGImage.cpp b/WebCore/svg/graphics/SVGImage.cpp
index 6608c9e..2d1d592 100644
--- a/WebCore/svg/graphics/SVGImage.cpp
+++ b/WebCore/svg/graphics/SVGImage.cpp
@@ -240,7 +240,7 @@ bool SVGImage::dataChanged(bool allDataReceived)
static FrameLoaderClient* dummyFrameLoaderClient = new EmptyFrameLoaderClient;
Page::PageClients pageClients;
- m_chromeClient.set(new SVGImageChromeClient(this));
+ m_chromeClient = adoptPtr(new SVGImageChromeClient(this));
pageClients.chromeClient = m_chromeClient.get();
#if ENABLE(CONTEXT_MENUS)
static ContextMenuClient* dummyContextMenuClient = new EmptyContextMenuClient;
diff --git a/WebCore/svg/svgtags.in b/WebCore/svg/svgtags.in
index adf0b24..ee6765c 100644
--- a/WebCore/svg/svgtags.in
+++ b/WebCore/svg/svgtags.in
@@ -2,105 +2,105 @@ namespace="SVG"
namespaceURI="http://www.w3.org/2000/svg"
guardFactoryWith="ENABLE(SVG)"
-a createWithNew
+a
#if ENABLE_SVG_FONTS
-altGlyph createWithNew
+altGlyph
#endif
#if 0
-altGlyphDef createWithNew
-altGlyphItem createWithNew
+altGlyphDef
+altGlyphItem
#endif
#if ENABLE_SVG_ANIMATION
-animate createWithNew
-animateColor createWithNew
-animateMotion JSInterfaceName=SVGElement, createWithNew
-animateTransform createWithNew
-set createWithNew
+animate
+animateColor
+animateMotion JSInterfaceName=SVGElement
+animateTransform
+set
#endif
-circle createWithNew
-clipPath createWithNew
+circle
+clipPath
#if 0
-color_profile createWithNew
+color_profile
#endif
-cursor createWithNew
-defs createWithNew
-desc createWithNew
-ellipse createWithNew
+cursor
+defs
+desc
+ellipse
#if ENABLE_FILTERS
-feBlend createWithNew
-feColorMatrix createWithNew
-feComponentTransfer createWithNew
-feComposite createWithNew
-feConvolveMatrix createWithNew
-feDiffuseLighting createWithNew
-feDisplacementMap createWithNew
-feDistantLight createWithNew
-feFlood createWithNew
-feFuncA createWithNew
-feFuncB createWithNew
-feFuncG createWithNew
-feFuncR createWithNew
-feGaussianBlur createWithNew
-feImage createWithNew
-feMerge createWithNew
-feMergeNode createWithNew
-feMorphology createWithNew
-feOffset createWithNew
-fePointLight createWithNew
-feSpecularLighting createWithNew
-feSpotLight createWithNew
-feTile createWithNew
-feTurbulence createWithNew
-filter createWithNew
+feBlend
+feColorMatrix
+feComponentTransfer
+feComposite
+feConvolveMatrix
+feDiffuseLighting
+feDisplacementMap
+feDistantLight
+feFlood
+feFuncA
+feFuncB
+feFuncG
+feFuncR
+feGaussianBlur
+feImage
+feMerge
+feMergeNode
+feMorphology
+feOffset
+fePointLight
+feSpecularLighting
+feSpotLight
+feTile
+feTurbulence
+filter
#endif
#if ENABLE_SVG_FONTS
-font createWithNew
-font_face createWithNew
-font_face_format createWithNew
-font_face_name createWithNew
-font_face_src createWithNew
-font_face_uri createWithNew
+font
+font_face
+font_face_format
+font_face_name
+font_face_src
+font_face_uri
#endif
#if ENABLE_SVG_FOREIGN_OBJECT
-foreignObject createWithNew
+foreignObject
#endif
-g createWithNew
+g
#if ENABLE_SVG_FONTS
-glyph createWithNew
+glyph
#endif
#if 0
-glyphRef createWithNew
+glyphRef
#endif
#if ENABLE_SVG_FONTS
-hkern interfaceName=SVGHKernElement, JSInterfaceName=SVGElement, createWithNew
+hkern interfaceName=SVGHKernElement, JSInterfaceName=SVGElement
#endif
-image createWithNew
-line createWithNew
-linearGradient createWithNew
-marker createWithNew
-mask createWithNew
-metadata createWithNew
+image
+line
+linearGradient
+marker
+mask
+metadata
#if ENABLE_SVG_FONTS
-missing_glyph createWithNew
+missing_glyph
#endif
-mpath interfaceName=SVGMPathElement, JSInterfaceName=SVGElement, createWithNew
-path createWithNew
-pattern createWithNew
-polygon createWithNew
-polyline createWithNew
-radialGradient createWithNew
-rect createWithNew
-script constructorNeedsCreatedByParser, createWithNew
-stop createWithNew
-style constructorNeedsCreatedByParser, createWithNew
-svg interfaceName=SVGSVGElement, createWithNew
-switch createWithNew
-symbol createWithNew
-text createWithNew
-textPath createWithNew
-title createWithNew
-tref interfaceName=SVGTRefElement, createWithNew
-tspan interfaceName=SVGTSpanElement, createWithNew
-use createWithNew
-view createWithNew
-vkern interfaceName=SVGVKernElement, createWithNew
+mpath interfaceName=SVGMPathElement, JSInterfaceName=SVGElement
+path
+pattern
+polygon
+polyline
+radialGradient
+rect
+script constructorNeedsCreatedByParser
+stop
+style constructorNeedsCreatedByParser
+svg interfaceName=SVGSVGElement
+switch
+symbol
+text
+textPath
+title
+tref interfaceName=SVGTRefElement
+tspan interfaceName=SVGTSpanElement
+use
+view
+vkern interfaceName=SVGVKernElement