Bug 45130
| Summary: | Attribute selectors in CSS | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Andrew fedoniouk <andrew.fedoniouk> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | eae |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
Andrew fedoniouk
Attribute selectors:
http://www.w3.org/TR/css3-selectors/#attribute-representation
do not work for attributes changed from DOM access methods in scripts.
Here is a test case:
<html>
<head>
<style>
div { display:none; }
body[show="n1"] #n1 { display:block; }
body[show="n2"] #n2 { display:block; }
</style>
<script type="text/javascript">
function test()
{
document.body.setAttribute("show","n2");
}
</script>
</head>
<body show="n1">
<a href="javascript:test()">Test</a>
<div id="n1">1</div>
<div id="n2">2</div>
</body>
</html>
After clicking on hyperlink div#n2 shall be visible but it is not.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Emil A Eklund
*** This bug has been marked as a duplicate of bug 50363 ***