<?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>103709</bug_id>
          
          <creation_ts>2012-11-29 21:54:03 -0800</creation_ts>
          <short_desc>[Shadow DOM]: reset-style-inheritance flag doesn&apos;t work for shadow insertion point</short_desc>
          <delta_ts>2012-12-10 20:51:07 -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>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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>
          <dependson>103711</dependson>
          <blocked>63606</blocked>
    
    <blocked>103230</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Sergey G. Grekhov">sgrekhov</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hayato</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>779807</commentid>
    <comment_count>0</comment_count>
    <who name="Sergey G. Grekhov">sgrekhov</who>
    <bug_when>2012-11-29 21:54:03 -0800</bug_when>
    <thetext>According the Shadow DOM spec (https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles) reset-style-inheritance flag should reset all inheritable CSS properties to their initial values at the upper boundary of the tree. This doesn&apos;t work in Chrome 23.0.1271.91 m. Example:

&lt;html&gt;
&lt;head&gt;
&lt;script type=&quot;text/javascript&quot;&gt;

function test() {
    var SR = window.ShadowRoot || window.WebKitShadowRoot;
    var d = document;

    d.body.innerHTML = 
        &apos;&lt;ul id=&quot;shHost&quot;&gt;&apos; +
            &apos;&lt;li id=&quot;li1&quot; class=&quot;shadow&quot;&gt;1&lt;/li&gt;&apos; +
            &apos;&lt;li id=&quot;li2&quot; class=&quot;shadow2&quot;&gt;2&lt;/li&gt;&apos; +
            &apos;&lt;li id=&quot;li3&quot; class=&quot;shadow&quot;&gt;3&lt;/li&gt;&apos; +
            &apos;&lt;li id=&quot;li4&quot;&gt;4&lt;/li&gt;&apos; +
            &apos;&lt;li id=&quot;li5&quot; class=&quot;shadow&quot;&gt;5&lt;/li&gt;&apos; +
            &apos;&lt;li id=&quot;li6&quot; class=&quot;shadow2&quot;&gt;6&lt;/li&gt;&apos; +
        &apos;&lt;/ul&gt;&apos;;

    var host = d.querySelector(&apos;#shHost&apos;);
    
    d.body.setAttribute(&apos;style&apos;, &apos;color:red&apos;);
        
    //Shadow root to play with
    var s = new SR(host);

    var div = d.createElement(&apos;div&apos;);   
    div.innerHTML =&apos;&lt;ul&gt;&lt;content select=&quot;.shadow&quot;&gt;&lt;/content&gt;&lt;/ul&gt;&apos;; 
    s.appendChild(div);
    
    //Young tree
    var s2 = new SR(host);
    
    var div2 = d.createElement(&apos;div&apos;);   
    div2.innerHTML = &apos;&lt;shadow reset-style-inheritance=true&gt;&lt;/shadow&gt;&apos;;
    s2.appendChild(div2);
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload=&quot;test()&quot;&gt;

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

Run the example above and observe the browser window. Red color style inherited from document body is not reset in spite of reset-style-inheritance=true attribute. If to modify example above to set resetStyleInheritance property this won&apos;t work anyway. In other words:

    var div2 = d.createElement(&apos;div&apos;);   
    div2.innerHTML = &apos;&lt;shadow id=&quot;shTree&quot;&gt;&lt;/shadow&gt;&apos;;
    s2.appendChild(div2);
    
    s2.querySelector(&apos;#shTree&apos;).resetStyleInheritance = true;

The modified script doesn&apos;t work anyway</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>779815</commentid>
    <comment_count>1</comment_count>
    <who name="Sergey G. Grekhov">sgrekhov</who>
    <bug_when>2012-11-29 22:12:49 -0800</bug_when>
    <thetext>See also https://bugs.webkit.org/show_bug.cgi?id=103711</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>787991</commentid>
    <comment_count>2</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2012-12-10 20:51:07 -0800</bug_when>
    <thetext>https://bugs.webkit.org/show_bug.cgi?id=103711 fixed this. Closing.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>