Bug 103625 - [Shadow DOM]: Shadow insertion point styles are not applied to the shadow root children
Summary: [Shadow DOM]: Shadow insertion point styles are not applied to the shadow roo...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Web Components Team
URL:
Keywords:
Depends on:
Blocks: 63606 103230
  Show dependency treegraph
 
Reported: 2012-11-29 03:45 PST by Sergey G. Grekhov
Modified: 2016-04-06 23:43 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey G. Grekhov 2012-11-29 03:45:18 PST
According the Shadow DOM specification (https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles) "the styles of the shadow insertion point node are inherited by the child nodes of the shadow root of the shadow tree, distributed to this shadow insertion point". But it doesn't work in Chrome 23.0.1271.91 m. Example

<html>
<head>
<script type="text/javascript">

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

    var host = d.createElement('div');
    d.body.appendChild(host);

    //Old tree
    var s1 = new SR(host);
    
    var div1 = d.createElement('div');
    div1.innerHTML = '<span id="shd1">This is an old shadow tree</span>'; 
    s1.appendChild(div1);
    
    //younger tree
    var s2 = new SR(host);  
    var div2 = d.createElement('div');
    div2.innerHTML =  '<shadow style="color:red"></shadow>'; 
    s2.appendChild(div2);
}
</script>
</head>
<body onload="test()">

</body>
</html>

Red color style is not applied to the tree nodes assigned to the shadow insertion point
Comment 1 Takayoshi Kochi 2016-04-06 23:43:37 PDT
This looks obsolete.