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

Side by Side Diff: LayoutTests/fast/css/hover-active-drag.html

Issue 15508003: Revert "Don't force layout for mouse event hit tests" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <style> 2 <style>
3 div { background: rgb(0, 0, 0); } 3 div { background: rgb(0, 0, 0); }
4 div:hover { background: rgb(255, 0, 0); } 4 div:hover { background: rgb(255, 0, 0); }
5 div:hover:active { background: rgb(255, 255, 0); } 5 div:hover:active { background: rgb(255, 255, 0); }
6 div:active { background: rgb(0, 255, 0); } 6 div:active { background: rgb(0, 255, 0); }
7 div { 7 div {
8 width: 100px; 8 width: 100px;
9 height: 100px; 9 height: 100px;
10 border: 2px solid rgb(0, 0, 255); 10 border: 2px solid rgb(0, 0, 255);
(...skipping 13 matching lines...) Expand all
24 background = getComputedStyle(element, null).getPropertyValue("background-co lor") 24 background = getComputedStyle(element, null).getPropertyValue("background-co lor")
25 shouldBeEqualToString('background', bg) 25 shouldBeEqualToString('background', bg)
26 } 26 }
27 27
28 if (window.testRunner) { 28 if (window.testRunner) {
29 description("Dragging out of an element should cause it to lose :hover") 29 description("Dragging out of an element should cause it to lose :hover")
30 var box = document.getElementById('box') 30 var box = document.getElementById('box')
31 var box2 = document.getElementById('box2') 31 var box2 = document.getElementById('box2')
32 testRunner.dumpAsText(); 32 testRunner.dumpAsText();
33 33
34 // Mouse events only work after an initial layout
35 document.body.offsetLeft;
36
37 eventSender.dragMode = false; 34 eventSender.dragMode = false;
38 // This mouse click seems to be required for WebKit's event handling to 35 // This mouse click seems to be required for WebKit's event handling to
39 // pick up the :hover class. See https://bugs.webkit.org/show_bug.cgi?id=742 64 36 // pick up the :hover class. See https://bugs.webkit.org/show_bug.cgi?id=742 64
40 eventSender.mouseDown() 37 eventSender.mouseDown()
41 eventSender.mouseUp() 38 eventSender.mouseUp()
42 39
43 // Move into the first box. 40 // Move into the first box.
44 eventSender.mouseMoveTo(50, 50) 41 eventSender.mouseMoveTo(50, 50)
45 shouldHaveBackground(box, 'rgb(255, 0, 0)') 42 shouldHaveBackground(box, 'rgb(255, 0, 0)')
46 shouldHaveBackground(box2, 'rgb(0, 0, 0)') 43 shouldHaveBackground(box2, 'rgb(0, 0, 0)')
(...skipping 10 matching lines...) Expand all
57 // Mouse still down, move outside of both boxes. 54 // Mouse still down, move outside of both boxes.
58 eventSender.mouseMoveTo(400, 50) 55 eventSender.mouseMoveTo(400, 50)
59 shouldHaveBackground(box, 'rgb(0, 255, 0)') 56 shouldHaveBackground(box, 'rgb(0, 255, 0)')
60 shouldHaveBackground(box2, 'rgb(0, 0, 0)') 57 shouldHaveBackground(box2, 'rgb(0, 0, 0)')
61 58
62 eventSender.mouseUp() 59 eventSender.mouseUp()
63 shouldHaveBackground(box, 'rgb(0, 0, 0)') 60 shouldHaveBackground(box, 'rgb(0, 0, 0)')
64 shouldHaveBackground(box2, 'rgb(0, 0, 0)') 61 shouldHaveBackground(box2, 'rgb(0, 0, 0)')
65 } 62 }
66 </script> 63 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/css-generated-content/hover-style-change.html ('k') | LayoutTests/fast/css/layerZOrderCrash.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698