| Summary: | Range.intersectsNode() does not behave according to the specification when start / end are equal | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||
| Component: | DOM | Assignee: | Chris Dumez <cdumez> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | cdumez, commit-queue, esprehn+autocc, kangil.han, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar, WebExposed | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| URL: | https://dom.spec.whatwg.org/#dom-range-intersectsnode | ||||||
| Attachments: |
|
||||||
|
Description
Ryosuke Niwa
2015-09-03 19:30:52 PDT
Ryosuke, what do you mean by detached range? It is impossible to detach a range as Range.detach() is a no-op. Also, which test is failing because of this (the bug doesn't say)? I mean that when neither start nor end is set. (In reply to comment #3) > I mean that when neither start nor end is set. start and end are set to be the ownerDocument when the Range is constructed AFAIK. Failing test: imported/w3c/web-platform-tests/dom/ranges/Range-intersectsNode.html "Node 20 doctype, detached range" check. FYI, I am still trying to figure out what we're doing wrong. Range is constructed so we initialize its start / end to be the context document, as per the spec: https://dom.spec.whatwg.org/#dom-range-range Then it calls intersectsNodes(docType) and we return true, but the test expects false. Created attachment 261762 [details]
Patch
Comment on attachment 261762 [details] Patch Clearing flags on attachment: 261762 Committed r190136: <http://trac.webkit.org/changeset/190136> All reviewed patches have been landed. Closing bug. |