fixing bug that broke selection in docs with generated content

git-svn-id: svn://10.0.0.236/trunk@35951 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jfrancis%netscape.com
1999-06-20 00:12:59 +00:00
parent 4e384638f3
commit 2a4f8f3946
4 changed files with 8 additions and 14 deletions

View File

@@ -240,11 +240,8 @@ PRBool GetNodeBracketPoints(nsIContent* aNode,
}
else
{
nsCOMPtr<nsIContent> cN(do_QueryInterface(*outParent));
if (!cN || NS_FAILED(cN->IndexOf(aNode, indx)))
return PR_FALSE;
*outStartOffset = indx;
*outEndOffset = indx+1;
*outStartOffset = nsRange::IndexOf(theDOMNode);
*outEndOffset = *outStartOffset+1;
}
return PR_TRUE;
}
@@ -588,7 +585,7 @@ nsresult nsRange::ComparePointToRange(nsCOMPtr<nsIDOMNode> aParent, PRInt32 aOff
return NS_OK;
}
PRInt32 nsRange::IndexOf(nsCOMPtr<nsIDOMNode> aChildNode)
PRInt32 nsRange::IndexOf(nsIDOMNode* aChildNode)
{
nsCOMPtr<nsIDOMNode> parentNode;
nsCOMPtr<nsIContent> contentChild;