Bug 107654 - Reference combinators do not match anything
Summary: Reference combinators do not match anything
Status: RESOLVED DUPLICATE of bug 82169
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 63606 103230
  Show dependency treegraph
 
Reported: 2013-01-23 03:08 PST by Aleksei Yu. Semenov
Modified: 2013-01-23 10:04 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksei Yu. Semenov 2013-01-23 03:08:20 PST
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
Comment 1 Dimitri Glazkov (Google) 2013-01-23 10:04:11 PST
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 ***