New issue
Advanced search Search tips

Issue 602279 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: Jan 14
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Weird autofill behavior on theinformation.com

Project Member Reported by zkoch@chromium.org, Apr 11 2016

Issue description

URL: https://membership.theinformation.com/membership/join/drp1fm/user

What's weird:

The way this form is built is weird, but what autofill does strikes me as more strange. We correctly identify the first field as "credit card name", but we show the sublabel for the credit card number. This seems strange, since we don't actually fill in the credit card number.

Then later on the credit card number and expiration, we don't offer autofill, presumably because there are only two fields: credit card number and expiration?

If so, it seems to me that for credit cards, 2 recognized fields should be enough to trigger autofill.

Mathp or seb, can you confirm my understanding of things?
 

Comment 1 by se...@chromium.org, Apr 11 2016

Owner: se...@chromium.org
Status: Assigned (was: Untriaged)
Hi Zach,

1) For the labels, unfortunately the label for the credit cards is not constructed based on the other fields in the form. The logic is pretty simple [1]:
 - if the field that was clicked is a cc-num, the label will contain the expiration,
 - if the initial field was not cc-num and there is no number saved for the card, the label will contain the name on the card.
 - otherwise, the label will contain the last 4 digits of the card number 

The way the labels are created now is to distinguish between the multiple suggestions. It is the same way for the profiles where we GetFieldsForDistinguishingProfiles [2].
This is why they don't reflect the fields that will be filled by the suggestion.

2) For why we don't trigger autofill for the two credit card fields. Unfortunately, the place where we look at the number of autofillable fields (which is currently 3) is at the very beginning of the process [3]. At that point there is no way to know the type of a field (except with autocomplete attributes, I implemented that fix a little while back). This is done to not overwhelm Autofill with lots of small forms. There is a comment that explains it at [4]:

 "Ideally we would execute those routines no matter how many fields are in the forms; however, finding the label for each field is a costly operation and we can't spare the cycles if it's not necessary". 

This was written a while back so maybe we can try to see if the operations are still too costly.


Thanks for posting this. I think it helps us understand better how Autofill works and how we can improve it!


References:
[1]: https://code.google.com/p/chromium/codesearch#chromium/src/components/autofill/core/browser/personal_data_manager.cc&l=1477  (from 1477 to 1494).

[2]: https://code.google.com/p/chromium/codesearch#chromium/src/components/autofill/core/browser/autofill_profile.cc&l=699

[3]: https://code.google.com/p/chromium/codesearch#chromium/src/components/autofill/content/renderer/form_cache.cc&l=62

[4]: https://code.google.com/p/chromium/codesearch#chromium/src/components/autofill/core/common/autofill_constants.h&l=17

Comment 2 by ma...@chromium.org, May 1 2018

Components: UI>Browser>Autofill
Status: Archived (was: Assigned)

Sign in to add a comment