<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>107654</bug_id>
          
          <creation_ts>2013-01-23 03:08:20 -0800</creation_ts>
          <short_desc>Reference combinators do not match anything</short_desc>
          <delta_ts>2013-01-23 10:04:11 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>82169</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>63606</blocked>
    
    <blocked>103230</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Aleksei Yu. Semenov">a.semenov</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dglazkov</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>814055</commentid>
    <comment_count>0</comment_count>
    <who name="Aleksei Yu. Semenov">a.semenov</who>
    <bug_when>2013-01-23 03:08:20 -0800</bug_when>
    <thetext>The Shadow DOM specification http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html reads:

&quot;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.&quot;

However the following sample code demonstrates that nothing is matched.

&lt;html&gt;
&lt;head&gt;
&lt;style&gt;
	content /select/ a#link11 { display:none }
&lt;/style&gt;
&lt;script&gt;
function test(){

    var host = document.querySelector(&apos;#links-wrapper&apos;);
    var shadowRoot = host.webkitCreateShadowRoot();

    var content = document.createElement(&apos;content&apos;);
    content.setAttribute(&apos;select&apos;, &apos;a&apos;);
    shadowRoot.appendChild(content);
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload=&apos;test()&apos;&gt;
	&lt;div id=&quot;links-wrapper&quot;&gt;
		&lt;a href=&apos;#10&apos; id=&apos;link10&apos;&gt;Link10: Expected to be visible link&lt;/a&gt;&lt;br&gt;
		&lt;a href=&apos;#11&apos; id=&apos;link11&apos;&gt;Link11: Should not be visible&lt;/a&gt;
		&lt;p&gt;the paragraph is not assigned to any insertion point&lt;/p&gt;
	&lt;/div&gt;

&lt;/body&gt;
&lt;html&gt;

Observed on Google Chrome version 26.0.1390.0 canary</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>814296</commentid>
    <comment_count>1</comment_count>
    <who name="Dimitri Glazkov (Google)">dglazkov</who>
    <bug_when>2013-01-23 10:04:11 -0800</bug_when>
    <thetext>Selector combinator has been banished in favor of &quot;::distributed&quot; pseudo-element function. Apologies, I haven&apos;t updated the spec yet.

*** This bug has been marked as a duplicate of bug 82169 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>