diff options
author | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-06 20:47:02 +0000 |
---|---|---|
committer | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-06 20:47:02 +0000 |
commit | 718b1465c8916ac5b912ee57d6448ff8d772e414 (patch) | |
tree | 9a945b87509044d1f294117fce5db59c8089afb8 /chrome/browser/autofill/address_field.cc | |
parent | b4df7a890a13b1fcb6433957ead464b0a11bc6bb (diff) | |
download | chromium_src-718b1465c8916ac5b912ee57d6448ff8d772e414.zip chromium_src-718b1465c8916ac5b912ee57d6448ff8d772e414.tar.gz chromium_src-718b1465c8916ac5b912ee57d6448ff8d772e414.tar.bz2 |
AutoFill address filling when labels are missing.
When labels are missing but 'name' attributes are set we now fill addresses correctly.
BUG=38320
TEST=AddressFieldTest, FormStructureTest, manual testing with cc.html (attached).
Review URL: http://codereview.chromium.org/1517019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43755 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/address_field.cc')
-rw-r--r-- | chrome/browser/autofill/address_field.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/autofill/address_field.cc b/chrome/browser/autofill/address_field.cc index 2c94af8..9567966 100644 --- a/chrome/browser/autofill/address_field.cc +++ b/chrome/browser/autofill/address_field.cc @@ -213,10 +213,11 @@ bool AddressField::ParseAddressLines( pattern = GetEcmlPattern(kEcmlShipToAddress2, kEcmlBillToAddress2, '|'); } else { - pattern = ASCIIToUTF16("^$|address|address2|street|street_line2|addr2"); + pattern = ASCIIToUTF16("address|address2|street|street_line2|addr2"); } - ParseText(iter, pattern, &address_field->address2_); + if (!ParseEmptyText(iter, &address_field->address2_)) + ParseText(iter, pattern, &address_field->address2_); return true; } |