diff --git a/content/base/src/nsDocumentEncoder.cpp b/content/base/src/nsDocumentEncoder.cpp index 9c40e5f46f5..d47c52bb97a 100644 --- a/content/base/src/nsDocumentEncoder.cpp +++ b/content/base/src/nsDocumentEncoder.cpp @@ -1463,16 +1463,16 @@ nsHTMLCopyEncoder::GetPromotedPoint(Endpoint aWhere, nsIDOMNode *aNode, PRInt32 { if (bResetPromotion) { - nsAutoString tag; - nsCOMPtr atom; nsCOMPtr content = do_QueryInterface(parent); if (content) { - PRBool isBlock = PR_FALSE; - PRInt32 id; + nsCOMPtr atom; content->GetTag(getter_AddRefs(atom)); - atom->ToString(tag); - parserService->HTMLStringTagToId(tag, &id); + + PRInt32 id; + parserService->HTMLAtomTagToId(atom, &id); + + PRBool isBlock = PR_FALSE; parserService->IsBlock(id, isBlock); if (isBlock) { @@ -1552,16 +1552,16 @@ nsHTMLCopyEncoder::GetPromotedPoint(Endpoint aWhere, nsIDOMNode *aNode, PRInt32 { if (bResetPromotion) { - nsAutoString tag; - nsCOMPtr atom; nsCOMPtr content = do_QueryInterface(parent); if (content) { - PRBool isBlock = PR_FALSE; - PRInt32 id; + nsCOMPtr atom; content->GetTag(getter_AddRefs(atom)); - atom->ToString(tag); - parserService->HTMLStringTagToId(tag, &id); + + PRInt32 id; + parserService->HTMLAtomTagToId(atom, &id); + + PRBool isBlock = PR_FALSE; parserService->IsBlock(id, isBlock); if (isBlock) { diff --git a/content/base/src/nsPlainTextSerializer.cpp b/content/base/src/nsPlainTextSerializer.cpp index f2851f16ead..5a2472b4f7e 100644 --- a/content/base/src/nsPlainTextSerializer.cpp +++ b/content/base/src/nsPlainTextSerializer.cpp @@ -1863,19 +1863,12 @@ nsPlainTextSerializer::GetIdForContent(nsIContent* aContent, mContent->GetTag(getter_AddRefs(tagname)); if (!tagname) return NS_ERROR_FAILURE; - nsAutoString namestr; - tagname->ToString(namestr); - nsIParserService* parserService = nsContentUtils::GetParserServiceWeakRef(); if (!parserService) return NS_ERROR_FAILURE; - nsresult rv; - rv = parserService->HTMLStringTagToId(namestr, aID); - if (NS_FAILED(rv)) return NS_ERROR_FAILURE; - - return NS_OK; + return parserService->HTMLAtomTagToId(tagname, aID); } /**