Bug 245627. Minor deCOMtamination of HTML element constructor functions. r+sr=jst

This commit is contained in:
roc+@cs.cmu.edu
2004-06-06 02:38:32 +00:00
parent 8f74808557
commit d2fbca2034
15 changed files with 213 additions and 394 deletions

View File

@@ -644,10 +644,11 @@ CreateHTMLImgElement(nsISupports* aOuter, REFNSIID aIID, void** aResult)
*aResult = nsnull;
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
nsIHTMLContent* inst;
// Note! NS_NewHTMLImageElement is special cased to handle a null nodeinfo
nsresult rv = NS_NewHTMLImageElement(&inst, nsnull);
if (NS_SUCCEEDED(rv)) {
nsIHTMLContent* inst = NS_NewHTMLImageElement(nsnull);
nsresult rv = NS_ERROR_OUT_OF_MEMORY;
if (inst) {
NS_ADDREF(inst);
rv = inst->QueryInterface(aIID, aResult);
NS_RELEASE(inst);
}
@@ -694,10 +695,11 @@ CreateHTMLOptionElement(nsISupports* aOuter, REFNSIID aIID, void** aResult)
*aResult = nsnull;
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
nsIHTMLContent* inst;
// Note! NS_NewHTMLOptionElement is special cased to handle a null nodeinfo
nsresult rv = NS_NewHTMLOptionElement(&inst, nsnull);
if (NS_SUCCEEDED(rv)) {
nsIHTMLContent* inst = NS_NewHTMLOptionElement(nsnull);
nsresult rv = NS_ERROR_OUT_OF_MEMORY;
if (inst) {
NS_ADDREF(inst);
rv = inst->QueryInterface(aIID, aResult);
NS_RELEASE(inst);
}