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

Side by Side Diff: LayoutTests/fast/events/scroll-div-with-prevent-default-in-subframe.html

Issue 9600027: Merge 106476 - Source/WebCore: preventDefault() in a mousedown in a subframe should not (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 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 <html><body onload="scroll()"> 1 <html><body onload="scroll()">
2 <script> 2 <script>
3 function scroll() { 3 function scroll() {
4 if (window.eventSender) { 4 if (window.eventSender) {
5 var scrollbar = document.getElementById("subframe").contentDocument.getE lementById('scrollable'); 5 var scrollbar = document.getElementById("subframe").contentDocument.getE lementById('scrollable');
6 6
7 var startX = scrollbar.offsetLeft + scrollbar.offsetWidth - 5; 7 var startX = scrollbar.offsetLeft + scrollbar.offsetWidth - 5;
8 var startY = scrollbar.offsetTop + 200; 8 var startY = scrollbar.offsetTop + 200;
9 9
10 eventSender.mouseMoveTo(startX, startY - 100); 10 eventSender.mouseMoveTo(startX, startY - 100);
(...skipping 23 matching lines...) Expand all
34 </script> 34 </script>
35 <div id="console"></div> 35 <div id="console"></div>
36 <iframe id="subframe" width="500px" height="350" scrolling="no" marginwidth="0" marginheight="0" src="resources/subframe-with-scrollable-div.html"></iframe> 36 <iframe id="subframe" width="500px" height="350" scrolling="no" marginwidth="0" marginheight="0" src="resources/subframe-with-scrollable-div.html"></iframe>
37 <br>This test does the following via EventSender:<br> 37 <br>This test does the following via EventSender:<br>
38 1. Click and drag the div scrollbar to a middle point.<br> 38 1. Click and drag the div scrollbar to a middle point.<br>
39 2. Click and drag again, this time down and to right, with the mouseup occurring in a parent frame.<br> 39 2. Click and drag again, this time down and to right, with the mouseup occurring in a parent frame.<br>
40 3. Move the mouse back into the div with the scrollbar.<br> 40 3. Move the mouse back into the div with the scrollbar.<br>
41 Per https://bugs.webkit.org/show_bug.cgi?id=73097, because the div with the scro llbar had a mousedown event that called preventDefault(), 41 Per https://bugs.webkit.org/show_bug.cgi?id=73097, because the div with the scro llbar had a mousedown event that called preventDefault(),
42 the mouse moves would not properly be handled by the scrollbar. We pass if the d iv's scrollTop property is the same after all 3 steps. 42 the mouse moves would not properly be handled by the scrollbar. We pass if the d iv's scrollTop property is the same after all 3 steps.
43 </body></html> 43 </body></html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698