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

Side by Side Diff: Source/web/tests/data/move_range_selection_extent.html

Issue 653383002: Add new API for only moving the selection extent point. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated comment Created 6 years, 2 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 | « Source/web/tests/WebFrameTest.cpp ('k') | public/web/WebLocalFrame.h » ('j') | 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 id='root'>
3 <body> 3 <body>
4 This text won't be selected because it isn't editable. 4 <span id='target'>16-char header. This text is initially selected. 16-char foote r.</span>
5 <div id='target' contenteditable="true">16-char header. This text is initially s elected. 16-char footer.</div>
6 This text won't be selected because it isn't editable.
7 <script> 5 <script>
8 function select() { 6 function select() {
9 var text = document.getElementById('target').firstChild; 7 var text = document.getElementById('target').firstChild;
10 var range = document.createRange(); 8 var range = document.createRange();
11 range.setStart(text, 16); 9 range.setStart(text, 16);
12 range.setEnd(text, 48); 10 range.setEnd(text, 48);
13 window.getSelection().addRange(range); 11 window.getSelection().addRange(range);
14 } 12 }
15 window.onload = select; 13 window.onload = select;
16 </script> 14 </script>
17 </body> 15 </body>
18 </html> 16 </html>
19 17
OLDNEW
« no previous file with comments | « Source/web/tests/WebFrameTest.cpp ('k') | public/web/WebLocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698