Bug 148687 - Range.insersectsNode(node) is supposed to return true if node.parent is null
Summary: Range.insersectsNode(node) is supposed to return true if node.parent is null
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://dom.spec.whatwg.org/#dom-rang...
Keywords: InRadar, WebExposed
Depends on:
Blocks:
 
Reported: 2015-09-01 12:56 PDT by Chris Dumez
Modified: 2015-09-02 13:23 PDT (History)
5 users (show)

See Also:


Attachments
Patch (17.71 KB, patch)
2015-09-01 13:03 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2015-09-01 12:56:22 PDT
Range.insersectsNode(node) is supposed to return true if node.parent is null:
https://dom.spec.whatwg.org/#dom-range-intersectsnode (step 3)

Currently, WebKit throws a NotFoundError, apparently to match Firefox's behavior. However, these days, Firefox complies with the spec and returns true here.
Comment 1 Chris Dumez 2015-09-01 13:03:48 PDT
Created attachment 260378 [details]
Patch
Comment 2 Chris Dumez 2015-09-01 13:46:53 PDT
Comment on attachment 260378 [details]
Patch

Clearing flags on attachment: 260378

Committed r189225: <http://trac.webkit.org/changeset/189225>
Comment 3 Chris Dumez 2015-09-01 13:46:58 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Chris Dumez 2015-09-02 13:23:51 PDT
rdar://problem/22544381