- From: <bugzilla@jessica.w3.org>
- Date: Mon, 15 Apr 2013 06:38:40 +0000
- To: public-webapps-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21693 Bug ID: 21693 Summary: [Shadow]: clarify compareDocumentPosition for elements in different shadow trees Classification: Unclassified Product: WebAppsWG Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P2 Component: Component Model Assignee: dglazkov@chromium.org Reporter: tasak@google.com QA Contact: public-webapps-bugzilla@w3.org Blocks: 14978 I would like to confirm two things: (1) whether we use DOCUMENT_POSITION_DISCONNECTED when comparing elements in different shadow trees whose document root is the same or not If document roots of different shadow trees are different, we should use DOCUMENT_POSITION_DISCONNECTED. (2) whether we use the followings instead of DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC when comparing elements in different shadow trees: DOCUMENT_POSITION_PRECEDING 2 DOCUMENT_POSITION_FOLLOWING 4 DOCUMENT_POSITION_CONTAINS 8 DOCUMENT_POSITION_CONTAINED_BY 16 (2) will make it easier to solve styles in different shadow trees, i.e. multiple and nested shadow trees. For example, ---- var a = document.createElement('div'); var b = document.createElement('div'); var c = document.createElement('div'); // #document // <div id=a> // <div id=b> // #shadow-root // <div id=c> document.body.appendChild(a); document.body.appendChild(b); b.createShadowRoot().appendChild(c); ---- Currently a.compareDocumentPosition(c) returns DOCUMENT_POSITION_DISCONNECTED | DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC So, which a.compareDocumentPosition(c) should return? (a) DOCUMENT_POSITION_FOLLOWINGS or (b) DOCUMENT_POSITION_FOLLOWINGS | DOCUMENT_POSITION_DISCONNECTED or (c) DOCUMENT_POSITION_DISCONNECTED | DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Monday, 15 April 2013 06:39:04 UTC