зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
f6f35bfa1e
Коммит
81e062668f
|
@ -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:
|
||||
|
|
Загрузка…
Ссылка в новой задаче