From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../extensions/formautofill/docs/heuristics.rst | 36 ++++++++++++++++++++++ browser/extensions/formautofill/docs/index.rst | 30 ++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 browser/extensions/formautofill/docs/heuristics.rst create mode 100644 browser/extensions/formautofill/docs/index.rst (limited to 'browser/extensions/formautofill/docs') diff --git a/browser/extensions/formautofill/docs/heuristics.rst b/browser/extensions/formautofill/docs/heuristics.rst new file mode 100644 index 0000000000..cf6e49da39 --- /dev/null +++ b/browser/extensions/formautofill/docs/heuristics.rst @@ -0,0 +1,36 @@ +Form Autofill Heuristics +======================== + +Form Autofill Heuristics module is for detecting the field type based on `autocomplete attribute `_, `the regular expressions `_ and the customized logic in each parser. + +Debugging +--------- + +The pref ``extensions.formautofill.heuristics.enabled`` is "true" in default. Set it to "false" could be useful to verify the result of autocomplete attribute. + +Dependent APIs +-------------- + +``element.getAutocompleteInfo()`` provides the parsed result of ``autocomplete`` attribute which includes the field name and section information defined in `autofill spec `_ + +Regular Expressions +------------------- + +This section is about how the regular expression is applied during parsing fields. All regular expressions are in `heuristicsRegexp.js `_. + +Parser Implementations +---------------------- + +The parsers are for detecting the field type more accurately based on the near context of a field. Each parser uses ``FieldScanner`` to traverse the interested fields with the result from the regular expressions and adjust each field type when it matches to a grammar. + +* _parsePhoneFields + + * related type: ``tel``, ``tel-*`` + +* _parseAddressFields + + * related type: ``address-line[1-3]`` + +* _parseCreditCardExpirationDateFields + + * related type: ``cc-exp``, ``cc-exp-month``, ``cc-exp-year`` diff --git a/browser/extensions/formautofill/docs/index.rst b/browser/extensions/formautofill/docs/index.rst new file mode 100644 index 0000000000..37759ce602 --- /dev/null +++ b/browser/extensions/formautofill/docs/index.rst @@ -0,0 +1,30 @@ +Form Autofill +============= + +`Wiki `_ | +`IRC: #formfill `_ + +Introduction +------------ + +Form Autofill saves users time and effort when making online purchases by storing their personal information in a profile and automatically populating form fields when the user requires it. + +Our objective is to increase user engagement, satisfaction and retention for frequent online shoppers (those who make an online purchase at least once per month). We believe this can be achieved by enabling users to complete forms and “check out” in e-commerce flows as quickly and securely as possible. + +Debugging +--------- + +Set the pref ``extensions.formautofill.loglevel`` to "Debug". + +Contents +-------- + +.. toctree:: + :maxdepth: 1 + + heuristics + +Report Issues +------------- + +If you find any issues about filling a form with incorrect values, please file a `new bug `_ to Toolkit::Form Autofill component or leave a comment in `bug 1405266 `_. -- cgit v1.2.3