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

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

Issue 14859016: Don't force layout for mouse event hit tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix review comment 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
34 eventSender.dragMode = false; 37 eventSender.dragMode = false;
35 // This mouse click seems to be required for WebKit's event handling to 38 // This mouse click seems to be required for WebKit's event handling to
36 // pick up the :hover class. See https://bugs.webkit.org/show_bug.cgi?id=742 64 39 // pick up the :hover class. See https://bugs.webkit.org/show_bug.cgi?id=742 64
37 eventSender.mouseDown() 40 eventSender.mouseDown()
38 eventSender.mouseUp() 41 eventSender.mouseUp()
39 42
40 // Move into the first box. 43 // Move into the first box.
41 eventSender.mouseMoveTo(50, 50) 44 eventSender.mouseMoveTo(50, 50)
42 shouldHaveBackground(box, 'rgb(255, 0, 0)') 45 shouldHaveBackground(box, 'rgb(255, 0, 0)')
43 shouldHaveBackground(box2, 'rgb(0, 0, 0)') 46 shouldHaveBackground(box2, 'rgb(0, 0, 0)')
(...skipping 10 matching lines...) Expand all
54 // Mouse still down, move outside of both boxes. 57 // Mouse still down, move outside of both boxes.
55 eventSender.mouseMoveTo(400, 50) 58 eventSender.mouseMoveTo(400, 50)
56 shouldHaveBackground(box, 'rgb(0, 255, 0)') 59 shouldHaveBackground(box, 'rgb(0, 255, 0)')
57 shouldHaveBackground(box2, 'rgb(0, 0, 0)') 60 shouldHaveBackground(box2, 'rgb(0, 0, 0)')
58 61
59 eventSender.mouseUp() 62 eventSender.mouseUp()
60 shouldHaveBackground(box, 'rgb(0, 0, 0)') 63 shouldHaveBackground(box, 'rgb(0, 0, 0)')
61 shouldHaveBackground(box2, 'rgb(0, 0, 0)') 64 shouldHaveBackground(box2, 'rgb(0, 0, 0)')
62 } 65 }
63 </script> 66 </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