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

Side by Side Diff: components/autofill/ios/browser/resources/autofill_controller.js

Issue 2449333002: [ios] Pass more --jscomp_error switches to the closure Compiler. (Closed)
Patch Set: Created 4 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // Installs Autofill management functions on the |__gCrWeb| object. 5 /**
6 // 6 * @fileoverview Installs Autofill management functions on the __gCrWeb object.
7 // It scans the DOM, extracting and storing forms and returns a JSON string 7 *
8 // representing an array of objects, each of which represents an Autofill form 8 * It scans the DOM, extracting and storing forms and returns a JSON string
9 // with information about a form to be filled and/or submitted and it can be 9 * representing an array of objects, each of which represents an Autofill form
10 // translated to struct FormData 10 * with information about a form to be filled and/or submitted and it can be
11 // (chromium/src/components/autofill/core/common/form_data.h) for further 11 * translated to struct FormData
12 // processing. 12 * (chromium/src/components/autofill/core/common/form_data.h) for further
13 * processing.
14
15 * TODO(crbug.com/647084): Enable checkTypes error for this file.
16 * @suppress {checkTypes}
17 */
13 18
14 /** @typedef {HTMLInputElement|HTMLTextAreaElement|HTMLSelectElement} */ 19 /** @typedef {HTMLInputElement|HTMLTextAreaElement|HTMLSelectElement} */
15 var FormControlElement; 20 var FormControlElement;
16 21
17 /** 22 /**
18 * @typedef {{ 23 * @typedef {{
19 * name: string, 24 * name: string,
20 * value: string, 25 * value: string,
21 * form_control_type: string, 26 * form_control_type: string,
22 * autocomplete_attributes: string, 27 * autocomplete_attributes: string,
(...skipping 20 matching lines...) Expand all
43 */ 48 */
44 var AutofillFormData; 49 var AutofillFormData;
45 50
46 /* Beginning of anonymous object. */ 51 /* Beginning of anonymous object. */
47 (function() { 52 (function() {
48 53
49 /** 54 /**
50 * Namespace for this file. It depends on |__gCrWeb| having already been 55 * Namespace for this file. It depends on |__gCrWeb| having already been
51 * injected. 56 * injected.
52 */ 57 */
53 __gCrWeb['autofill'] = {}; 58 __gCrWeb.autofill = {};
59 __gCrWeb['autofill'] = __gCrWeb.autofill;
dpapad 2016/10/26 17:05:24 What does this line do? Seems unnecessary at first
Eugene But (OOO till 7-30) 2016/10/26 17:54:45 Stores autofill namespace object in a global __gCr
dpapad 2016/10/26 18:18:35 Ah ok, it makes sense now. I am used to seeing goo
54 60
55 /** 61 /**
56 * The maximum length allowed for form data. 62 * The maximum length allowed for form data.
57 * 63 *
58 * This variable is from AutofillTable::kMaxDataLength in 64 * This variable is from AutofillTable::kMaxDataLength in
59 * chromium/src/components/autofill/core/browser/webdata/autofill_table.h 65 * chromium/src/components/autofill/core/browser/webdata/autofill_table.h
60 * 66 *
61 * @const {number} 67 * @const {number}
62 */ 68 */
63 __gCrWeb.autofill.MAX_DATA_LENGTH = 1024; 69 __gCrWeb.autofill.MAX_DATA_LENGTH = 1024;
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after
2060 var elementName = __gCrWeb['common'].nameForAutofill(element); 2066 var elementName = __gCrWeb['common'].nameForAutofill(element);
2061 var value = formData[elementName]; 2067 var value = formData[elementName];
2062 if (value) { 2068 if (value) {
2063 element.placeholder = value; 2069 element.placeholder = value;
2064 } 2070 }
2065 } 2071 }
2066 } 2072 }
2067 }; 2073 };
2068 2074
2069 }()); // End of anonymous object 2075 }()); // End of anonymous object
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698