a=leaf git-svn-id: svn://10.0.0.236/trunk@86105 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -826,15 +826,22 @@ NS_CreateHTMLElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo)
|
||||
&rv);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsAutoString tag;
|
||||
aNodeInfo->GetName(tag);
|
||||
nsAutoString tmpName;
|
||||
aNodeInfo->GetName(tmpName);
|
||||
// Find tag in tag table
|
||||
PRInt32 id;
|
||||
rv = parserService->HTMLStringTagToId(tmpName, &id);
|
||||
if (eHTMLTag_userdefined == nsHTMLTag(id)) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
rv = parserService->HTMLStringTagToId(tag, &id);
|
||||
// Create atom for tag and then create content object
|
||||
nsAutoString tag;
|
||||
rv = parserService->HTMLIdToStringTag(id, tag);
|
||||
nsCOMPtr<nsIAtom> atom(dont_AddRef(NS_NewAtom(tag.GetUnicode())));
|
||||
nsCOMPtr<nsINodeInfo> newName;
|
||||
aNodeInfo->NameChanged(atom, *getter_AddRefs(newName));
|
||||
|
||||
rv = MakeContentObject(nsHTMLTag(id), newName, nsnull, nsnull, aResult);
|
||||
}
|
||||
|
||||
|
||||
@@ -826,15 +826,22 @@ NS_CreateHTMLElement(nsIHTMLContent** aResult, nsINodeInfo *aNodeInfo)
|
||||
&rv);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsAutoString tag;
|
||||
aNodeInfo->GetName(tag);
|
||||
nsAutoString tmpName;
|
||||
aNodeInfo->GetName(tmpName);
|
||||
// Find tag in tag table
|
||||
PRInt32 id;
|
||||
rv = parserService->HTMLStringTagToId(tmpName, &id);
|
||||
if (eHTMLTag_userdefined == nsHTMLTag(id)) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
rv = parserService->HTMLStringTagToId(tag, &id);
|
||||
// Create atom for tag and then create content object
|
||||
nsAutoString tag;
|
||||
rv = parserService->HTMLIdToStringTag(id, tag);
|
||||
nsCOMPtr<nsIAtom> atom(dont_AddRef(NS_NewAtom(tag.GetUnicode())));
|
||||
nsCOMPtr<nsINodeInfo> newName;
|
||||
aNodeInfo->NameChanged(atom, *getter_AddRefs(newName));
|
||||
|
||||
rv = MakeContentObject(nsHTMLTag(id), newName, nsnull, nsnull, aResult);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user