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

Side by Side Diff: LayoutTests/fast/multicol/event-offset.html

Issue 1024023002: [New Multicolumn] mapAbsoluteToLocalPoint() needs to convert to flow thread coordinates. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: code review Created 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <style>
3 body {
4 margin: 0;
5 }
6
7 #columns {
8 position: absolute;
9 width: 332px;
10 height: 200px;
11 top: 220px;
12 left: 300px;
13 border: 1px solid black;
14 -webkit-column-count: 3;
15 -webkit-column-gap: 16px;
16 column-fill: auto;
17 line-height: 50px;
18 }
19 </style>
20
21 <div id="columns">
22 <br>
23 <br>
24 <br>
25 <div id="in-column1">first</div>
26 <br>
27 <div id="in-column2">second</div>
28 <br>
29 <br>
30 <div id="in-column3">third</div>
31 <br>
32 </div>
33
34 <script src="../../resources/js-test.js"></script>
35 <script>
36 description("Dispatch mouse click events in each column and check the result.");
37
38 if (window.testRunner)
39 window.testRunner.waitUntilDone();
40
41 function dispatchEvent(clientX, clientY, expectedElementID, expectedOffsetX, exp ectedOffsetY) {
42 var e = document.createEvent("MouseEvent");
43 e.initMouseEvent("click", true, true, window, 1, 1, 1, clientX, clientY, fal se, false, false, false, 0, document);
44 e.expectedElementID = expectedElementID;
45 e.expectedOffsetX = expectedOffsetX;
46 e.expectedOffsetY = expectedOffsetY;
47 var target = document.elementFromPoint(e.clientX, e.clientY);
48 target.dispatchEvent(e);
49 }
50
51 onclick = function(event) {
52 if (!event.expectedElementID)
53 return;
54 shouldBe("event.target.id", "event.expectedElementID");
55 shouldBe("event.offsetX", "event.expectedOffsetX");
56 shouldBe("event.offsetY", "event.expectedOffsetY");
57 }
58
59 window.onload = function() {
60 dispatchEvent(380, 400, 'in-column1', 79, 29);
61 dispatchEvent(480, 300, 'in-column2', 63, 29);
62 dispatchEvent(632, 221, 'in-column3', 99, 0);
63
64 if (window.testRunner)
65 window.testRunner.notifyDone();
66 }
67 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698