We currently have a few weird functions on the nsIDOMNSRange interface that are more or less useless or redundant. Patch coming up that kills intersectsNode, compareNode and nSDetach.
Created attachment 243519 [details] [diff] [review]
Patch to fix
I also killed GetNodeBracketPoints and inlined it in its only remaining caller
Comment on attachment 243519 [details] [diff] [review]
Patch to fix
Checked in, thanks for the quick review
The patch in this bug "fixed" nsRange::IsNodeIntersectsRange which was regressed in bug 357445. The two argument pairs to the last nsContentUtils::ComparePoints call are inverted.
If the patch here is ever backed out we need to make sure to fix that.
This caused bug 359121. nSDetach and Detach aren't the same after all.
I know this is way too late now, but I rather liked the intersectsNode method, non-standard or not. The published workaround on MDC is slightly fiddly and doesn't work in older WebKit because they had a bug in compareBoundaryPoints: https://bugs.webkit.org/show_bug.cgi?id=20738
You've kept comparePoint, which is non-standard, so I don't really see the argument for axing intersectsNode, which is a convenient, well-named and useful function, and WebKit and Opera still have it (haven't had a chance to check IE 9 preview yet). Any chance it could be reinstated?
Please file a separate bug on that. I agree it makes sense to bring it back if other browsers support it and it really is useful.
Created new bug 579638.