Autofill: Do not infer labels from divs with autofillable fields.
commit7db655c1268cca8f2e06eedb2e3ed7a0d01a9aeb
authorthestig <thestig@chromium.org>
Wed, 11 Feb 2015 00:27:25 +0000 (10 16:27 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 11 Feb 2015 00:28:12 +0000 (11 00:28 +0000)
tree7a9b9e55d7701710d69b08e6b301172b2adbc6d6
parente4ae37f992f617f04d4e24160196ed3aa401962d
Autofill: Do not infer labels from divs with autofillable fields.

The label finding algorithm looks at previous divs to see if they contain text, and uses that text as the label. While this works for many webpages, not all webpages are structured this way. For a given field, when the neighbor divs contain input fields, they are likely not to be the label text.

BUG=454366

Review URL: https://codereview.chromium.org/906443002

Cr-Commit-Position: refs/heads/master@{#315688}
chrome/test/data/autofill/heuristics/input/bug_454366.html [new file with mode: 0644]
chrome/test/data/autofill/heuristics/output/bug_454366.out [new file with mode: 0644]
components/autofill/content/renderer/form_autofill_util.cc