[Autofill] Add ability to determine shared labels
This CL implements the ability to divide a label between a series of fields to address the following scenario in a form: Street Name / House Number: [ ][ ] or First Name & Last Name: [ ][ ] ([ ]: indicates a text input field in a form.) Here, it is anticipated that the label is divided between the two following fields. For this to happen, the label is split by a list of separator characters and words. If the field is followed by a series of unlabeled fields such that the total number of fields exactly matches the non-empty components of the first fields' label after the split, the label is divided. There are additional conditions for the label sharing: * The maximum number of fields to share a label is limited to 3. * The maximum length of the label to be shared is limited to 40. To store the divided labels, a new field |parseable_label_| is added to |AutofillField| which is only supposed to be used in the heuristic type detection. Note, this change only makes the |parseable_label_| available, but does not utilize this yet. This will be subject to a subsequent CL. Change-Id: If098b2aa5a0c3c29a28fff846a4c694c64b837f5 Bug: 1167702 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2623547Reviewed-by:Christoph Schwering <schwering@google.com> Commit-Queue: Matthias Körber <koerber@google.com> Cr-Commit-Position: refs/heads/master@{#844596}
Showing
Please register or sign in to comment