40408 (nsbeta2+) - Check for nsresult in nsFragmentContentSink::AddLeaf().

The HTMLTag array was,erroneously,going out-of-bounds for XMP tag.
r=rickg
30617 (nsbeta2+) - Misplaced AREA tag should be informed with base target info.
r=vidur.
This commit is contained in:
harishd%netscape.com 2000-06-08 21:32:09 +00:00
Родитель f6f35bfa1e
Коммит 81e062668f
4 изменённых файлов: 40 добавлений и 34 удалений

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

@ -3364,6 +3364,8 @@ HTMLContentSink::ProcessAREATag(const nsIParserNode& aNode)
return rv;
}
AddBaseTagInfo(area); // basehref or basetarget. Fix. Bug: 30617
// Add AREA object to the current map
mCurrentMap->AppendChildTo(area, PR_FALSE);
NS_RELEASE(area);

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

@ -533,30 +533,31 @@ nsHTMLFragmentContentSink::AddLeaf(const nsIParserNode& aNode)
}
nsCOMPtr<nsINodeInfo> nodeInfo;
result =
mNodeInfoManager->GetNodeInfo(tmpName, nsnull, kNameSpaceID_None,
*getter_AddRefs(nodeInfo));
result = mNodeInfoManager->GetNodeInfo(tmpName, nsnull, kNameSpaceID_None,
*getter_AddRefs(nodeInfo));
result = NS_CreateHTMLElement(getter_AddRefs(content), nodeInfo);
if(NS_SUCCEEDED(result)) {
result = NS_CreateHTMLElement(getter_AddRefs(content), nodeInfo);
if (NS_OK == result) {
result = AddAttributes(aNode, content);
if (NS_OK == result) {
nsIContent *parent = GetCurrentContent();
result = AddAttributes(aNode, content);
if (NS_OK == result) {
nsIContent *parent = GetCurrentContent();
if (nsnull == parent) {
parent = mRoot;
if (nsnull == parent) {
parent = mRoot;
}
parent->AppendChildTo(content, PR_FALSE);
}
parent->AppendChildTo(content, PR_FALSE);
}
}
if (nodeType == eHTMLTag_img || nodeType == eHTMLTag_frame
|| nodeType == eHTMLTag_input) // elements with 'SRC='
AddBaseTagInfo(content);
else if (nodeType == eHTMLTag_base)
ProcessBaseTag(content);
if (nodeType == eHTMLTag_img || nodeType == eHTMLTag_frame
|| nodeType == eHTMLTag_input) // elements with 'SRC='
AddBaseTagInfo(content);
else if (nodeType == eHTMLTag_base)
ProcessBaseTag(content);
}
}
break;
case eToken_text:

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

@ -3364,6 +3364,8 @@ HTMLContentSink::ProcessAREATag(const nsIParserNode& aNode)
return rv;
}
AddBaseTagInfo(area); // basehref or basetarget. Fix. Bug: 30617
// Add AREA object to the current map
mCurrentMap->AppendChildTo(area, PR_FALSE);
NS_RELEASE(area);

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

@ -533,30 +533,31 @@ nsHTMLFragmentContentSink::AddLeaf(const nsIParserNode& aNode)
}
nsCOMPtr<nsINodeInfo> nodeInfo;
result =
mNodeInfoManager->GetNodeInfo(tmpName, nsnull, kNameSpaceID_None,
*getter_AddRefs(nodeInfo));
result = mNodeInfoManager->GetNodeInfo(tmpName, nsnull, kNameSpaceID_None,
*getter_AddRefs(nodeInfo));
result = NS_CreateHTMLElement(getter_AddRefs(content), nodeInfo);
if(NS_SUCCEEDED(result)) {
result = NS_CreateHTMLElement(getter_AddRefs(content), nodeInfo);
if (NS_OK == result) {
result = AddAttributes(aNode, content);
if (NS_OK == result) {
nsIContent *parent = GetCurrentContent();
result = AddAttributes(aNode, content);
if (NS_OK == result) {
nsIContent *parent = GetCurrentContent();
if (nsnull == parent) {
parent = mRoot;
if (nsnull == parent) {
parent = mRoot;
}
parent->AppendChildTo(content, PR_FALSE);
}
parent->AppendChildTo(content, PR_FALSE);
}
}
if (nodeType == eHTMLTag_img || nodeType == eHTMLTag_frame
|| nodeType == eHTMLTag_input) // elements with 'SRC='
AddBaseTagInfo(content);
else if (nodeType == eHTMLTag_base)
ProcessBaseTag(content);
if (nodeType == eHTMLTag_img || nodeType == eHTMLTag_frame
|| nodeType == eHTMLTag_input) // elements with 'SRC='
AddBaseTagInfo(content);
else if (nodeType == eHTMLTag_base)
ProcessBaseTag(content);
}
}
break;
case eToken_text: