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

Side by Side Diff: ios/web/web_state/js/resources/core.js

Issue 2593283002: [ios] Removed keyCode from FormActivityRegistered API. (Closed)
Patch Set: Created 4 years 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 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file adheres to closure-compiler conventions in order to enable 5 // This file adheres to closure-compiler conventions in order to enable
6 // compilation with ADVANCED_OPTIMIZATIONS. In particular, members that are to 6 // compilation with ADVANCED_OPTIMIZATIONS. In particular, members that are to
7 // be accessed externally should be specified in this['style'] as opposed to 7 // be accessed externally should be specified in this['style'] as opposed to
8 // this.style because member identifiers are minified by default. 8 // this.style because member identifiers are minified by default.
9 // See http://goo.gl/FwOgy 9 // See http://goo.gl/FwOgy
10 10
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 var fieldName = srcElement.name || ''; 286 var fieldName = srcElement.name || '';
287 var value = srcElement.value || ''; 287 var value = srcElement.value || '';
288 288
289 var msg = { 289 var msg = {
290 'command': 'form.activity', 290 'command': 'form.activity',
291 'formName': __gCrWeb.common.getFormIdentifier(evt.srcElement.form), 291 'formName': __gCrWeb.common.getFormIdentifier(evt.srcElement.form),
292 'fieldName': fieldName, 292 'fieldName': fieldName,
293 'type': evt.type, 293 'type': evt.type,
294 'value': value 294 'value': value
295 }; 295 };
296 if (evt.keyCode)
297 msg.keyCode = evt.keyCode;
298 invokeOnHost_(msg); 296 invokeOnHost_(msg);
299 }; 297 };
300 298
301 // Focus events performed on the 'capture' phase otherwise they are often 299 // Focus events performed on the 'capture' phase otherwise they are often
302 // not received. 300 // not received.
303 document.addEventListener('focus', formActivity, true); 301 document.addEventListener('focus', formActivity, true);
304 document.addEventListener('blur', formActivity, true); 302 document.addEventListener('blur', formActivity, true);
305 document.addEventListener('change', formActivity, true); 303 document.addEventListener('change', formActivity, true);
306 304
307 // Text input is watched at the bubbling phase as this seems adequate in 305 // Text input is watched at the bubbling phase as this seems adequate in
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 }); 667 });
670 }, false); 668 }, false);
671 669
672 addFormEventListeners_(); 670 addFormEventListeners_();
673 671
674 return true; 672 return true;
675 }; 673 };
676 674
677 __gCrWeb.core.documentInject(); 675 __gCrWeb.core.documentInject();
678 }()); // End of anonymous object 676 }()); // End of anonymous object
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698