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

Side by Side Diff: WebCore/manual-tests/focus-change-between-key-events.html

Issue 2155003: Merge 58829 - Reviewed by Adele Peterson.... (Closed) Base URL: svn://chrome-svn/chrome/branches/WebKit/375/
Patch Set: Created 10 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
« no previous file with comments | « WebCore/ChangeLog ('k') | WebCore/page/EventHandler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <body onload="document.getElementById('dummy').focus();">
2 <iframe src="data:text/html,<body onload='document.getElementsByTagName(&quot;in put&quot;)[0].focus()'><input></body>" id=victim name=victim>
3 </iframe>
4 <script>
5
6 var cur_pos = 0;
7
8 function maybe_redirect(e) {
9 var evt = window.event ? event : e;
10 var cc = evt.charCode ? evt.charCode : evt.keyCode;
11
12 document.getElementById('victim').focus();
13 frames['victim'].focus();
14
15 document.getElementById('dummy').value += String.fromCharCode(cc).toLowerCase( );
16
17 setTimeout('focus();document.getElementById("dummy").focus()',1);
18 }
19
20
21 </script>
22 <p>Type some text. It should only appear in the below input field.</p>
23 <input type=text onkeydown="maybe_redirect(event)" id=dummy>
24 </body>
OLDNEW
« no previous file with comments | « WebCore/ChangeLog ('k') | WebCore/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698