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

Side by Side Diff: LayoutTests/fast/selectors/shadow-host-div-with-span.html

Issue 220343006: Fix for ::selection pseudo element to work on input elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding another Layout Test Created 6 years, 8 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 <style>
3 span::selection { background-color: rgba(63, 128, 33, 0.95); color: yellow; }
4 </style>
5 <body onload="SelectText()">
6 <div id="container">
7 <span>DOM </span>
8 <div id="shadowDiv" style="display:inline"></div>
9 <span> DOM</span>
10 </div>
11 <div>
12 Above Textual Selection should have Green background and yellow color on "DOM" <br>
13 and Red background, Green color on "Shadow DOM".
14 </div>
15 </body>
16 <script>
17 var host = document.getElementById('shadowDiv');
18 var root = host.createShadowRoot();
19 root.innerHTML = '<style> span::selection { background-color: rgba(255, 0, 0 , 0.95); color: green; } </style>' +
20 '<span>Shadow DOM </span>';
21
22 function SelectText() {
23 var ele = document.getElementById('container');
24 var selection = window.getSelection();
25 selection.selectAllChildren(ele);
26 }
27 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698