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

Issue 1508293006: Check url path as well as document title to detect formless autofill page (Closed)

Created:
5 years ago by Joe Mason
Modified:
4 years, 11 months ago
CC:
bondd+autofillwatch_chromium.org, browser-components-watch_chromium.org, chromium-reviews, darin-cc_chromium.org, estade+watch_chromium.org, jam, jdonnelly+autofillwatch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, rouslan+autofill_chromium.org, vabr+watchlistautofill_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Check url path as well as document title to detect formless autofill page Autofill checks the document title on page load to decide whether input elements outside forms should be considered part of a checkout flow. Also check the path part of the url for documents without a title tag. Originally the title check used a case-insensitive regex but http://crrev.com/1419373006 replaced that with a string compare for performance. As a side effect this made the comparison case-sensitive. This patch also restores the case-insensitive title comparison. BUG=555010 Committed: https://crrev.com/46bebf29983b58a58732216a7ed5740a43024397 Cr-Commit-Position: refs/heads/master@{#369436}

Patch Set 1 #

Patch Set 2 : Fix non-English detection #

Total comments: 4

Patch Set 3 : Get rid of UTF8 conversion #

Patch Set 4 : Fix typo in comment #

Total comments: 8

Patch Set 5 : Add non-ASCII tests #

Total comments: 7

Patch Set 6 : Rebase and fix nit #

Patch Set 7 : Fix more nits: use ternary operator, make param name match doc comment #

Patch Set 8 : Fix trybot warnings #

Patch Set 9 : More trybot warnings #

Patch Set 10 : – Rebaseline heuristic test output #

Unified diffs Side-by-side diffs Delta from patch set Stats (+615 lines, -60 lines) Patch
M chrome/renderer/autofill/form_autofill_browsertest.cc View 1 2 3 4 5 10 chunks +164 lines, -11 lines 0 comments Download
A chrome/test/data/autofill/heuristics/input/bug_555010.html View 1 chunk +282 lines, -0 lines 0 comments Download
A chrome/test/data/autofill/heuristics/output/bug_555010.out View 1 2 3 4 5 6 7 8 9 1 chunk +22 lines, -0 lines 0 comments Download
M components/autofill/content/renderer/form_autofill_util.cc View 1 2 3 4 5 1 chunk +44 lines, -27 lines 0 comments Download
M content/public/test/render_view_test.h View 1 2 3 4 5 6 3 chunks +16 lines, -10 lines 0 comments Download
M content/public/test/render_view_test.cc View 1 2 3 4 5 6 7 8 4 chunks +87 lines, -12 lines 0 comments Download

Messages

Total messages: 56 (21 generated)
Joe Mason
estade@chromium.org: Please review all changes. sky@chromium.org: Please review changes in content/public/test/render_view_test.*
5 years ago (2015-12-10 18:49:59 UTC) #2
Evan Stade
https://codereview.chromium.org/1508293006/diff/20001/components/autofill/content/renderer/form_autofill_util.cc File components/autofill/content/renderer/form_autofill_util.cc (right): https://codereview.chromium.org/1508293006/diff/20001/components/autofill/content/renderer/form_autofill_util.cc#newcode1446 components/autofill/content/renderer/form_autofill_util.cc:1446: if (title.find(keyword) != base::string16::npos || I think you should ...
5 years ago (2015-12-10 19:34:00 UTC) #3
Joe Mason
https://codereview.chromium.org/1508293006/diff/20001/components/autofill/content/renderer/form_autofill_util.cc File components/autofill/content/renderer/form_autofill_util.cc (right): https://codereview.chromium.org/1508293006/diff/20001/components/autofill/content/renderer/form_autofill_util.cc#newcode1446 components/autofill/content/renderer/form_autofill_util.cc:1446: if (title.find(keyword) != base::string16::npos || On 2015/12/10 19:34:00, Evan ...
5 years ago (2015-12-10 20:06:59 UTC) #4
Evan Stade
https://codereview.chromium.org/1508293006/diff/20001/components/autofill/content/renderer/form_autofill_util.cc File components/autofill/content/renderer/form_autofill_util.cc (right): https://codereview.chromium.org/1508293006/diff/20001/components/autofill/content/renderer/form_autofill_util.cc#newcode1446 components/autofill/content/renderer/form_autofill_util.cc:1446: if (title.find(keyword) != base::string16::npos || On 2015/12/10 20:06:58, joenotcharles ...
5 years ago (2015-12-10 21:21:11 UTC) #5
Joe Mason
On 2015/12/10 21:21:11, Evan Stade wrote: > You're right, probably not a huge difference, but ...
5 years ago (2015-12-10 23:10:09 UTC) #6
Evan Stade
On 2015/12/10 23:10:09, joenotcharles wrote: > On 2015/12/10 21:21:11, Evan Stade wrote: > > You're ...
5 years ago (2015-12-10 23:30:42 UTC) #7
Joe Mason
https://codereview.chromium.org/1508293006/diff/20001/components/autofill/content/renderer/form_autofill_util.cc File components/autofill/content/renderer/form_autofill_util.cc (right): https://codereview.chromium.org/1508293006/diff/20001/components/autofill/content/renderer/form_autofill_util.cc#newcode1446 components/autofill/content/renderer/form_autofill_util.cc:1446: if (title.find(keyword) != base::string16::npos || On 2015/12/10 21:21:11, Evan ...
5 years ago (2015-12-11 20:41:43 UTC) #8
Evan Stade
OK, so I guess my squeamishness comes from trying to convert to ASCII when a ...
5 years ago (2015-12-11 23:44:45 UTC) #10
Joe Mason
On 2015/12/11 23:44:45, Evan Stade wrote: > OK, so I guess my squeamishness comes from ...
5 years ago (2015-12-14 15:07:02 UTC) #11
Joe Mason
https://codereview.chromium.org/1508293006/diff/60001/chrome/renderer/autofill/form_autofill_browsertest.cc File chrome/renderer/autofill/form_autofill_browsertest.cc (right): https://codereview.chromium.org/1508293006/diff/60001/chrome/renderer/autofill/form_autofill_browsertest.cc#newcode202 chrome/renderer/autofill/form_autofill_browsertest.cc:202: On 2015/12/11 23:44:45, Evan Stade wrote: > remove extra ...
5 years ago (2015-12-14 16:07:18 UTC) #12
Joe Mason
Added phajdan.jr since sky is OOO - please review changes in content/public/test/render_view_test.*
5 years ago (2015-12-14 16:10:45 UTC) #15
Evan Stade
ping jshin, see comment 10 and previous discussion about form_autofill_util.cc
5 years ago (2015-12-14 20:17:20 UTC) #16
jungshik at Google
Sorry for the delay. I'll look at what Evan talked about in the next comment. ...
5 years ago (2015-12-14 23:53:57 UTC) #17
jungshik at Google
Sorry for the delay. I'll look at what Evan talked about in the next comment.
5 years ago (2015-12-14 23:54:01 UTC) #18
jungshik at Google
https://codereview.chromium.org/1508293006/diff/80001/chrome/renderer/autofill/form_autofill_browsertest.cc File chrome/renderer/autofill/form_autofill_browsertest.cc (right): https://codereview.chromium.org/1508293006/diff/80001/chrome/renderer/autofill/form_autofill_browsertest.cc#newcode373 chrome/renderer/autofill/form_autofill_browsertest.cc:373: expected.value = ASCIIToUTF16(field_cases[i].initial_value); It's not in this CL, but ...
5 years ago (2015-12-16 21:14:04 UTC) #19
Evan Stade
https://codereview.chromium.org/1508293006/diff/80001/chrome/renderer/autofill/form_autofill_browsertest.cc File chrome/renderer/autofill/form_autofill_browsertest.cc (right): https://codereview.chromium.org/1508293006/diff/80001/chrome/renderer/autofill/form_autofill_browsertest.cc#newcode377 chrome/renderer/autofill/form_autofill_browsertest.cc:377: form_data.fields[i].value = ASCIIToUTF16(field_cases[i].autofill_value); On 2015/12/16 21:14:04, jshin (jungshik at ...
5 years ago (2015-12-16 22:21:35 UTC) #20
jungshik at Google
On 2015/12/16 22:21:35, Evan Stade wrote: > https://codereview.chromium.org/1508293006/diff/80001/chrome/renderer/autofill/form_autofill_browsertest.cc > File chrome/renderer/autofill/form_autofill_browsertest.cc (right): > > https://codereview.chromium.org/1508293006/diff/80001/chrome/renderer/autofill/form_autofill_browsertest.cc#newcode377 ...
5 years ago (2015-12-18 23:05:30 UTC) #21
Joe Mason
On 2015/12/16 21:14:04, jshin (out until Jan 3) wrote: > https://codereview.chromium.org/1508293006/diff/80001/chrome/renderer/autofill/form_autofill_browsertest.cc > File chrome/renderer/autofill/form_autofill_browsertest.cc (right): ...
4 years, 11 months ago (2015-12-29 20:02:18 UTC) #22
Joe Mason
> I filed crbug.com/572973 for these issues. Sorry, I replied to the wrong comment. crbug.com/572973 ...
4 years, 11 months ago (2015-12-29 20:05:20 UTC) #23
Joe Mason
Another friendly ping.
4 years, 11 months ago (2016-01-08 19:31:26 UTC) #24
Evan Stade
sorry, lgtm w/nit https://codereview.chromium.org/1508293006/diff/80001/components/autofill/content/renderer/form_autofill_util.cc File components/autofill/content/renderer/form_autofill_util.cc (right): https://codereview.chromium.org/1508293006/diff/80001/components/autofill/content/renderer/form_autofill_util.cc#newcode1458 components/autofill/content/renderer/form_autofill_util.cc:1458: return UnownedFormElementsAndFieldSetsToFormData( seems like you can ...
4 years, 11 months ago (2016-01-08 21:53:16 UTC) #25
Paweł Hajdan Jr.
content/public/test LGTM
4 years, 11 months ago (2016-01-11 12:52:20 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1508293006/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1508293006/80001
4 years, 11 months ago (2016-01-11 14:52:45 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/127677)
4 years, 11 months ago (2016-01-11 15:04:29 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1508293006/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1508293006/120001
4 years, 11 months ago (2016-01-13 19:17:10 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/110671) linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 11 months ago (2016-01-13 19:35:41 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1508293006/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1508293006/140001
4 years, 11 months ago (2016-01-13 19:46:23 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_ng/builds/35929) linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 11 months ago (2016-01-13 20:02:26 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1508293006/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1508293006/160001
4 years, 11 months ago (2016-01-13 20:37:06 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_compile_dbg_32_ng on ...
4 years, 11 months ago (2016-01-13 23:43:04 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1508293006/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1508293006/160001
4 years, 11 months ago (2016-01-14 01:41:37 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/159245)
4 years, 11 months ago (2016-01-14 03:49:30 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1508293006/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1508293006/180001
4 years, 11 months ago (2016-01-14 15:43:10 UTC) #52
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 11 months ago (2016-01-14 17:00:41 UTC) #54
commit-bot: I haz the power
4 years, 11 months ago (2016-01-14 17:01:42 UTC) #56
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/46bebf29983b58a58732216a7ed5740a43024397
Cr-Commit-Position: refs/heads/master@{#369436}

Powered by Google App Engine
This is Rietveld 408576698