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

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

Issue 2454863002: Fix iOS autofill JavaScript compiler warnings. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | ios/web/web_state/js/resources/common.js » ('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 510a9309cbd2137e5cb5afdb460135630327244d..56ea4192ce6a034a340f6555761c1460f6f49e0b 100644
--- a/components/autofill/ios/browser/resources/autofill_controller.js
+++ b/components/autofill/ios/browser/resources/autofill_controller.js
@@ -11,9 +11,6 @@
// (chromium/src/components/autofill/core/common/form_data.h) for further
// processing.
-/** @typedef {HTMLInputElement|HTMLTextAreaElement|HTMLSelectElement} */
-var FormControlElement;
-
/**
* @typedef {{
* name: string,
@@ -250,7 +247,7 @@ function scanFormControlElements_(controlElements) {
* In the C++ version, |fieldsets| can be NULL, in which case we do not try to
* append to it.
*
- * @param {Array<FormControlElement>} elements elements to look through.
+ * @param {Array<!FormControlElement>} elements elements to look through.
* @param {Array<Element>} fieldsets out param for unowned fieldsets.
* @return {Array<FormControlElement>} The elements that are not part of a form.
*/
@@ -631,7 +628,7 @@ __gCrWeb.autofill['fillForm'] = function(data, forceFillFieldName) {
// TODO(bondd): Handle __gCrWeb.autofill.isCheckableElement(element) ==
// true. |is_checked| is not currently passed in by the caller.
- element.setAttribute('chrome-autofilled');
+ element.setAttribute('chrome-autofilled', '');
element.isAutofilled = true;
element.addEventListener('input', controlElementInputListener);
}
@@ -1037,7 +1034,7 @@ __gCrWeb.autofill.findChildTextInner = function(node, depth, divsToSkip) {
node.tagName === 'NOSCRIPT') {
return '';
}
- if (__gCrWeb.common.isFormControlElement(node)) {
+ if (__gCrWeb.common.isFormControlElement(/** @type {Element} */ (node))) {
var input = /** @type {FormControlElement} */ (node);
if (__gCrWeb.autofill.isAutofillableElement(input)) {
return '';
« no previous file with comments | « no previous file | ios/web/web_state/js/resources/common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698