Kill useless nsIDOMNSRange functions

RESOLVED FIXED

Status

()

Core
DOM: Core & HTML
RESOLVED FIXED
11 years ago
4 years ago

People

(Reporter: sicking, Assigned: sicking)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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
Assignee: traversal-range → bugmail
Status: NEW → ASSIGNED
Attachment #243519 - Flags: superreview?(jst)
Attachment #243519 - Flags: review?(jst)
Comment on attachment 243519 [details] [diff] [review]
Patch to fix

r+sr=jst
Attachment #243519 - Flags: superreview?(jst)
Attachment #243519 - Flags: superreview+
Attachment #243519 - Flags: review?(jst)
Attachment #243519 - Flags: review+
Checked in, thanks for the quick review
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
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.
Depends on: 359121
This caused bug 359121. nSDetach and Detach aren't the same after all.

Comment 6

7 years ago
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.

Comment 8

7 years ago
Created new bug 579638.
Component: DOM: Traversal-Range → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.