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

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