[Webkit-unassigned] [Bug 103608] New: [Shadow DOM]: @host @-rule doesn't work

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 29 00:33:25 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=103608

           Summary: [Shadow DOM]: @host @-rule doesn't work
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: sgrekhov at unipro.ru


@host @-rule described in https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#host-at-rule doesn't work. Example is below:

<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);

    //Older 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 div1 = d.createElement('div');
    div1.innerHTML = '<span id="shd2">This is a young shadow tree</span>' + 
        '<shadow><span id="shd3">This is the shadow tree fallback content</span></shadow>'; 
    s2.appendChild(div1);

    var style = d.createElement('style');
    style.innerHTML = '' + 
        '<style>' +
            '@host {' +
                'display:none;' +
            '}' +
        '</style>'; 
    s2.appendChild(style);    
}
</script>
</head>
<body onload="test()">

</body>
</html>


Both old and young trees are rendered but according the Shadow DOM specification one of them (not sure which one, see https://www.w3.org/Bugs/Public/show_bug.cgi?id=20150) shouldn't be shown

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list