[Webkit-unassigned] [Bug 189164] New: Document.p.contains returns true for nodes in shadow tree
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Aug 30 11:18:04 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=189164
Bug ID: 189164
Summary: Document.p.contains returns true for nodes in shadow
tree
Product: WebKit
Version: Safari Technology Preview
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: HTML DOM
Assignee: webkit-unassigned at lists.webkit.org
Reporter: jridgewell at google.com
CC: cdumez at apple.com
Created attachment 348515
--> https://bugs.webkit.org/attachment.cgi?id=348515&action=review
Document contains test case
`Document.p.contains` currently returns true for nodes inside a shadow tree. This incorrect according to the [spec](https://dom.spec.whatwg.org/#dom-node-contains), which uses "inclusive descendant" not "shadow-including inclusive descendant".
Note that `Element.p.contains` always does the right thing for nodes in a shadow tree.
Steps to reproduce:
- Go to https://output.jsbin.com/gasefow/quiet
- Observe "Doc contains node in shadow tree" is written to the page
This report invalidates the bug at https://bugs.webkit.org/show_bug.cgi?id=119371 (which asks for for `Node.p.contains` to return true).
Further reading at https://www.w3.org/Bugs/Public/show_bug.cgi?id=22141, which argued for the broken `Document.p.contains` behavior. Instead of breaking contains, `Node.p.isConnected` was added in https://github.com/w3c/webcomponents/issues/81.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180830/e341dc1e/attachment.html>
More information about the webkit-unassigned
mailing list