<?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>17686</bug_id>
          
          <creation_ts>2008-03-05 14:02:41 -0800</creation_ts>
          <short_desc>CSS3 Selector Test: negation pseudo-class should only accept simple selectors</short_desc>
          <delta_ts>2022-08-07 13:36:44 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc>http://disruptive-innovations.com/zoo/css3tests/selectorTest.html#target</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>gavin.sharp</cc>
    
    <cc>ian</cc>
    
    <cc>jcraig</cc>
    
    <cc>phiw2</cc>
    
    <cc>rniwa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>syoichi</cc>
    
    <cc>webkit</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72840</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-03-05 14:02:41 -0800</bug_when>
    <thetext>CSS3 Selector Test: negation pseudo-class should only accept simple selectors

    .blox16 { background-color: red; }
    .blox16:not(.blox15) { background-color: lime; }
    .blox16:not(.blox15[foo=&quot;blox14&quot;]) { background-color: red; }

&lt;div class=&quot;blox16 unitTest&quot; foo=&quot;blox15&quot; title=&quot;negation pseudo-class accepts only simple selectors for argument&quot;&gt;&lt;/div&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72852</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-03-05 15:45:02 -0800</bug_when>
    <thetext>I wonder if this test is valid. simple selectors are &quot;either a type selector, universal selector, attribute selector, class selector, ID selector, content selector, or pseudo-class. One pseudo-element may be appended to the last sequence of simple selectors.&quot; 

In this case we have attribute selector and class selector. It seems that the combination of simple selectors are not simple selector any more but you should notice that an attribute selector is always combination of attribute selector and other simple selector ;) For me the test case is invalid.

Links to CSS Selectors spec:
http://www.w3.org/TR/css3-selectors/#negation
http://www.w3.org/TR/css3-selectors/#simple-selectors-dfn
http://www.w3.org/TR/css3-selectors/#attribute-selectors
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72853</commentid>
    <comment_count>2</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2008-03-05 15:50:24 -0800</bug_when>
    <thetext>Yes, I posted on the author&apos;s blog even.  I don&apos;t think we should fix this.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75501</commentid>
    <comment_count>3</comment_count>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-03-27 12:43:58 -0700</bug_when>
    <thetext>Some more words on this subject. Regarding attribute selectors, some people can claim: &quot;Wait a second, &quot;[class=&quot;test&quot;]&quot; is really simple selector and notation :not([class=&quot;test&quot;] works as expected in Firefox and Opera and of cause in Webkit&quot;? 

So is a [class=&quot;test&quot;] really simple selector? No! Take a look on this fragment in specification:

&quot;The universal selector, written &quot;asterisk&quot; (*), represents the qualified name of any element type.[...]

If the universal selector is not the only component of a sequence of simple selectors, the * may be omitted.

Examples:

*[hreflang|=en] and [hreflang|=en] are equivalent&quot;

[http://www.w3.org/TR/css3-selectors/#universal-selector]

So this case &quot;[class=&quot;test&quot;]&quot; is a simplified version of &quot;*[class=&quot;test&quot;]&quot; and it is a sequence of simple selectors. Both cases a logically equal. So in my opinion, it&apos;s absolutely incorrect that this case  :not(*[class=&quot;test&quot;]) - which is logically equivalent to :not([class=&quot;test&quot;]) - does not work in Firefox and Opera, .

Take a look at an attached test case.

Ian, you are an editor of CSS3 Selectors specification. what you think about this issue?
 </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75502</commentid>
    <comment_count>4</comment_count>
      <attachid>20134</attachid>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-03-27 12:44:45 -0700</bug_when>
    <thetext>Created attachment 20134
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75737</commentid>
    <comment_count>5</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2008-03-28 23:14:12 -0700</bug_when>
    <thetext>This may change.  Not fixing yet.  Brought it up with the CSS WG.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>945754</commentid>
    <comment_count>6</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2013-10-31 16:58:20 -0700</bug_when>
    <thetext>This has changed for CSS4. Suggest closing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1889549</commentid>
    <comment_count>7</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-07 13:36:32 -0700</bug_when>
    <thetext>I am unable to reproduce this bug in Safari 15.6 on macOS 12.5 and the attached test case show both line with lime / green background and it matches with other browsers (Chrome Canary 106 and Firefox Nightly 105). I am marking this as &quot;RESOLVED CONFIGURATION CHANGED&quot;. Thanks!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>20134</attachid>
            <date>2008-03-27 12:44:45 -0700</date>
            <delta_ts>2008-03-27 12:44:45 -0700</delta_ts>
            <desc>test case</desc>
            <filename>test case</filename>
            <type>text/html</type>
            <size>256</size>
            <attacher name="Robert Blaut">webkit</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CmgxLGgyIHtiYWNrZ3JvdW5k
OnJlZDt9CmgxOm5vdChbY2xhc3M9InRlc3QiXSkge2JhY2tncm91bmQ6IGxpbWU7fQpoMjpub3Qo
KltjbGFzcz0idGVzdCJdKSB7YmFja2dyb3VuZDogbGltZTt9Cjwvc3R5bGU+CjxoMSBjbGFzcz0i
bm90dGVzdCI+dGhpcyBzaG91bGQgYmUgZ3JlZW48L2gxPgo8aDIgY2xhc3M9Im5vdHRlc3QiPnRo
aXMgc2hvdWxkIGJlIGFsc28gZ3JlZW48L2gyPg==
</data>

          </attachment>
      

    </bug>

</bugzilla>