Name Description Size
.eslintrc.js 2030
AddressComponent.jsm TODO: This is only a prototype now Bug 1820526 - Implement Address field Deduplication algorithm 12406
AutofillTelemetry.jsm 16275
CreditCardRuleset.jsm Fathom ML model for identifying the fields of credit-card forms This is developed out-of-tree at form-autofill, where there is also over a GB of training, validation, and testing data. To make changes, do your edits there (whether adding new training pages, adding new rules, or both), retrain and evaluate as documented at, paste the coefficients emitted by the trainer into the ruleset, and finally copy the ruleset's "CODE TO COPY INTO PRODUCTION" section to this file's "CODE FROM TRAINING REPOSITORY" section. 42312
FormAutofill.jsm Determines if an autofill feature should be enabled based on the "available" and "supportedCountries" parameters. @param {string} available Available can be one of the following: "on", "detect", "off". "on" forces the particular Form Autofill feature on, while "detect" utilizes the supported countries to see if the feature should be available. @param {string[]} supportedCountries @returns {boolean} `true` if autofill feature is supported in the current browser search region 9245
FormAutofillChild.jsm Handles content's interactions for the frame. 5175
FormAutofillContent.jsm Form Autofill content process module. 27876
FormAutofillHandler.jsm Defines a handler object to represent forms that autofill can handle. 53252
FormAutofillHeuristics.jsm Form Autofill field heuristics. 44833
FormAutofillNameUtils.jsm 10860
FormAutofillNative.cpp 51279
FormAutofillNative.h 807
FormAutofillParent.jsm Implements a service used to access storage and communicate with content. A "fields" array is used to communicate with FormAutofillContent. Each item represents a single input field in the content page as well as its @autocomplete properties. The schema is as below. Please refer to FormAutofillContent.js for more details. [ { section, addressType, contactType, fieldName, value, index }, { // ... } ] 17872
FormAutofillPreferences.jsm Injects the form autofill section into about:preferences. 14409
FormAutofillStorageBase.jsm Interface for the storage of Form Autofill. The data is stored in JSON format, without indentation and the computed fields, using UTF-8 encoding. With indentation and computed fields applied, the schema would look like this: { version: 1, addresses: [ { guid, // 12 characters version, // schema version in integer // address fields given-name, additional-name, family-name, organization, // Company street-address, // (Multiline) address-level3, // Suburb/Sublocality address-level2, // City/Town address-level1, // Province (Standardized code if possible) postal-code, country, // ISO 3166 tel, // Stored in E.164 format email, // computed fields (These fields are computed based on the above fields // and are not allowed to be modified directly.) name, address-line1, address-line2, address-line3, country-name, tel-country-code, tel-national, tel-area-code, tel-local, tel-local-prefix, tel-local-suffix, // metadata timeCreated, // in ms timeLastUsed, // in ms timeLastModified, // in ms timesUsed _sync: { ... optional sync metadata }, } ], creditCards: [ { guid, // 12 characters version, // schema version in integer // credit card fields billingAddressGUID, // An optional GUID of an autofill address record which may or may not exist locally. cc-name, cc-number, // will be stored in masked format (************1234) // (see details below) cc-exp-month, cc-exp-year, // 2-digit year will be converted to 4 digits // upon saving cc-type, // Optional card network id (instrument type) // computed fields (These fields are computed based on the above fields // and are not allowed to be modified directly.) cc-given-name, cc-additional-name, cc-family-name, cc-number-encrypted, // encrypted from the original unmasked "cc-number" // (see details below) cc-exp, // metadata timeCreated, // in ms timeLastUsed, // in ms timeLastModified, // in ms timesUsed _sync: { ... optional sync metadata }, } ] } Encrypt-related Credit Card Fields (cc-number & cc-number-encrypted): When saving or updating a credit-card record, the storage will encrypt the value of "cc-number", store the encrypted number in "cc-number-encrypted" field, and replace "cc-number" field with the masked number. These all happen in "computeFields". We do reverse actions in "_stripComputedFields", which decrypts "cc-number-encrypted", restores it to "cc-number", and deletes "cc-number-encrypted". Therefore, calling "_stripComputedFields" followed by "computeFields" can make sure the encrypt-related fields are up-to-date. In general, you have to decrypt the number by your own outside FormAutofillStorage when necessary. However, you will get the decrypted records when querying data with "rawData=true" to ensure they're ready to sync. Sync Metadata: Records may also have a _sync field, which consists of: { changeCounter, // integer - the number of changes made since the last // sync. lastSyncedFields, // object - hashes of the original values for fields // changed since the last sync. } Records with such a field have previously been synced. Records without such a field are yet to be synced, so are treated specially in some cases (eg, they don't need a tombstone, de-duping logic treats them as special etc). Records without the field are always considered "dirty" from Sync's POV (meaning they will be synced on the next sync), at which time they will gain this new field. 69045
FormAutofillSync.jsm 11268
FormAutofillUtils.jsm Load address data and extension script into a sandbox from different paths. @param {string} path The path for address data and extension script. It could be root of the address metadata folder(addressmetadata/) or under specific country(addressmetadata/TW/). @returns {object} A sandbox that contains address data object with properties from extension. 41757 758 551
ProfileAutoCompleteResult.jsm @returns {number} The number of results 14183