<?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>21305</bug_id>
          
          <creation_ts>2013-03-15 20:34:31 +0000</creation_ts>
          <short_desc>[Shadow] Add explanatory rationale for the set of content selectors, and possibly update the spec with selectors from CSS4 Selectors</short_desc>
          <delta_ts>2013-07-17 22:02:32 +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>PC</rep_platform>
          <op_sys>Linux</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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>15480</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Blake Kaplan">mrbkap</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>dominicc</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>84484</commentid>
    <comment_count>0</comment_count>
    <who name="Blake Kaplan">mrbkap</who>
    <bug_when>2013-03-15 20:34:31 +0000</bug_when>
    <thetext>Insertion points currently allow the :visited pseudo-class to be used to select child nodes [1]. While useful, implementing this unfortunately re-introduces the CSS :visited history hack [2]. I don&apos;t think there&apos;s a safe way of allowing :visited to be used without reintroducing it.

[1] https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#matching-insertion-points
[2] http://dbaron.org/mozilla/visited-privacy</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84549</commentid>
    <comment_count>1</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2013-03-18 09:07:44 +0000</bug_when>
    <thetext>The :visited issue is discussed in general here:

&lt;http://www.w3.org/TR/selectors-api2/#privacy&gt;

This notes that &quot;user agents may treat all links as unvisited links&quot;. This provision could also apply to :visited in a content selector. As such I don&apos;t think this is a problem.

From one implementer&apos;s perspective (Chrome) this is an extremely low risk; we treat all links as visited.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84568</commentid>
    <comment_count>2</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-03-18 17:37:32 +0000</bug_when>
    <thetext>If every UA is just going to never match :visited in here, what&apos;s the point of allowing it and leading people to try using it?

Is it just to allow them to copy/paste existing &quot;:link,:visited&quot; selectors?

That said, why are we restricting the set of selectors at all?  The spec doesn&apos;t say, and without an explanation of the goal it&apos;s impossible to tell whether this restriction is even the right approach, much less whether the set of things restricted to is correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84598</commentid>
    <comment_count>3</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2013-03-19 04:40:36 +0000</bug_when>
    <thetext>(In reply to comment #2) 
&gt; That said, why are we restricting the set of selectors at all?  The spec
&gt; doesn&apos;t say, and without an explanation of the goal it&apos;s impossible to tell
&gt; whether this restriction is even the right approach, much less whether the
&gt; set of things restricted to is correct.

I think the reason varies on a case-by-case basis depending on the specific selector.

I agree it would be nice if the spec had some non-normative language explaining the rationale for this set. If new selectors are added to CSS in future, that text could informally guide spec updates as to whether those selectors should be allowed or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84599</commentid>
    <comment_count>4</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-03-19 05:10:04 +0000</bug_when>
    <thetext>&gt; I think the reason varies on a case-by-case basis depending on the specific
&gt; selector.

I strongly suggest putting the set of relevant reasons in the spec, in informative prose, or otherwise making it discoverable.  Without that, there is no way to tell whether the spec is correct or not.

It&apos;s not an &quot;if&quot;.  See http://dev.w3.org/csswg/selectors4/, of which this spec seems to be wholly ignorant.  Or maybe not, and it&apos;s excluding them all on purpose.  As an implementor, I just can&apos;t tell because I have no idea what the spec is trying to do.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84600</commentid>
    <comment_count>5</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2013-03-19 07:14:47 +0000</bug_when>
    <thetext>Changing the title to help Dimitri out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84636</commentid>
    <comment_count>6</comment_count>
    <who name="Blake Kaplan">mrbkap</who>
    <bug_when>2013-03-19 17:12:46 +0000</bug_when>
    <thetext>I still don&apos;t think it makes sense to allow :visited.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89223</commentid>
    <comment_count>7</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2013-06-13 01:09:23 +0000</bug_when>
    <thetext>I support removing :visited from the set of selectors.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90888</commentid>
    <comment_count>8</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-07-17 22:02:32 +0000</bug_when>
    <thetext>It&apos;s been removed (along with a few others).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>