Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-shared-style.html

Issue 1523843004: Add support for new CSS ::slotted() pseudo element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tentative fix for crash / querySelector test Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="resources/shadow-dom.js"></script>
5 </head>
6 <body>
rune 2016/01/09 01:15:36 unnecessary html/head/body.
kochi 2016/01/13 07:49:31 Done.
7 <div id="sandbox"></div>
8 <script>
9 var shadowStyle = document.createElement('style');
10 shadowStyle.innerHTML = 'slot::slotted([data-color=red]) { color: red; }';
11
12 var sandbox = document.getElementById('sandbox');
13 sandbox.appendChild(
14 createDOM('div', {},
15 attachShadow(
16 {'mode': 'open'},
17 shadowStyle,
18 createDOM('slot')),
19 createDOM('div', {},
20 document.createTextNode('normal')),
21 // If the style is falsely shared with the <div> above, this won't turn red.
22 createDOM('div', {'data-color': 'red'},
23 document.createTextNode('red'))));
24 </script>
25 </body>
26 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698