Bug 945572 part 3. Make NS_NewMathMLElement take an Element** outparam instead of an nsIContent** one. r=smaug

This commit is contained in:
Boris Zbarsky 2013-12-03 09:40:11 -05:00
parent 94153ceb3d
commit b11cfd5183
3 changed files with 9 additions and 4 deletions

View File

@ -48,8 +48,8 @@ CreateHTMLElement(uint32_t aNodeType, already_AddRefed<nsINodeInfo> aNodeInfo,
mozilla::dom::FromParser aFromParser);
nsresult
NS_NewMathMLElement(nsIContent** aResult,
already_AddRefed<nsINodeInfo> aNodeInfo);
NS_NewMathMLElement(mozilla::dom::Element** aResult,
already_AddRefed<nsINodeInfo> aNodeInfo);
#ifdef MOZ_XUL
nsresult

View File

@ -208,7 +208,10 @@ NS_NewElement(nsIContent** aResult,
}
#endif
if (ns == kNameSpaceID_MathML) {
return NS_NewMathMLElement(aResult, aNodeInfo);
nsCOMPtr<Element> el;
nsresult rv = NS_NewMathMLElement(getter_AddRefs(el), aNodeInfo);
el.forget(aResult);
return rv;
}
if (ns == kNameSpaceID_SVG) {
return NS_NewSVGElement(aResult, aNodeInfo, aFromParser);

View File

@ -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<nsINodeInfo> aNodeInfo)
NS_NewMathMLElement(Element** aResult, already_AddRefed<nsINodeInfo> aNodeInfo)
{
aNodeInfo.get()->SetIDAttributeAtom(nsGkAtoms::id);