| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <head> | 2 <head> |
| 3 <style> | 3 <style> |
| 4 .overflow-hidden { | 4 .overflow-hidden { |
| 5 width: 100px; | 5 width: 100px; |
| 6 height: 100px; | 6 height: 100px; |
| 7 background: #000; | 7 background: #000; |
| 8 overflow: hidden; | 8 overflow: hidden; |
| 9 } | 9 } |
| 10 input { | 10 input { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 var x = input.offsetLeft + input.offsetWidth / 2; | 31 var x = input.offsetLeft + input.offsetWidth / 2; |
| 32 var y = input.offsetTop + input.offsetHeight / 2; | 32 var y = input.offsetTop + input.offsetHeight / 2; |
| 33 | 33 |
| 34 eventSender.dragMode = false; | 34 eventSender.dragMode = false; |
| 35 eventSender.mouseMoveTo(x, y); | 35 eventSender.mouseMoveTo(x, y); |
| 36 eventSender.mouseDown(); | 36 eventSender.mouseDown(); |
| 37 | 37 |
| 38 // We do the dragging/selection in two steps here, because if we move | 38 // We do the dragging/selection in two steps here, because if we move |
| 39 // the mouse beyond the input boundary right way, it won't start the autoscr
oll | 39 // the mouse beyond the input boundary right way, it won't start the autoscr
oll |
| 40 // timer. See early return in AutoscrollController::startAutoscrollForSelect
ion | 40 // timer. See early return in AutoscrollController::startAutoscrollForSelect
ion |
| 41 // after calling RenderBox::findAutoscrollable. | 41 // after calling LayoutBox::findAutoscrollable. |
| 42 eventSender.mouseMoveTo(x + 48, y); | 42 eventSender.mouseMoveTo(x + 48, y); |
| 43 eventSender.mouseMoveTo(x + 55, y); | 43 eventSender.mouseMoveTo(x + 55, y); |
| 44 setTimeout(finishTest, 100); | 44 setTimeout(finishTest, 100); |
| 45 } | 45 } |
| 46 | 46 |
| 47 function finishTest() | 47 function finishTest() |
| 48 { | 48 { |
| 49 eventSender.mouseUp(); | 49 eventSender.mouseUp(); |
| 50 var div = document.getElementById("div"); | 50 var div = document.getElementById("div"); |
| 51 if (div.scrollTop == 0 && div.scrollLeft == 0) | 51 if (div.scrollTop == 0 && div.scrollLeft == 0) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 65 <p>To test manually, start text selecting with a mouse the text within the entry
field. Then | 65 <p>To test manually, start text selecting with a mouse the text within the entry
field. Then |
| 66 continue to drag the mouse out of the input field boundary.<br>Scrolling should
not propagate to | 66 continue to drag the mouse out of the input field boundary.<br>Scrolling should
not propagate to |
| 67 the container overflown div due to its "overflow:hidden"</p> | 67 the container overflown div due to its "overflow:hidden"</p> |
| 68 <div id="div" class="overflow-hidden"> | 68 <div id="div" class="overflow-hidden"> |
| 69 <input id="input" type="text" value="any text here!"/> | 69 <input id="input" type="text" value="any text here!"/> |
| 70 <button/> | 70 <button/> |
| 71 </div> | 71 </div> |
| 72 <p id="result">If the test has completed this sentence should be replaced by a s
uccess message.</p> | 72 <p id="result">If the test has completed this sentence should be replaced by a s
uccess message.</p> |
| 73 </body> | 73 </body> |
| 74 </html> | 74 </html> |
| OLD | NEW |