Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Issue 2889393002: Add username field discovery heuristic. (Closed)

Created:
3 years, 7 months ago by pkalinnikov
Modified:
3 years, 6 months ago
Reviewers:
kolos1, dvadym
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, jam, vabr+watchlistpasswordmanager_chromium.org, rouslan+autofill_chromium.org, rogerm+autofillwatch_chromium.org, sebsg+autofillwatch_chromium.org, browser-components-watch_chromium.org, mathp+autofillwatch_chromium.org, darin-cc_chromium.org, vabr+watchlistautofill_chromium.org, estade+watch_chromium.org, gcasto+watchlist_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add username field discovery heuristic. There are some cases when autofill can't find a username field for autocompletion. For example, if the field is created dynamically in JavaScript. This CL introduces a heuristic which is used as a fallback in such cases to find a username field. When password form autocompletion is about to happen with unknown username field, the heuristic searches for the closest visible autocompletable non-password text element preceding the password element. If one found, it is believed to be the username field. BUG=710374, 606736, 586465, 710003 Review-Url: https://codereview.chromium.org/2889393002 Cr-Commit-Position: refs/heads/master@{#475481} Committed: https://chromium.googlesource.com/chromium/src/+/4afdcc3b649fd9e056ccfe078890c39419e62d08

Patch Set 1 #

Total comments: 6

Patch Set 2 : Rebase onto crrev/2902113004 #

Patch Set 3 : Rebase. #

Total comments: 11

Patch Set 4 : Address comments; add tests. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -86 lines) Patch
M chrome/renderer/autofill/password_autofill_agent_browsertest.cc View 1 2 3 14 chunks +58 lines, -61 lines 0 comments Download
M components/autofill/content/renderer/password_autofill_agent.h View 1 2 chunks +6 lines, -6 lines 0 comments Download
M components/autofill/content/renderer/password_autofill_agent.cc View 1 2 3 5 chunks +59 lines, -19 lines 2 comments Download

Messages

Total messages: 41 (25 generated)
pkalinnikov
Maxim, this is a fork of your crrev/2836653002 with supported suggestions and browsertests fixes. As ...
3 years, 7 months ago (2017-05-19 14:42:16 UTC) #5
pkalinnikov
https://codereview.chromium.org/2889393002/diff/1/components/autofill/content/renderer/password_autofill_agent.cc File components/autofill/content/renderer/password_autofill_agent.cc (right): https://codereview.chromium.org/2889393002/diff/1/components/autofill/content/renderer/password_autofill_agent.cc#newcode57 components/autofill/content/renderer/password_autofill_agent.cc:57: using autofill::form_util::IsWebElementVisible; selfnit: Remove this.
3 years, 7 months ago (2017-05-19 14:44:00 UTC) #6
kolos1
Add Vadym as a reviewer. Let Mathieu review tests when they are ready. I would ...
3 years, 7 months ago (2017-05-19 15:03:18 UTC) #8
kolos1
dvadym@ has ownership for browsertests. Removing autofill folks.
3 years, 7 months ago (2017-05-19 15:19:09 UTC) #10
dvadym
Thanks for implementing this Pavel! In general it looks good. Some comments below https://codereview.chromium.org/2889393002/diff/1/components/autofill/content/renderer/password_autofill_agent.cc File ...
3 years, 7 months ago (2017-05-19 15:36:34 UTC) #11
pkalinnikov
On 2017/05/19 15:03:18, kolos1 wrote: > Add Vadym as a reviewer. Let Mathieu review tests ...
3 years, 7 months ago (2017-05-19 15:52:20 UTC) #12
pkalinnikov
Addressed comments, PTAL. https://codereview.chromium.org/2889393002/diff/1/components/autofill/content/renderer/password_autofill_agent.cc File components/autofill/content/renderer/password_autofill_agent.cc (right): https://codereview.chromium.org/2889393002/diff/1/components/autofill/content/renderer/password_autofill_agent.cc#newcode57 components/autofill/content/renderer/password_autofill_agent.cc:57: using autofill::form_util::IsWebElementVisible; On 2017/05/19 14:44:00, pkalinnikov ...
3 years, 7 months ago (2017-05-24 16:09:49 UTC) #22
dvadym
It looks good. It's left just to add some test. https://codereview.chromium.org/2889393002/diff/40001/components/autofill/content/renderer/password_autofill_agent.cc File components/autofill/content/renderer/password_autofill_agent.cc (right): https://codereview.chromium.org/2889393002/diff/40001/components/autofill/content/renderer/password_autofill_agent.cc#newcode611 ...
3 years, 7 months ago (2017-05-24 16:30:20 UTC) #23
dvadym
This situation could be reproduces in tests: 1.HTML with a change password form is loaded ...
3 years, 7 months ago (2017-05-24 16:33:03 UTC) #24
pkalinnikov
Maxim, Vadym, PTAL. https://codereview.chromium.org/2889393002/diff/40001/components/autofill/content/renderer/password_autofill_agent.cc File components/autofill/content/renderer/password_autofill_agent.cc (right): https://codereview.chromium.org/2889393002/diff/40001/components/autofill/content/renderer/password_autofill_agent.cc#newcode611 components/autofill/content/renderer/password_autofill_agent.cc:611: blink::WebInputElement FindUsernameElementPrecedingPasswordElement( On 2017/05/24 16:30:19, dvadym ...
3 years, 6 months ago (2017-05-29 15:02:21 UTC) #30
kolos1
On 2017/05/29 15:02:21, pkalinnikov wrote: > Maxim, Vadym, PTAL. > > https://codereview.chromium.org/2889393002/diff/40001/components/autofill/content/renderer/password_autofill_agent.cc > File components/autofill/content/renderer/password_autofill_agent.cc ...
3 years, 6 months ago (2017-05-30 05:29:06 UTC) #33
kolos1
https://codereview.chromium.org/2889393002/diff/60001/components/autofill/content/renderer/password_autofill_agent.cc File components/autofill/content/renderer/password_autofill_agent.cc (right): https://codereview.chromium.org/2889393002/diff/60001/components/autofill/content/renderer/password_autofill_agent.cc#newcode948 components/autofill/content/renderer/password_autofill_agent.cc:948: // Otherwise |username_element| has been set above. Optional: } ...
3 years, 6 months ago (2017-05-30 05:44:55 UTC) #34
dvadym
LGTM
3 years, 6 months ago (2017-05-30 09:19:27 UTC) #35
pkalinnikov
Thanks! Submitting. https://codereview.chromium.org/2889393002/diff/60001/components/autofill/content/renderer/password_autofill_agent.cc File components/autofill/content/renderer/password_autofill_agent.cc (right): https://codereview.chromium.org/2889393002/diff/60001/components/autofill/content/renderer/password_autofill_agent.cc#newcode948 components/autofill/content/renderer/password_autofill_agent.cc:948: // Otherwise |username_element| has been set above. ...
3 years, 6 months ago (2017-05-30 09:47:55 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2889393002/60001
3 years, 6 months ago (2017-05-30 09:48:11 UTC) #38
commit-bot: I haz the power
3 years, 6 months ago (2017-05-30 09:51:25 UTC) #41
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/4afdcc3b649fd9e056ccfe078890...

Powered by Google App Engine
This is Rietveld 408576698