diff --git a/content/base/public/nsContentCreatorFunctions.h b/content/base/public/nsContentCreatorFunctions.h index a4c3f39a210..80ab4e80582 100644 --- a/content/base/public/nsContentCreatorFunctions.h +++ b/content/base/public/nsContentCreatorFunctions.h @@ -48,8 +48,8 @@ CreateHTMLElement(uint32_t aNodeType, already_AddRefed aNodeInfo, mozilla::dom::FromParser aFromParser); nsresult -NS_NewMathMLElement(nsIContent** aResult, - already_AddRefed aNodeInfo); +NS_NewMathMLElement(mozilla::dom::Element** aResult, + already_AddRefed aNodeInfo); #ifdef MOZ_XUL nsresult diff --git a/content/base/src/nsNameSpaceManager.cpp b/content/base/src/nsNameSpaceManager.cpp index 9fd07e3e068..6a39a07b907 100644 --- a/content/base/src/nsNameSpaceManager.cpp +++ b/content/base/src/nsNameSpaceManager.cpp @@ -208,7 +208,10 @@ NS_NewElement(nsIContent** aResult, } #endif if (ns == kNameSpaceID_MathML) { - return NS_NewMathMLElement(aResult, aNodeInfo); + nsCOMPtr el; + nsresult rv = NS_NewMathMLElement(getter_AddRefs(el), aNodeInfo); + el.forget(aResult); + return rv; } if (ns == kNameSpaceID_SVG) { return NS_NewSVGElement(aResult, aNodeInfo, aFromParser); diff --git a/content/mathml/content/src/nsMathMLElementFactory.cpp b/content/mathml/content/src/nsMathMLElementFactory.cpp index 44249689af9..d8e5ff37b6f 100644 --- a/content/mathml/content/src/nsMathMLElementFactory.cpp +++ b/content/mathml/content/src/nsMathMLElementFactory.cpp @@ -7,9 +7,11 @@ #include "nsGkAtoms.h" #include "nsMathMLElement.h" +using namespace mozilla::dom; + // MathML Element Factory (declared in nsContentCreatorFunctions.h) nsresult -NS_NewMathMLElement(nsIContent** aResult, already_AddRefed aNodeInfo) +NS_NewMathMLElement(Element** aResult, already_AddRefed aNodeInfo) { aNodeInfo.get()->SetIDAttributeAtom(nsGkAtoms::id);