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: third_party/WebKit/LayoutTests/fast/events/onclick-list-marker.html

Issue 2023433002: Use 1em margin for list-style:inside items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix fast/events/onclick-list-marker.html test Created 4 years, 6 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 <script> 1 <script>
2 var clicks = 0; 2 var clicks = 0;
3 var console = document.getElementById('console'); 3 var console = document.getElementById('console');
4 var x, y; 4 var x, y;
5 5
6 function log(message) { 6 function log(message) {
7 var console = document.getElementById('console'); 7 var console = document.getElementById('console');
8 var text = document.createTextNode(message); 8 var text = document.createTextNode(message);
9 console.appendChild(text); 9 console.appendChild(text);
10 console.appendChild(document.createElement("br")); 10 console.appendChild(document.createElement("br"));
(...skipping 19 matching lines...) Expand all
30 var ul = document.getElementById("ul"); 30 var ul = document.getElementById("ul");
31 var li = document.getElementById("li"); 31 var li = document.getElementById("li");
32 var span = document.getElementById("span"); 32 var span = document.getElementById("span");
33 33
34 y = li.offsetTop + li.offsetHeight / 2; 34 y = li.offsetTop + li.offsetHeight / 2;
35 35
36 li.style.listStylePosition = "inside"; 36 li.style.listStylePosition = "inside";
37 37
38 // WebCore renders an inside list marker right up against the left edge of t he bounding box of the list item. 38 // WebCore renders an inside list marker right up against the left edge of t he bounding box of the list item.
39 // This x position should put us over the list marker 39 // This x position should put us over the list marker
40 x = li.offsetLeft + 10; 40 x = li.offsetLeft + 40;
41 41
42 // Set the left margin of the span so that the text inside it overlaps the l ist marker. Clicking on a spot over 42 // Set the left margin of the span so that the text inside it overlaps the l ist marker. Clicking on a spot over
43 // the list marker should cause the following onclick fire order: span, li, ul 43 // the list marker should cause the following onclick fire order: span, li, ul
44 span.style.marginLeft = -100; 44 span.style.marginLeft = -100;
45 log("The onclick fire order should be: span, li, ul"); 45 log("The onclick fire order should be: span, li, ul");
46 eventSender.mouseMoveTo(x, y); 46 eventSender.mouseMoveTo(x, y);
47 eventSender.mouseDown(); 47 eventSender.mouseDown();
48 eventSender.mouseUp(); 48 eventSender.mouseUp();
49 49
50 // Set the left margin of the span so that the text inside it overlaps the l ist marker. Clicking on a spot over 50 // Set the left margin of the span so that the text inside it overlaps the l ist marker. Clicking on a spot over
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 <li id="li" onclick="clickHandler('li');"><span id="span" onclick="clickHandler( 'span')">text</span></li> 97 <li id="li" onclick="clickHandler('li');"><span id="span" onclick="clickHandler( 'span')">text</span></li>
98 </ul> 98 </ul>
99 99
100 <p>This is a testcase for hit testing over list markers. It uses the eventSende r to do mouse clicks and programmatically adjusts the left margin of the span in side the list item and the list-style-position: of the list item.</p> 100 <p>This is a testcase for hit testing over list markers. It uses the eventSende r to do mouse clicks and programmatically adjusts the left margin of the span in side the list item and the list-style-position: of the list item.</p>
101 101
102 <p id="console"></p> 102 <p id="console"></p>
103 103
104 <script> 104 <script>
105 runTest(); 105 runTest();
106 </script> 106 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/Source/core/layout/LayoutListMarker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698