Bug 107654
Summary: | Reference combinators do not match anything | ||
---|---|---|---|
Product: | WebKit | Reporter: | Aleksei Yu. Semenov <a.semenov> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | dglazkov |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 63606, 103230 |
Aleksei Yu. Semenov
The Shadow DOM specification http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html reads:
"4.4 Matching Children, Distributed To Insertion Points
Reference combinators match the children of a shadow host, distributed to the insertion points within a shadow tree. To match, all of these conditions must apply:
* The combinator value must be select
* The first compound selector of the combinator must match an insertion point
* The second compound selector must match an element, distributed to this insertion point
For example, .some-insertion-point /select/ div.special will match all div elements that have class attribute set to special and have been distributed to an insertion point that has a class attribute set to some-insertion-point."
However the following sample code demonstrates that nothing is matched.
<html>
<head>
<style>
content /select/ a#link11 { display:none }
</style>
<script>
function test(){
var host = document.querySelector('#links-wrapper');
var shadowRoot = host.webkitCreateShadowRoot();
var content = document.createElement('content');
content.setAttribute('select', 'a');
shadowRoot.appendChild(content);
}
</script>
</head>
<body onload='test()'>
<div id="links-wrapper">
<a href='#10' id='link10'>Link10: Expected to be visible link</a><br>
<a href='#11' id='link11'>Link11: Should not be visible</a>
<p>the paragraph is not assigned to any insertion point</p>
</div>
</body>
<html>
Observed on Google Chrome version 26.0.1390.0 canary
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Dimitri Glazkov (Google)
Selector combinator has been banished in favor of "::distributed" pseudo-element function. Apologies, I haven't updated the spec yet.
*** This bug has been marked as a duplicate of bug 82169 ***