Bug 103681

Summary: non HTMLElement documentElement ignores display: none
Product: WebKit Reporter: Elliott Sprehn <esprehn>
Component: CSSAssignee: 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
Reported 2012-11-29 15:52:45 PST
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
Elliott Sprehn
Comment 1 2012-11-29 16:07:40 PST
This is fixed by Bug 103475.
Note You need to log in before you can comment on or make changes to this bug.