From bba412742689ba6c56458ae6241daa1760b05dfc Mon Sep 17 00:00:00 2001 From: David Zbarsky Date: Fri, 4 Jan 2013 17:28:04 -0500 Subject: [PATCH] Bug 824327: Add a namespaced version of NS_NewSVGXXXElement r=bz --- content/svg/content/src/nsSVGElement.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/content/svg/content/src/nsSVGElement.h b/content/svg/content/src/nsSVGElement.h index 19b210ed230..6f802305753 100644 --- a/content/svg/content/src/nsSVGElement.h +++ b/content/svg/content/src/nsSVGElement.h @@ -640,6 +640,25 @@ NS_NewSVG##_elementName##Element(nsIContent **aResult, \ return rv; \ } +#define NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(_elementName) \ +nsresult \ +NS_NewSVG##_elementName##Element(nsIContent **aResult, \ + already_AddRefed aNodeInfo) \ +{ \ + nsRefPtr it = \ + new mozilla::dom::SVG##_elementName##Element(aNodeInfo); \ + \ + nsresult rv = it->Init(); \ + \ + if (NS_FAILED(rv)) { \ + return rv; \ + } \ + \ + it.forget(aResult); \ + \ + return rv; \ +} + #define NS_IMPL_NS_NEW_SVG_ELEMENT_CHECK_PARSER(_elementName) \ nsresult \ NS_NewSVG##_elementName##Element(nsIContent **aResult, \