зеркало из https://github.com/mozilla/pjs.git
a=leaf
This commit is contained in:
Родитель
44182556c1
Коммит
3748fdc618
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче