|
Improve Autofill heuristics when detecting labels from previous elements.
Support HTML like """Name <span class="required">*</span> <input type="text" name="name">"""
Of course, pull at a thread and...
Other changes also included to avoid regressions:
* When parsing address fields for heuristics, we try to skip over unlabeled fields in the middle of an address. Updated the code not to also skip over unlabeled fields at the *end* of an address, as these might be part of a different section entirely.
* Tighten the credit card number regex to require the word "card".
* Add "csc" to the credit card security code regex.
* When inferring labels based on <div> structure, be willing to scan up the tree past the closest parent that is a <div>.
* Also when inferring labels based on <div> structure, we previously would only stop early if we were about to escape from a <table> element. Also stop early if we are about to escape from a <fieldset> element. If we see either of these elements, we expect the field label to be contained with the element.
* Allow <label> elements to misuse the 'for' attribute to specify the element's name rather than its id.
BUG= 87517
TEST=browser_tests --gtest_filter=FormStructureBrowserTest.DataDrivenHeuristics*
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=95019
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1512 lines, -205 lines) |
Patch |
 |
M |
chrome/browser/autofill/address_field.cc
|
View
|
1
|
4 chunks |
+16 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/autofill/autofill_resources.grd
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/autofill/form_structure_browsertest.cc
|
View
|
1
2
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/renderer/autofill/form_manager.cc
|
View
|
1
2
3
|
11 chunks |
+136 lines, -111 lines |
0 comments
|
Download
|
 |
A |
chrome/test/data/autofill/heuristics/input/16_crbug_87517.html
|
View
|
|
1 chunk |
+1229 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/02_checkout_ae.com.out
|
View
|
1
2
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/03_checkout_crutchfield.com.out
|
View
|
1
2
|
1 chunk |
+14 lines, -14 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/03_checkout_gamestop.com.out
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/04_checkout_ikea.com.out
|
View
|
1
2
|
1 chunk |
+12 lines, -12 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/04_checkout_jr.com.out
|
View
|
1
2
|
1 chunk |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/04_checkout_lowes.com.out
|
View
|
1
2
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/05_checkout_nordstrom.com.out
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/05_checkout_petco.com.out
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/06_checkout_qvc.com.out
|
View
|
1
2
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/06_checkout_urbanoutfitters.com.out
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/09_register_ebay.com.out
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/09_register_ecomm.dell.com.out
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/10_register_jbox.com.out
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/12_register_officedepot.com.out
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
|
chrome/test/data/autofill/heuristics/output/13_register_supershuttle.com.out
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/14_register_yahoo.com.out
|
View
|
1
2
|
1 chunk |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/15_crbug_40687.out
|
View
|
1
2
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/autofill/heuristics/output/15_crbug_53075.out
|
View
|
1
2
|
1 chunk |
+19 lines, -19 lines |
0 comments
|
Download
|
 |
A |
chrome/test/data/autofill/heuristics/output/16_crbug_87517.out
|
View
|
1
|
1 chunk |
+32 lines, -0 lines |
0 comments
|
Download
|
Total messages: 4 (0 generated)
|