Modernize the SVGElement and MathMLElement factories
https://bugs.webkit.org/show_bug.cgi?id=140163
Reviewed by Dan Bernstein.
* dom/Element.cpp:
(WebCore::Element::create):
* dom/Element.h:
Change to return a Ref rather than a RefPtr.
* dom/make_names.pl:
(printConstructorSignature):
(printFactoryCppFile):
(printFactoryHeaderFile):
Change to unconditionally use Ref as the return type for element factories
now that HTML is not special cased.
* SVG and MathML element files elided *
Changed all SVG and MathML element's create functions to return a Ref.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@178048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/svg/SVGMaskElement.cpp b/Source/WebCore/svg/SVGMaskElement.cpp
index 73f8e96..56cba9d 100644
--- a/Source/WebCore/svg/SVGMaskElement.cpp
+++ b/Source/WebCore/svg/SVGMaskElement.cpp
@@ -72,9 +72,9 @@
registerAnimatedPropertiesForSVGMaskElement();
}
-PassRefPtr<SVGMaskElement> SVGMaskElement::create(const QualifiedName& tagName, Document& document)
+Ref<SVGMaskElement> SVGMaskElement::create(const QualifiedName& tagName, Document& document)
{
- return adoptRef(new SVGMaskElement(tagName, document));
+ return adoptRef(*new SVGMaskElement(tagName, document));
}
bool SVGMaskElement::isSupportedAttribute(const QualifiedName& attrName)