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

Side by Side Diff: third_party/WebKit/LayoutTests/paint/invalidation/invalidate-caret-before-text-node-update.html

Issue 2709983005: Selection API: Do not change focus by Selection functions. (Closed)
Patch Set: . Created 3 years, 10 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
1 <!doctype HTML> 1 <!doctype HTML>
2 <script src="resources/text-based-repaint.js"></script> 2 <script src="resources/text-based-repaint.js"></script>
3 <div contenteditable id="root" class="editing"></div> 3 <div contenteditable id="root" class="editing"></div>
4 <style> 4 <style>
5 * { 5 * {
6 font-family: Courier New; 6 font-family: Courier New;
7 } 7 }
8 </style> 8 </style>
9 <script> 9 <script>
10 onload = function() { 10 onload = function() {
11 // The innerText must be set explicitly, and not with an editing command. 11 // The innerText must be set explicitly, and not with an editing command.
12 root.innerText = "1"; 12 root.innerText = "1";
13 root.focus();
13 window.getSelection().collapse(root.firstChild, 1); 14 window.getSelection().collapse(root.firstChild, 1);
14 15
15 runRepaintAndPixelTest(); 16 runRepaintAndPixelTest();
16 }; 17 };
17 18
18 function repaintTest() { 19 function repaintTest() {
19 document.execCommand('delete'); 20 document.execCommand('delete');
20 } 21 }
21 </script> 22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698