Bug 743632 - Fix nsHTMLEditor::GetNextHTMLSibling to return the correct node; r=roc

--HG--
extra : rebase_source : 360c3800e8546aeb9e2ec0946127a85ae1155d56
This commit is contained in:
Ehsan Akhgari 2012-04-09 12:46:28 -04:00
parent bb82c56da5
commit 7d2ff5e146

View File

@ -4304,7 +4304,7 @@ nsHTMLEditor::GetNextHTMLSibling(nsIDOMNode *inParent, PRInt32 inOffset, nsCOMPt
NS_ENSURE_TRUE(outNode && inParent, NS_ERROR_NULL_POINTER);
nsresult res = NS_OK;
*outNode = nsnull;
nsCOMPtr<nsIDOMNode> node = nsEditor::GetChildAt(inParent,inOffset);
nsCOMPtr<nsIDOMNode> node = nsEditor::GetChildAt(inParent, inOffset + 1);
if (!node) {
// return null sibling if no sibling
return NS_OK;
@ -4314,7 +4314,7 @@ nsHTMLEditor::GetNextHTMLSibling(nsIDOMNode *inParent, PRInt32 inOffset, nsCOMPt
return res;
}
// else
return GetPriorHTMLSibling(node, outNode);
return GetNextHTMLSibling(node, outNode);
}