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

Side by Side Diff: LayoutTests/fast/forms/input-appearance-preventDefault.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 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 function test() 4 function test()
5 { 5 {
6 if (window.testRunner) { 6 if (window.testRunner) {
7 // Mouse events only work after an initial layout
8 document.body.offsetLeft;
9 eventSender.mouseMoveTo(25, 55); 7 eventSender.mouseMoveTo(25, 55);
10 eventSender.mouseDown(); 8 eventSender.mouseDown();
11 eventSender.mouseUp(); 9 eventSender.mouseUp();
12 } 10 }
13 } 11 }
14 12
15 function prevDefaultForEvent( evt ) { 13 function prevDefaultForEvent( evt ) {
16 log(evt.type + " on target " + evt.target); 14 log(evt.type + " on target " + evt.target);
17 evt.preventDefault(); 15 evt.preventDefault();
18 } 16 }
19 17
20 function log(text) { 18 function log(text) {
21 document.getElementById('result').innerHTML = document.getElementById('resul t').innerHTML + "<br>" + text; 19 document.getElementById('result').innerHTML = document.getElementById('resul t').innerHTML + "<br>" + text;
22 } 20 }
23 </script> 21 </script>
24 </head> 22 </head>
25 <body onload="test()"> 23 <body onload="test()">
26 <br> 24 <br>
27 This tests that preventDefault called onmousedown will prevent a caret from bein g placed in the text field. 25 This tests that preventDefault called onmousedown will prevent a caret from bein g placed in the text field.
28 <input id="tf1" style="-khtml-appearance: textfield; position: absolute; top: 50 ; left: 10;" onmousedown="prevDefaultForEvent(event)" value="No caret should be here"></input> 26 <input id="tf1" style="-khtml-appearance: textfield; position: absolute; top: 50 ; left: 10;" onmousedown="prevDefaultForEvent(event)" value="No caret should be here"></input>
29 <div id="result" style="position: absolute; top: 70; left: 10;"> 27 <div id="result" style="position: absolute; top: 70; left: 10;">
30 </div> 28 </div>
31 </body> 29 </body>
32 </html> 30 </html>
33 31
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/file/input-file-re-render.html ('k') | LayoutTests/fast/forms/input-text-click-inside.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698