Bug 105404

Summary: [Shadow DOM]: Wrong type of CSSRule when @Host rule is used
Product: WebKit Reporter: Sergey G. Grekhov <sgrekhov>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: shinyak, tasak, webcomponents-bugzilla
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 63606, 103230    

Sergey G. Grekhov
Reported 2012-12-19 01:36:32 PST
When @Host rule is used not in shadow root then CSSRule object returned by cssRules property, not CSSHostRule Chrome 25.0.1364.0 canary. Test: <html> <head> <script type="text/javascript"> function test() { var d = document; var host = d.createElement('div'); d.body.appendChild(host); var style = d.createElement('style'); style.innerHTML = '' + 'span { color: blue; }' + '@host {' + 'div { color: red; }' + '}'; d.head.appendChild(style); alert('Expected 1001, actual ' + d.styleSheets[0].cssRules[1].type); } </script> </head> <body onload="test()"> </body> </html>
Attachments
Takashi Sakamoto
Comment 2 2012-12-19 03:07:26 PST
Hello, Since CSSHostRule has not been implemented yet, currently CSSUnknownRule is used instead. I'm now trying to fix this issue on bug 102344. Best regards, Takashi Sakamoto *** This bug has been marked as a duplicate of bug 102344 ***
Note You need to log in before you can comment on or make changes to this bug.