Bug 103681
| Summary: | non HTMLElement documentElement ignores display: none | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Elliott Sprehn <esprehn> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | Keywords: | HasReduction |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
| Bug Depends on: | 103475 | ||
| Bug Blocks: | |||
Elliott Sprehn
If you replace the documentElement with a non-html element and then set it to display: none we ignore it.
ex.
<iframe id="doc"></iframe>
<script>
var doc = document.getElementById('doc').contentDocument;
var root = doc.implementation.createDocument().createElement('not-a-real-element');
doc.replaceChild(root, doc.documentElement);
root.appendChild(document.createElement('style')).textContent = 'not-a-real-element { display: none }';
root.appendChild(document.createElement('p')).textContent = 'Should not be visible';
</script>
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Elliott Sprehn
This is fixed by Bug 103475.