<?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>19681</bug_id>
          
          <creation_ts>2012-10-23 22:52:14 +0000</creation_ts>
          <short_desc>[Shadow]: Refactor styles to get rid of rule applicability</short_desc>
          <delta_ts>2012-10-31 21:41:26 +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>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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>18428</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Dimitri Glazkov">dglazkov</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>hayato</cc>
    
    <cc>tasak</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>76996</commentid>
    <comment_count>0</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-10-23 22:52:14 +0000</bug_when>
    <thetext>Rule applicability algorithm is complex and unintuitive.

It also has mistakes: https://www.w3.org/Bugs/Public/show_bug.cgi?id=16317#c9

Instead, we should just enumerate constraints.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77009</commentid>
    <comment_count>1</comment_count>
    <who name="Takashi Sakamoto">tasak</who>
    <bug_when>2012-10-24 02:55:47 +0000</bug_when>
    <thetext>&gt;There is not /select/ attribute on &quot;shadow&quot;. Can you explain why we would need something like this? (possibly on a new bug :P)

So only shadow reference combinator doesn&apos;t work for &lt;shadow&gt;? I&apos;m thinking of something like:

&lt;x-A&gt;
  &lt;template&gt;
    &lt;style&gt;
    content /select/ div.special { color: red; }
    &lt;/style&gt;
    &lt;content&gt;
  &lt;/template&gt;
&lt;/x-a&gt;

&lt;x-B extend=&quot;x-A&quot;&gt;
  &lt;template&gt;
    &lt;style&gt;
    shadow /select/ div.special { color: blue; }
    &lt;/style&gt;
    &lt;shadow&gt;
  &lt;/template&gt;
&lt;/x-B&gt;

So, x-B cannot apply any styles to distributed nodes?

If we depend on select attribute, we can add our own fake select attribute to &lt;shadow&gt;. (It doesn&apos;t work, but &lt;shadow&gt; can have select.&gt;

I&apos;mean:

&lt;shadow id=&quot;x&quot;&gt;...

getElementById(&quot;x&quot;).setAttribute(&quot;select&quot;, &quot;:first-child&quot;);

So, &quot;select&quot; should be used when solving /select/?

Best regards,
Takashi Sakamoto</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77011</commentid>
    <comment_count>2</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-10-24 03:06:19 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; &gt;There is not /select/ attribute on &quot;shadow&quot;. Can you explain why we would need something like this? (possibly on a new bug :P)

When I asked for a new bug, I didn&apos;t realize you were going to to reuse my other bug for this. I am starting to worry that I am mis-communicating something. I want to keep discussions on bugs focused and easily understood. That&apos;s why we have multiple bugs. One issue -- one bug. This bug is about refactoring the styles section to get rid of rule applicability algorithm. I can&apos;t figure out how the &lt;shadow&gt; discussion in your comment relates to it. I guess they are all related to styles. But then again, all bugs I&apos;ve filed are related to Shadow DOM -- it doesn&apos;t mean we have just one bug for the whole spec :)
&gt; 
&gt; So only shadow reference combinator doesn&apos;t work for &lt;shadow&gt;? I&apos;m thinking
&gt; of something like:
&gt; 
&gt; &lt;x-A&gt;
&gt;   &lt;template&gt;
&gt;     &lt;style&gt;
&gt;     content /select/ div.special { color: red; }
&gt;     &lt;/style&gt;
&gt;     &lt;content&gt;
&gt;   &lt;/template&gt;
&gt; &lt;/x-a&gt;
&gt; 
&gt; &lt;x-B extend=&quot;x-A&quot;&gt;
&gt;   &lt;template&gt;
&gt;     &lt;style&gt;
&gt;     shadow /select/ div.special { color: blue; }
&gt;     &lt;/style&gt;
&gt;     &lt;shadow&gt;
&gt;   &lt;/template&gt;
&gt; &lt;/x-B&gt;
&gt; 
&gt; So, x-B cannot apply any styles to distributed nodes?

&gt; 
&gt; If we depend on select attribute, we can add our own fake select attribute
&gt; to &lt;shadow&gt;. (It doesn&apos;t work, but &lt;shadow&gt; can have select.&gt;
&gt; 
&gt; I&apos;mean:
&gt; 
&gt; &lt;shadow id=&quot;x&quot;&gt;...
&gt; 
&gt; getElementById(&quot;x&quot;).setAttribute(&quot;select&quot;, &quot;:first-child&quot;);
&gt; 
&gt; So, &quot;select&quot; should be used when solving /select/?

Not necessarily, I guess. However, I would avoid adding features to the spec until we have a good use case for it. I don&apos;t think there is one right now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77013</commentid>
    <comment_count>3</comment_count>
    <who name="Takashi Sakamoto">tasak</who>
    <bug_when>2012-10-24 03:47:31 +0000</bug_when>
    <thetext>I&apos;m sorry. I should file a new bug...

Now I can find the reason why I feel a little odd about a select reference combinator.

I filed a new bug, https://www.w3.org/Bugs/Public/show_bug.cgi?id=19684


(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; &gt; &gt;There is not /select/ attribute on &quot;shadow&quot;. Can you explain why we would need something like this? (possibly on a new bug :P)
&gt; 
&gt; When I asked for a new bug, I didn&apos;t realize you were going to to reuse my
&gt; other bug for this. I am starting to worry that I am mis-communicating
&gt; something. I want to keep discussions on bugs focused and easily understood.
&gt; That&apos;s why we have multiple bugs. One issue -- one bug. This bug is about
&gt; refactoring the styles section to get rid of rule applicability algorithm. I
&gt; can&apos;t figure out how the &lt;shadow&gt; discussion in your comment relates to it.
&gt; I guess they are all related to styles. But then again, all bugs I&apos;ve filed
&gt; are related to Shadow DOM -- it doesn&apos;t mean we have just one bug for the
&gt; whole spec :)
&gt; &gt; 
&gt; &gt; So only shadow reference combinator doesn&apos;t work for &lt;shadow&gt;? I&apos;m thinking
&gt; &gt; of something like:
&gt; &gt; 
&gt; &gt; &lt;x-A&gt;
&gt; &gt;   &lt;template&gt;
&gt; &gt;     &lt;style&gt;
&gt; &gt;     content /select/ div.special { color: red; }
&gt; &gt;     &lt;/style&gt;
&gt; &gt;     &lt;content&gt;
&gt; &gt;   &lt;/template&gt;
&gt; &gt; &lt;/x-a&gt;
&gt; &gt; 
&gt; &gt; &lt;x-B extend=&quot;x-A&quot;&gt;
&gt; &gt;   &lt;template&gt;
&gt; &gt;     &lt;style&gt;
&gt; &gt;     shadow /select/ div.special { color: blue; }
&gt; &gt;     &lt;/style&gt;
&gt; &gt;     &lt;shadow&gt;
&gt; &gt;   &lt;/template&gt;
&gt; &gt; &lt;/x-B&gt;
&gt; &gt; 
&gt; &gt; So, x-B cannot apply any styles to distributed nodes?
&gt; 
&gt; &gt; 
&gt; &gt; If we depend on select attribute, we can add our own fake select attribute
&gt; &gt; to &lt;shadow&gt;. (It doesn&apos;t work, but &lt;shadow&gt; can have select.&gt;
&gt; &gt; 
&gt; &gt; I&apos;mean:
&gt; &gt; 
&gt; &gt; &lt;shadow id=&quot;x&quot;&gt;...
&gt; &gt; 
&gt; &gt; getElementById(&quot;x&quot;).setAttribute(&quot;select&quot;, &quot;:first-child&quot;);
&gt; &gt; 
&gt; &gt; So, &quot;select&quot; should be used when solving /select/?
&gt; 
&gt; Not necessarily, I guess. However, I would avoid adding features to the spec
&gt; until we have a good use case for it. I don&apos;t think there is one right now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77583</commentid>
    <comment_count>4</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-10-31 21:41:26 +0000</bug_when>
    <thetext>http://dvcs.w3.org/hg/webcomponents/rev/3647bf47a736</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>