Bug 494103 - nsXMLContentSerializer UMR during update.mar tests; r+sr=peterv

This commit is contained in:
Laurent Jouanneau 2009-06-13 15:27:35 +02:00
parent 5f5ad04827
commit 1eaf91e8f7
2 changed files with 5 additions and 5 deletions

View File

@ -205,7 +205,7 @@ nsHTMLContentSerializer::AppendElementStart(nsIDOMElement *aElement,
nsCOMPtr<nsIContent> content = do_QueryInterface(aElement);
if (!content) return NS_ERROR_FAILURE;
PRBool forceFormat;
PRBool forceFormat = PR_FALSE;
if (!CheckElementStart(content, forceFormat, aStr)) {
return NS_OK;
}

View File

@ -898,7 +898,7 @@ nsXMLContentSerializer::AppendElementStart(nsIDOMElement *aElement,
nsCOMPtr<nsIContent> content(do_QueryInterface(aElement));
if (!content) return NS_ERROR_FAILURE;
PRBool forceFormat;
PRBool forceFormat = PR_FALSE;
if (!CheckElementStart(content, forceFormat, aStr)) {
return NS_OK;
}
@ -1001,7 +1001,7 @@ nsXMLContentSerializer::AppendElementEnd(nsIDOMElement *aElement,
nsCOMPtr<nsIContent> content(do_QueryInterface(aElement));
if (!content) return NS_ERROR_FAILURE;
PRBool forceFormat, outputElementEnd;
PRBool forceFormat = PR_FALSE, outputElementEnd;
outputElementEnd = CheckElementEnd(content, forceFormat, aStr);
nsIAtom *name = content->Tag();
@ -1133,11 +1133,11 @@ nsXMLContentSerializer::CheckElementEnd(nsIContent * aContent,
// We don't output a separate end tag for empty element
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(aContent));
PRBool hasChildren;
aForceFormat = PR_FALSE;
if (NS_SUCCEEDED(node->HasChildNodes(&hasChildren)) && !hasChildren) {
return PR_FALSE;
}
aForceFormat = PR_FALSE;
return PR_TRUE;
}