Last Comment Bug 358073 - Kill useless nsIDOMNSRange functions
: Kill useless nsIDOMNSRange functions
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Jonas Sicking (:sicking) PTO Until July 5th
: Hixie (not reading bugmail)
Depends on: 359121
  Show dependency treegraph
Reported: 2006-10-25 13:56 PDT by Jonas Sicking (:sicking) PTO Until July 5th
Modified: 2013-04-04 13:53 PDT (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch to fix (16.58 KB, patch)
2006-10-25 14:26 PDT, Jonas Sicking (:sicking) PTO Until July 5th
jst: review+
jst: superreview+
Details | Diff | Splinter Review

Description Jonas Sicking (:sicking) PTO Until July 5th 2006-10-25 13:56:21 PDT
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.
Comment 1 Jonas Sicking (:sicking) PTO Until July 5th 2006-10-25 14:26:48 PDT
Created attachment 243519 [details] [diff] [review]
Patch to fix

I also killed GetNodeBracketPoints and inlined it in its only remaining caller
Comment 2 Johnny Stenback (:jst, 2006-10-25 14:51:28 PDT
Comment on attachment 243519 [details] [diff] [review]
Patch to fix

Comment 3 Jonas Sicking (:sicking) PTO Until July 5th 2006-10-25 15:52:47 PDT
Checked in, thanks for the quick review
Comment 4 Jonas Sicking (:sicking) PTO Until July 5th 2006-10-25 17:30:13 PDT
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.
Comment 5 Jonas Sicking (:sicking) PTO Until July 5th 2006-11-01 18:11:30 PST
This caused bug 359121. nSDetach and Detach aren't the same after all.
Comment 6 Tim Down 2010-07-16 08:38:20 PDT
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:

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?
Comment 7 Jonas Sicking (:sicking) PTO Until July 5th 2010-07-16 10:07:29 PDT
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.
Comment 8 Tim Down 2010-07-17 08:15:14 PDT
Created new bug 579638.

Note You need to log in before you can comment on or make changes to this bug.