mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-08 07:53:54 +00:00
Bug 405181 - "nsIDOMNSRange.isPointInRange probably shouldn't throw WRONG_DOCUMENT_ERR" [p=ajvincent@gmail.com (Alex Vincent) r+sr+a1.9=sicking]
This commit is contained in:
parent
505b47d380
commit
9c2b6d8aa0
@ -343,6 +343,12 @@ nsRange::IsPointInRange(nsIDOMNode* aParent, PRInt32 aOffset, PRBool* aResult)
|
|||||||
{
|
{
|
||||||
PRInt16 compareResult = 0;
|
PRInt16 compareResult = 0;
|
||||||
nsresult rv = ComparePoint(aParent, aOffset, &compareResult);
|
nsresult rv = ComparePoint(aParent, aOffset, &compareResult);
|
||||||
|
// If the node isn't in the range's document, it clearly isn't in the range.
|
||||||
|
if (rv == NS_ERROR_DOM_WRONG_DOCUMENT_ERR) {
|
||||||
|
*aResult = PR_FALSE;
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
*aResult = compareResult == 0;
|
*aResult = compareResult == 0;
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user