New issue
Advanced search Search tips

Issue 827108 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

Autofilling January does not set the style to autofill

Project Member Reported by olivierrobin@chromium.org, Mar 29 2018

Issue description

App Version (from "Chrome Settings > About Chrome"): 67
iOS Version: All

After https://chromium-review.googlesource.com/c/chromium/src/+/959052, we only set the autofilled style when the value of the field is changed.

If your credit card expires in January, odds that the field will not change value are high, leading to month staying white.
We may want to set style for all selects.

WDYT?
 
Screen Shot 2018-03-29 at 1.19.09 PM.png
40.3 KB View Download

Comment 1 Deleted

I agree we should mark the <select> in this case as autofilled. As we discussed offline, we also don't want to mark hidden <select> elements as autofilled, since they have their original value returned from the autofill manager. E.g., the last form in https://rsolomakhin.github.io/autofill/
Cc: -olivierrobin@chromium.org se...@chromium.org mahmadi@chromium.org
Owner: olivierrobin@chromium.org
I think there is some work to do in autofill_controller.js to make the logic more similar to that of form_autofill_util.cc. i.e., we can refactor __gCrWeb.autofill['fillForm'] and __gCrWeb.autofill['fillActiveFormField'] work more similar to https://cs.chromium.org/chromium/src/components/autofill/content/renderer/form_autofill_util.cc?l=1716 and https://cs.chromium.org/chromium/src/components/autofill/content/renderer/form_autofill_util.cc?l=915

Assigning this to olivierrobin@.
Cc: -mahmadi@chromium.org olivierrobin@chromium.org
Owner: mahmadi@chromium.org
Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/540a25f935cbb605cdce15892cd2c6f7dd91f148

commit 540a25f935cbb605cdce15892cd2c6f7dd91f148
Author: Moe Ahmadi <mahmadi@chromium.org>
Date: Wed Apr 25 17:09:14 2018

[AF] Avoid filling fields that are not autofilled

Make the iOS implementation more similar to other platforms by sending
FormFieldData.is_autofilled to the JS in order to avoid filling fields that
are not autofilled (e.g., <select> elements with default values in hidden
sections).

With this change, there is no need for checking to see if the element's
value has changed in order to mark the element as autofilled. There are
cases where the element's value doesn't change but it must be marked as
autofilled, e.g., a <select> element for credit card expiry month whose
default value is 'January' where the expiry month of the credit card used
for autofill is also January.

This CL avoids sending autofill data for fields with empty values to the JS
side since they're already ignored in JS.

Bug:  827108 
Change-Id: If68d25cfa86eedd1467cd766fa55e7560048e660
Reviewed-on: https://chromium-review.googlesource.com/1026513
Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553605}
[modify] https://crrev.com/540a25f935cbb605cdce15892cd2c6f7dd91f148/components/autofill/ios/browser/autofill_agent.mm
[modify] https://crrev.com/540a25f935cbb605cdce15892cd2c6f7dd91f148/components/autofill/ios/browser/autofill_agent_unittests.mm
[modify] https://crrev.com/540a25f935cbb605cdce15892cd2c6f7dd91f148/components/autofill/ios/browser/resources/autofill_controller.js
[modify] https://crrev.com/540a25f935cbb605cdce15892cd2c6f7dd91f148/components/autofill/ios/fill/resources/fill.js

Status: Fixed (was: Started)

Sign in to add a comment