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

Side by Side Diff: third_party/WebKit/LayoutTests/paint/invalidation/4776765.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 <script src="resources/text-based-repaint.js" type="text/javascript"></script> 1 <script src="resources/text-based-repaint.js" type="text/javascript"></script>
2 <script type="text/javascript"> 2 <script type="text/javascript">
3 function repaintTest() { 3 function repaintTest() {
4 document.execCommand("InsertParagraph"); 4 document.execCommand("InsertParagraph");
5 } 5 }
6 </script> 6 </script>
7 <body onload="runRepaintAndPixelTest();"> 7 <body onload="runRepaintAndPixelTest();">
8 <p>This tests for a repaint bug. The old caret position should be invalidated w hen a paragraph separator is inserted.</p> 8 <p>This tests for a repaint bug. The old caret position should be invalidated w hen a paragraph separator is inserted.</p>
9 <div contenteditable="true"> 9 <div contenteditable="true">
10 <div><br></div> 10 <div><br></div>
11 <div id="div"><br></div> 11 <div id="div"><br></div>
12 </div> 12 </div>
13 <script> 13 <script>
14 var div = document.getElementById("div"); 14 var div = document.getElementById("div");
15 var sel = window.getSelection(); 15 var sel = window.getSelection();
16 16 div.parentNode.focus();
17 sel.collapse(div, 0); 17 sel.collapse(div, 0);
18 </script> 18 </script>
19 </body> 19 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698