2010-08-29 Darin Adler <darin@apple.com>
Reviewed by Maciej Stachowiak.
Create SVG and WML elements with create functions instead of direct invocations of new
https://bugs.webkit.org/show_bug.cgi?id=44851
Added the create functions, made some existing constructors protected and private,
made some other member functions protected and and private, added some missing virtual
keywords for clarity to functions that already were overriding virtual functions,
fixed some inconsistent indentation, and removed some unneeded empty destructors.
In the future, it will be good to have the constructors all be private so we don't
use them by accident. Then we'll change the reference count rule globally and add
all the necessary calls to adoptRef.
The SVG changes are compiled and tested. The WML changes are speculative and untested.
* dom/make_names.pl: Removed supportfor the createWithNew keyword.
* svg/svgtags.in: Removed all the createWithNew keywords.
* wml/WMLTagNames.in: Ditto.
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::create): Added.
* svg/SVGAElement.h:
* svg/SVGAltGlyphElement.cpp:
(WebCore::SVGAltGlyphElement::create): Added.
* svg/SVGAltGlyphElement.h:
* svg/SVGAnimateColorElement.cpp:
(WebCore::SVGAnimateColorElement::create): Added.
* svg/SVGAnimateColorElement.h:
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::create): Added.
* svg/SVGAnimateElement.h:
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::create): Added.
* svg/SVGAnimateMotionElement.h:
* svg/SVGAnimateTransformElement.cpp:
(WebCore::SVGAnimateTransformElement::create): Added.
* svg/SVGAnimateTransformElement.h:
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::create): Added.
* svg/SVGCircleElement.h:
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::create): Added.
* svg/SVGClipPathElement.h:
* svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::create): Added.
* svg/SVGCursorElement.h:
* svg/SVGDefsElement.cpp:
(WebCore::SVGDefsElement::create): Added.
* svg/SVGDefsElement.h:
* svg/SVGDescElement.cpp:
(WebCore::SVGDescElement::create): Added.
* svg/SVGDescElement.h:
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::create): Added.
* svg/SVGEllipseElement.h:
* svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::create): Added.
* svg/SVGFEBlendElement.h:
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::create): Added.
* svg/SVGFEColorMatrixElement.h:
* svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::create): Added.
* svg/SVGFEComponentTransferElement.h:
* svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::create): Added.
* svg/SVGFECompositeElement.h:
* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::create): Added.
* svg/SVGFEConvolveMatrixElement.h:
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::create): Added.
* svg/SVGFEDiffuseLightingElement.h:
* svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::create): Added.
* svg/SVGFEDisplacementMapElement.h:
* svg/SVGFEDistantLightElement.cpp:
(WebCore::SVGFEDistantLightElement::create): Added.
* svg/SVGFEDistantLightElement.h:
* svg/SVGFEFloodElement.cpp:
(WebCore::SVGFEFloodElement::create): Added.
* svg/SVGFEFloodElement.h:
* svg/SVGFEFuncAElement.cpp:
(WebCore::SVGFEFuncAElement::create): Added.
* svg/SVGFEFuncAElement.h:
* svg/SVGFEFuncBElement.cpp:
(WebCore::SVGFEFuncBElement::create): Added.
* svg/SVGFEFuncBElement.h:
* svg/SVGFEFuncGElement.cpp:
(WebCore::SVGFEFuncGElement::create): Added.
* svg/SVGFEFuncGElement.h:
* svg/SVGFEFuncRElement.cpp:
(WebCore::SVGFEFuncRElement::create): Added.
* svg/SVGFEFuncRElement.h:
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::create): Added.
* svg/SVGFEGaussianBlurElement.h:
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::create): Added.
* svg/SVGFEImageElement.h:
* svg/SVGFEMergeElement.cpp:
(WebCore::SVGFEMergeElement::create): Added.
* svg/SVGFEMergeElement.h:
* svg/SVGFEMergeNodeElement.cpp:
(WebCore::SVGFEMergeNodeElement::create): Added.
* svg/SVGFEMergeNodeElement.h:
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::create): Added.
* svg/SVGFEMorphologyElement.h:
* svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::create): Added.
* svg/SVGFEOffsetElement.h:
* svg/SVGFEPointLightElement.cpp:
(WebCore::SVGFEPointLightElement::create): Added.
* svg/SVGFEPointLightElement.h:
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::create): Added.
* svg/SVGFESpecularLightingElement.h:
* svg/SVGFESpotLightElement.cpp:
(WebCore::SVGFESpotLightElement::create): Added.
* svg/SVGFESpotLightElement.h:
* svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::create): Added.
* svg/SVGFETileElement.h:
* svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::create): Added.
* svg/SVGFETurbulenceElement.h:
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::create): Added.
* svg/SVGFilterElement.h:
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::create): Added.
* svg/SVGFontElement.h:
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::create): Added.
* svg/SVGFontFaceElement.h:
* svg/SVGFontFaceFormatElement.cpp:
(WebCore::SVGFontFaceFormatElement::create): Added.
* svg/SVGFontFaceFormatElement.h:
* svg/SVGFontFaceNameElement.cpp:
(WebCore::SVGFontFaceNameElement::create): Added.
* svg/SVGFontFaceNameElement.h:
* svg/SVGFontFaceSrcElement.cpp:
(WebCore::SVGFontFaceSrcElement::create): Added.
* svg/SVGFontFaceSrcElement.h:
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::create): Added.
* svg/SVGFontFaceUriElement.h:
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::create): Added.
* svg/SVGForeignObjectElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::create): Added.
* svg/SVGGElement.h:
* svg/SVGGlyphElement.cpp:
(WebCore::SVGGlyphElement::create): Added.
* svg/SVGGlyphElement.h:
* svg/SVGHKernElement.cpp:
(WebCore::SVGHKernElement::create): Added.
* svg/SVGHKernElement.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::create): Added.
* svg/SVGImageElement.h:
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::create): Added.
* svg/SVGLineElement.h:
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::create): Added.
* svg/SVGLinearGradientElement.h:
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::create): Added.
* svg/SVGMPathElement.h:
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::create): Added.
* svg/SVGMarkerElement.h:
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::create): Added.
* svg/SVGMaskElement.h:
* svg/SVGMetadataElement.cpp:
(SVGMetadataElement::create): Added.
* svg/SVGMetadataElement.h:
* svg/SVGMissingGlyphElement.cpp:
(WebCore::SVGMissingGlyphElement::create): Added.
* svg/SVGMissingGlyphElement.h:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::create): Added.
* svg/SVGPathElement.h:
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::create): Added.
* svg/SVGPatternElement.h:
* svg/SVGPolygonElement.cpp:
(WebCore::SVGPolygonElement::create): Added.
* svg/SVGPolygonElement.h:
* svg/SVGPolylineElement.cpp:
(WebCore::SVGPolylineElement::create): Added.
* svg/SVGPolylineElement.h:
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::create): Added.
* svg/SVGRadialGradientElement.h:
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::create): Added.
* svg/SVGRectElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::create): Added.
* svg/SVGSVGElement.h:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::create): Added.
* svg/SVGScriptElement.h:
* svg/SVGSetElement.cpp:
(WebCore::SVGSetElement::create): Added.
* svg/SVGSetElement.h:
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::create): Added.
* svg/SVGStopElement.h:
(WebCore::SVGStyleElement::create): Added.
* svg/SVGStyleElement.h:
* svg/SVGSwitchElement.cpp:
(WebCore::SVGSwitchElement::create): Added.
* svg/SVGSwitchElement.h:
* svg/SVGSymbolElement.cpp:
(WebCore::SVGSymbolElement::create): Added.
* svg/SVGSymbolElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::create): Added.
* svg/SVGTRefElement.h:
* svg/SVGTSpanElement.cpp:
(WebCore::SVGTSpanElement::create): Added.
* svg/SVGTSpanElement.h:
* svg/SVGTextContentElement.h:
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::create): Added.
* svg/SVGTextElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::create): Added.
* svg/SVGTextPathElement.h:
* svg/SVGTextPositioningElement.h:
* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::create): Added.
* svg/SVGTitleElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::create): Added.
* svg/SVGUseElement.h:
* svg/SVGVKernElement.cpp:
(WebCore::SVGVKernElement::create): Added.
* svg/SVGVKernElement.h:
* svg/SVGViewElement.cpp:
(WebCore::SVGViewElement::create): Added.
* svg/SVGViewElement.h:
* wml/WMLAElement.cpp:
(WebCore::WMLAElement::create): Added.
* wml/WMLAElement.h:
* wml/WMLAccessElement.cpp:
(WebCore::WMLAccessElement::create): Added.
* wml/WMLAccessElement.h:
* wml/WMLAnchorElement.cpp:
(WebCore::WMLAnchorElement::create): Added.
* wml/WMLAnchorElement.h:
* wml/WMLBRElement.cpp:
(WebCore::WMLBRElement::create): Added.
* wml/WMLBRElement.h:
* wml/WMLCardElement.cpp:
(WebCore::WMLCardElement::create): Added.
* wml/WMLCardElement.h:
* wml/WMLDoElement.cpp:
(WebCore::WMLDoElement::create): Added.
* wml/WMLDoElement.h:
* wml/WMLFieldSetElement.cpp:
(WebCore::WMLFieldSetElement::create): Added.
* wml/WMLFieldSetElement.h:
* wml/WMLFormControlElement.cpp:
(WebCore::WMLFormControlElement::create): Added.
* wml/WMLGoElement.cpp:
(WebCore::WMLGoElement::create): Added.
* wml/WMLGoElement.h:
* wml/WMLImageElement.cpp:
(WebCore::WMLImageElement::create): Added.
* wml/WMLImageElement.h:
* wml/WMLInputElement.cpp:
(WebCore::WMLInputElement::create): Added.
* wml/WMLInputElement.h:
* wml/WMLInsertedLegendElement.cpp:
(WebCore::WMLInsertedLegendElement::create): Added.
* wml/WMLInsertedLegendElement.h:
* wml/WMLIntrinsicEvent.cpp:
(WebCore::WMLIntrinsicEvent::create): Added.
* wml/WMLMetaElement.cpp:
(WebCore::WMLMetaElement::create): Added.
* wml/WMLMetaElement.h:
* wml/WMLNoopElement.cpp:
(WebCore::WMLNoopElement::create): Added.
* wml/WMLNoopElement.h:
* wml/WMLOnEventElement.cpp:
(WebCore::WMLOnEventElement::create): Added.
* wml/WMLOnEventElement.h:
* wml/WMLOptGroupElement.cpp:
(WebCore::WMLOptGroupElement::create): Added.
* wml/WMLOptGroupElement.h:
* wml/WMLOptionElement.cpp:
(WebCore::WMLOptionElement::create): Added.
* wml/WMLOptionElement.h:
* wml/WMLPElement.cpp:
(WebCore::WMLPElement::create): Added.
* wml/WMLPElement.h:
* wml/WMLPostfieldElement.cpp:
(WebCore::WMLPostfieldElement::create): Added.
* wml/WMLPostfieldElement.h:
* wml/WMLPrevElement.cpp:
(WebCore::WMLPrevElement::create): Added.
* wml/WMLPrevElement.h:
* wml/WMLRefreshElement.cpp:
(WebCore::WMLRefreshElement::create): Added.
* wml/WMLRefreshElement.h:
* wml/WMLSelectElement.cpp:
(WebCore::WMLSelectElement::create): Added.
* wml/WMLSelectElement.h:
* wml/WMLSetvarElement.cpp:
(WebCore::WMLSetvarElement::create): Added.
* wml/WMLSetvarElement.h:
* wml/WMLTableElement.cpp:
(WebCore::WMLTableElement::create): Added.
* wml/WMLTableElement.h:
* wml/WMLTaskElement.cpp:
(WebCore::WMLTaskElement::create): Added.
* wml/WMLTaskElement.h:
* wml/WMLTemplateElement.cpp:
(WebCore::WMLTemplateElement::create): Added.
* wml/WMLTemplateElement.h:
* wml/WMLTimerElement.cpp:
(WebCore::WMLTimerElement::create): Added.
* wml/WMLTimerElement.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/svg/SVGGlyphElement.cpp b/WebCore/svg/SVGGlyphElement.cpp
index 2c84841..17642cc 100644
--- a/WebCore/svg/SVGGlyphElement.cpp
+++ b/WebCore/svg/SVGGlyphElement.cpp
@@ -42,6 +42,11 @@
{
}
+PassRefPtr<SVGGlyphElement> SVGGlyphElement::create(const QualifiedName& tagName, Document* document)
+{
+ return new SVGGlyphElement(tagName, document);
+}
+
SVGGlyphElement::~SVGGlyphElement()
{
}