Bug 58684

Summary: REGRESSION: CSS leaks in shadow DOM
Product: WebKit Reporter: Marc Hoyois <marc.hoyois>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap, dglazkov, eric.carlson
Priority: P1    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.6   
Attachments:
Description Flags
Simple HTML file reproducing the bug none

Marc Hoyois
Reported 2011-04-15 13:02:47 PDT
Overview: CSS selectors apply to shadow DOM elements that should only be targetable using pseudo-elements. For example, if a pseudo-element is a <div> in the shadow DOM, then any rule in div { … } will apply to it. Steps to reproduce: Open the attached HTML page. It contains a simple <video> element and two CSS selectors, div and input. Expected result: The video element should look as it does in Safari 5.0.5. Actual result: Buttons in the video controls are replaced by red backgrounds, and the font-size of text in the controls is 30px. Build: Tested with WebKit 6533.21.1, r83831 on OS X 10.6.7. Works fine in Safari 5.0.5. I have heard that the bug also happens in Safari 5.1. Notes: The shadow DOM of the video controls in this example is <div><div><input><input><input><div>Loading...</div><div><div>00:00</div><input precision="float" max="60.08"><div>-01:00</div></div><input><input><input><input><input><div><input precision="float" max="1" value="1"></div></div></div> (This can be seen in Safari 5.0.5 through the relatedTarget property of a mouseout event; a bug that appears to be fixed in the nightlies). However, the CSS should not apply since these elements are not in the DOM.
Attachments
Simple HTML file reproducing the bug (342 bytes, text/html)
2011-04-15 13:03 PDT, Marc Hoyois
no flags
Marc Hoyois
Comment 1 2011-04-15 13:03:17 PDT
Created attachment 89839 [details] Simple HTML file reproducing the bug
Dimitri Glazkov (Google)
Comment 2 2011-04-17 07:13:34 PDT
*** This bug has been marked as a duplicate of bug 52917 ***
Note You need to log in before you can comment on or make changes to this bug.