| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <title></title> | |
| 4 <style type="text/css"> | |
| 5 div#overflow { margin: 5px; padding: 10px; border: medium solid; width:
100px; height: 100px; overflow: auto; } | |
| 6 ::selection { background-color: red; } | |
| 7 </style> | |
| 8 <script type="text/javascript" src="resources/text-based-repaint.js"></scrip
t> | |
| 9 <script type="text/javascript"> | |
| 10 function repaintTest() | |
| 11 { | |
| 12 getSelection().empty(); | |
| 13 } | |
| 14 </script> | |
| 15 </head> | |
| 16 <body onload="runRepaintTest()"> | |
| 17 <p> | |
| 18 Test for <i><a href="https://bugs.webkit.org/show_bug.cgi?id=34946">http
s://bugs.webkit.org/show_bug.cgi?id=34946</a> | |
| 19 REGRESSION: Selection painting issue in bug review textbox</i>. | |
| 20 </p> | |
| 21 <div id="overflow"> | |
| 22 <div style="height: 100px;"></div> | |
| 23 <div style="display: inline-block; width: 94px;"><span id="target">Lorem
<br>ipsum</span></div> | |
| 24 </div> | |
| 25 <script type="text/javascript"> | |
| 26 var overflow = document.getElementById("overflow"); | |
| 27 overflow.scrollTop = overflow.scrollHeight; | |
| 28 var selection = getSelection(); | |
| 29 var target = document.getElementById("target"); | |
| 30 selection.setBaseAndExtent(target, 0, target, 3); | |
| 31 </script> | |
| 32 </body> | |
| 33 </html> | |
| OLD | NEW |