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; }
8 <script type="text/javascript" src="resources/repaint.js"></script>
9 <script type="text/javascript">
10 function repaintTest()
12 getSelection().empty();
16 <body onload="runRepaintTest()">
18 Test for <i><a href="https://bugs.webkit.org/show_bug.cgi?id=34946">https://bugs.webkit.org/show_bug.cgi?id=34946</a>
19 REGRESSION: Selection painting issue in bug review textbox</i>.
22 <div style="height: 100px;"></div>
23 <div style="display: inline-block; width: 94px;"><span id="target">Lorem<br>ipsum</span></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);