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

Side by Side Diff: Source/WebKit/chromium/tests/data/select_range_div_editable.html

Issue 15017002: WebFrame::selectRange and moveCaret should behave like mouse selection (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move to method of VisibleSelection, fix style nits Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 This text won't be selected because it isn't editable. 4 This text won't be selected because it isn't editable.
5 <span id='target' contenteditable="true">16-char header. This text is initially selected. 16-char footer.</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. 6 This text won't be selected because it isn't editable.
7 <script> 7 <script>
8 function select() { 8 function select() {
9 var text = document.getElementById('target').firstChild; 9 var text = document.getElementById('target').firstChild;
10 var range = document.createRange(); 10 var range = document.createRange();
11 range.setStart(text, 16); 11 range.setStart(text, 16);
12 range.setEnd(text, 48); 12 range.setEnd(text, 48);
13 window.getSelection().addRange(range); 13 window.getSelection().addRange(range);
14 } 14 }
15 window.onload = select; 15 window.onload = select;
16 </script> 16 </script>
17 </body> 17 </body>
18 </html> 18 </html>
19 19
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698