| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script> | 3 <script> |
| 4 function test() | 4 function test() |
| 5 { | 5 { |
| 6 if (window.testRunner) { | 6 if (window.testRunner) { |
| 7 testRunner.waitUntilDone(); | 7 testRunner.waitUntilDone(); |
| 8 setTimeout(autoscrollTestPart1, 0); | 8 setTimeout(autoscrollTestPart1, 0); |
| 9 } | 9 } |
| 10 } | 10 } |
| 11 function autoscrollTestPart1() | 11 function autoscrollTestPart1() |
| 12 { | 12 { |
| 13 var tf = document.getElementById('tf'); | 13 var tf = document.getElementById('tf'); |
| 14 if (window.eventSender) { | 14 if (window.eventSender) { |
| 15 tf.scrollIntoView(); | 15 tf.scrollIntoView(); |
| 16 var h = tf.offsetTop - document.body.scrollTop + 10; | 16 var h = tf.offsetTop - document.scrollingElement.scrollTop +
10; |
| 17 eventSender.dragMode = false; | 17 eventSender.dragMode = false; |
| 18 eventSender.mouseMoveTo(20, h); | 18 eventSender.mouseMoveTo(20, h); |
| 19 eventSender.mouseDown(); | 19 eventSender.mouseDown(); |
| 20 eventSender.mouseMoveTo(20, h); | 20 eventSender.mouseMoveTo(20, h); |
| 21 eventSender.mouseMoveTo(300, h); | 21 eventSender.mouseMoveTo(300, h); |
| 22 } | 22 } |
| 23 setTimeout(autoscrollTestPart2, 100); | 23 setTimeout(autoscrollTestPart2, 100); |
| 24 } | 24 } |
| 25 function autoscrollTestPart2() | 25 function autoscrollTestPart2() |
| 26 { | 26 { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 37 } | 37 } |
| 38 </script> | 38 </script> |
| 39 </head> | 39 </head> |
| 40 <body onload="test()"> | 40 <body onload="test()"> |
| 41 <p>Test for <a href=http://bugs.webkit.org/show_bug.cgi?id=11534">bug 11
534</a>.</p> | 41 <p>Test for <a href=http://bugs.webkit.org/show_bug.cgi?id=11534">bug 11
534</a>.</p> |
| 42 <p>Readonly text fields don't scroll when selecting content.</p> | 42 <p>Readonly text fields don't scroll when selecting content.</p> |
| 43 <input id="tf" readonly value="abcdefghijklmnopqrstuvwxyz"></input> | 43 <input id="tf" readonly value="abcdefghijklmnopqrstuvwxyz"></input> |
| 44 <div id="res"></div> | 44 <div id="res"></div> |
| 45 </body> | 45 </body> |
| 46 </html> | 46 </html> |
| OLD | NEW |