Bug 105404
Summary: | [Shadow DOM]: Wrong type of CSSRule when @Host rule is used | ||
---|---|---|---|
Product: | WebKit | Reporter: | Sergey G. Grekhov <sgrekhov> |
Component: | CSS | Assignee: | 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
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Sergey G. Grekhov
Specification https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#css-host-rule-interface
Takashi Sakamoto
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 ***