Backing out part of fix for bug #67007 that cause bug #67408. (Can't type newlines in textareas)

a=leaf
This commit is contained in:
kin%netscape.com 2001-02-02 16:32:27 +00:00
Родитель faa1cf241f
Коммит 667694cf0f
2 изменённых файлов: 20 добавлений и 6 удалений

Просмотреть файл

@ -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);
}