When the range is "detached", (i.e. start/end are never set), Range.intersectNode should return false on DocType.
This is what Firefox does. See https://dom.spec.whatwg.org/#dom-range-intersectsnode
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:
Then it calls intersectsNodes(docType) and we return true, but the test expects false.
Created attachment 261762 [details]
Comment on attachment 261762 [details]
Clearing flags on attachment: 261762
Committed r190136: <http://trac.webkit.org/changeset/190136>
All reviewed patches have been landed. Closing bug.