[Webkit-unassigned] [Bug 103973] New: [Shadow DOM]: custom pseudo-element styles are not applied to the shadow tree elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 3 22:52:32 PST 2012


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

           Summary: [Shadow DOM]: custom pseudo-element styles are not
                    applied to the shadow tree elements
           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


Found in Chrome 23.0.1271.95 m. Custom pseudo-elements styles (https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#custom-pseudo-elements) are not applied to the shadow tree elements. Run the following example:

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

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

    var widget = d.createElement('div');
    d.body.appendChild(widget);
    var s = new SR(widget);
    var thumb = d.createElement('span');
    thumb.innerHTML = 'Some text';
    thumb.pseudo = 'x-thumb';
    s.appendChild(thumb);

    var style = d.createElement('style');
    style.innerHTML = 'span::x-thumb {' +
        'color:red;' +
        '}';
    s.appendChild(style);
}
</script>
</head>
<body onload="test()">
</body>
</html>


As you can see red color style is not applied. If is ShadowRoot style replace span::x-thumb by span then style is applied. So problem is in custom pseudo-element

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