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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>24867</bug_id>
          
          <creation_ts>2014-02-28 18:45:02 +0000</creation_ts>
          <short_desc>[Shadow]: consider supporting :not() in content select</short_desc>
          <delta_ts>2014-05-08 06:00:33 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>14978</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Scott Miles">sjmiles</reporter>
          <assigned_to name="Hayato Ito">hayato</assigned_to>
          <cc>hayato</cc>
    
    <cc>jonas</cc>
    
    <cc>jyasskin</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>101645</commentid>
    <comment_count>0</comment_count>
    <who name="Scott Miles">sjmiles</who>
    <bug_when>2014-02-28 18:45:02 +0000</bug_when>
    <thetext>&quot;3.6 Satisfying Matching Criteria&quot;

Specifically we have a user with this scenario:

my-figure shadow-root:

  &lt;content select=&quot;span:not(.caption)&quot;&gt;&lt;/content&gt;
  Figure 7: &lt;content select=&quot;span.caption&quot;&gt;&lt;/content&gt;

where his input looks something like this:
  
  &lt;my-figure&gt;
    &lt;span&gt;Hello World!&lt;/span&gt;
    &lt;span class=&quot;caption&quot;&gt;The caption&lt;/span&gt;
  &lt;my-figure&gt;

Without :not() he is forced to: (1) rearrange his input content, (2) rearrange nodes imperatively, or (3) use CSS to order nodes different at render-time, all of which are invasive solutions.

I recognize the slippery slope of adding additional abilities to insertion selectors, but my (admittedly naive) reading of the SELECTORS spec seemed to imply that supporting :not() may not violate the performance constraints.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101646</commentid>
    <comment_count>1</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2014-02-28 18:48:36 +0000</bug_when>
    <thetext>These were removed as part of work on bug 21924. We really need to add back at least some of these. For example :nth-type and friends is necessary to rationalize implementing &lt;details&gt; and &lt;fieldset&gt; using Shadow DOM. The spec still uses them, even: http://w3c.github.io/webcomponents/spec/shadow/#html-elements-and-their-shadow-trees</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101650</commentid>
    <comment_count>2</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2014-02-28 19:38:59 +0000</bug_when>
    <thetext>We should definitely add back :not(). My criteria for what goes and what stays is that we should only have selectors which depend on internal state of an element. That makes figuring out dependencies much more sane. :not() fits that criteria.

We can certainly discuss having things like :nth-of-type etc. But lets do that as a separate bug, based on use cases and while documenting dependencies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101683</commentid>
    <comment_count>3</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2014-02-28 23:52:49 +0000</bug_when>
    <thetext>(In reply to Jonas Sicking from comment #2)
&gt; We can certainly discuss having things like :nth-of-type etc. But lets do
&gt; that as a separate bug, based on use cases and while documenting
&gt; dependencies.

Sounds good. Filed bug 24872 for that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105291</commentid>
    <comment_count>4</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2014-05-07 10:29:24 +0000</bug_when>
    <thetext>Let me add &apos;:not&apos; back to the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105390</commentid>
    <comment_count>5</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2014-05-08 06:00:33 +0000</bug_when>
    <thetext>&apos;:not()&apos; came back to the spec at
https://github.com/w3c/webcomponents/commit/563119439b1fcdddc1041abef1bc764e5e048d98</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>