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

Unified Diff: components/autofill/ios/browser/resources/autofill_controller.js

Issue 2146523004: Make full-form autofill the only implementation on iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/autofill/ios/browser/js_autofill_manager.mm ('k') | ios/chrome/browser/about_flags.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/ios/browser/resources/autofill_controller.js
diff --git a/components/autofill/ios/browser/resources/autofill_controller.js b/components/autofill/ios/browser/resources/autofill_controller.js
index a7600892fa6d0394b88247802fac467d54d448f2..50ec7364308aab36833cf0837bca65b00033b450 100644
--- a/components/autofill/ios/browser/resources/autofill_controller.js
+++ b/components/autofill/ios/browser/resources/autofill_controller.js
@@ -137,13 +137,6 @@ __gCrWeb.autofill.ROLE_ATTRIBUTE_PRESENTATION = 0;
__gCrWeb.autofill.lastAutoFilledElement = null;
/**
- * The last element that was active (used to restore focus if necessary).
- *
- * @type {Element}
- */
-__gCrWeb.autofill.lastActiveElement = null;
-
-/**
* Whether CSS for autofilled elements has been injected into the page.
*
* @type {boolean}
@@ -556,34 +549,12 @@ __gCrWeb.autofill['extractForms'] = function(requiredFields) {
};
/**
- * Stores the current active element. This is used to make the element active
- * again in case the web view loses focus when a dialog is presented over it.
- */
-__gCrWeb.autofill['storeActiveElement'] = function() {
- __gCrWeb.autofill.lastActiveElement = document.activeElement;
-}
-
-/**
- * Clears the current active element by setting it to null.
- */
-__gCrWeb.autofill['clearActiveElement'] = function() {
- __gCrWeb.autofill.lastActiveElement = null;
-}
-
-/**
- * Fills data into the active form field. The active form field is either
- * document.activeElement or the value of lastActiveElement if that value is
- * non-null.
+ * Fills data into the active form field.
*
* @param {AutofillFormFieldData} data The data to fill in.
*/
__gCrWeb.autofill['fillActiveFormField'] = function(data) {
var activeElement = document.activeElement;
- if (__gCrWeb.autofill.lastActiveElement) {
- activeElement = __gCrWeb.autofill.lastActiveElement;
- activeElement.focus();
- __gCrWeb.autofill.lastActiveElement = null;
- }
if (data['name'] !== __gCrWeb['common'].nameForAutofill(activeElement)) {
return;
}
« no previous file with comments | « components/autofill/ios/browser/js_autofill_manager.mm ('k') | ios/chrome/browser/about_flags.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698