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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/selectors/shadow-host-div-with-text.html

Issue 2967903002: Select exact nodes in fast/selectors/shadow-host-div-with-*.html (Closed)
Patch Set: update Created 3 years, 5 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/selectors/shadow-host-div-with-span.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <style> 4 <style>
5 body, #host { 5 body, #host {
6 border: 0; 6 border: 0;
7 margin: 0; 7 margin: 0;
8 padding: 0; 8 padding: 0;
9 font: 16px sans-serif; 9 font: 16px sans-serif;
10 } 10 }
(...skipping 10 matching lines...) Expand all
21 </template> 21 </template>
22 <div id=host></div> 22 <div id=host></div>
23 <script> 23 <script>
24 var host = document.querySelector('#host'); 24 var host = document.querySelector('#host');
25 var template = document.querySelector('template'); 25 var template = document.querySelector('template');
26 var root = host.createShadowRoot(); 26 var root = host.createShadowRoot();
27 root.appendChild(template.content); 27 root.appendChild(template.content);
28 var span = root.querySelector('span'); 28 var span = root.querySelector('span');
29 29
30 var selection = window.getSelection(); 30 var selection = window.getSelection();
31 var range = document.createRange(); 31 selection.setBaseAndExtent(span.firstChild, 2, span.firstChild, 54);
32 range.selectNodeContents(span);
33 selection.addRange(range);
34 </script> 32 </script>
35 </body> 33 </body>
36 </html> 34 </html>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/selectors/shadow-host-div-with-span.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698