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

Side by Side Diff: third_party/WebKit/LayoutTests/plugins/overlay-scrollbar-mouse-capture.html

Issue 2784313002: Change hittest node to be scrollbar's parent when hittest include a scrollbar (Closed)
Patch Set: bokan and mustaq comments addressed Created 3 years, 8 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 <head> 1 <head>
2 <script src="../resources/js-test.js"></script> 2 <script src="../resources/js-test.js"></script>
3 <style> 3 <style>
4 body { 4 body {
5 /* Hide the horizontal-scrollbar so that clicking right at the 5 /* Hide the horizontal-scrollbar so that clicking right at the
6 bottom of the vertical scrollbar will trigger a scroll */ 6 bottom of the vertical scrollbar will trigger a scroll */
7 overflow-x: hidden; 7 overflow-x: hidden;
8 } 8 }
9 #container { 9 #container {
10 /* The plugin is guaranteed not to be in the margin. */ 10 /* The plugin is guaranteed not to be in the margin. */
(...skipping 20 matching lines...) Expand all
31 15); 31 15);
32 eventSender.mouseDown(); 32 eventSender.mouseDown();
33 // Drag the thumb down but move off the thumb, the plugin shouldn't 33 // Drag the thumb down but move off the thumb, the plugin shouldn't
34 // receive any events because there shouldn't be any mouse capture. 34 // receive any events because there shouldn't be any mouse capture.
35 eventSender.mouseMoveTo(window.innerWidth - 20, window.innerHeight - 10) ; 35 eventSender.mouseMoveTo(window.innerWidth - 20, window.innerHeight - 10) ;
36 // A mouse up will be received because when dragging off a 36 // A mouse up will be received because when dragging off a
37 // scrollbar and releasing, it dispatches an event to the last 37 // scrollbar and releasing, it dispatches an event to the last
38 // element under the mouse. 38 // element under the mouse.
39 eventSender.mouseUp(); 39 eventSender.mouseUp();
40 40
41 // TODO(bokan): This is wrong, if the scrollbar captures the input the 41 // The scrollbar captures the input and the plugin would not receive
bokan 2017/04/04 15:18:01 nit: would -> should
42 // plugin shouldn't be receiving events. crbug.com/636436. 42 // events.
43 shouldBe('eventHistory.length', '2'); 43 shouldBe('eventHistory.length', '0');
44 shouldBe('eventHistory[0]', '"plugin.mousedown"');
45 shouldBe('eventHistory[1]', '"plugin.mouseup"');
46 requestAnimationFrame(function() { 44 requestAnimationFrame(function() {
47 shouldBeTrue('window.scrollY > 0'); 45 shouldBeTrue('window.scrollY > 0');
48 finishJSTest(); 46 finishJSTest();
49 }); 47 });
50 } 48 }
51 49
52 window.onload = function() { 50 window.onload = function() {
53 if (!window.eventSender || !window.internals) { 51 if (!window.eventSender || !window.internals) {
54 finishJSTest(); 52 finishJSTest();
55 return; 53 return;
(...skipping 20 matching lines...) Expand all
76 }); 74 });
77 plugin.addEventListener('mousemove', function(e) { 75 plugin.addEventListener('mousemove', function(e) {
78 if (startLogging) 76 if (startLogging)
79 eventHistory.push('plugin.mousemove'); 77 eventHistory.push('plugin.mousemove');
80 }); 78 });
81 d.appendChild(plugin); 79 d.appendChild(plugin);
82 80
83 runTest(); 81 runTest();
84 } 82 }
85 </script> 83 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698