Chromium Code Reviews| Index: components/autofill/core/browser/address_field.cc |
| diff --git a/components/autofill/core/browser/address_field.cc b/components/autofill/core/browser/address_field.cc |
| index 2e272b9f93fa161df27e10ffc5dd294775112207..2ef170e2e91dd43a9f025408327d0658b1ab5c5d 100644 |
| --- a/components/autofill/core/browser/address_field.cc |
| +++ b/components/autofill/core/browser/address_field.cc |
| @@ -196,13 +196,21 @@ bool AddressField::ParseZipCode(AutofillScanner* scanner) { |
| if (zip_) |
| return false; |
| - base::string16 pattern = UTF8ToUTF16(autofill::kZipCodeRe); |
| - if (!ParseField(scanner, pattern, &zip_)) |
| + // Some sites use type="tel" for zip fields (to get a numerical input). |
| + // http://crbug.com/426958 |
|
Ilya Sherman
2014/10/24 20:28:13
Ouch.
Evan Stade
2014/10/24 20:32:16
It seems to be pretty prevalent on mobile sites. I
|
| + if (!ParseFieldSpecifics(scanner, |
| + UTF8ToUTF16(autofill::kZipCodeRe), |
| + MATCH_DEFAULT | MATCH_TELEPHONE, |
| + &zip_)) { |
| return false; |
| + } |
| // Look for a zip+4, whose field name will also often contain |
| // the substring "zip". |
| - ParseField(scanner, UTF8ToUTF16(autofill::kZip4Re), &zip4_); |
| + ParseFieldSpecifics(scanner, |
| + UTF8ToUTF16(autofill::kZip4Re), |
| + MATCH_DEFAULT | MATCH_TELEPHONE, |
| + &zip4_); |
| return true; |
| } |