OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/autofill/core/browser/form_field.h" | 5 #include "components/autofill/core/browser/form_field.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cstddef> | 8 #include <cstddef> |
9 #include <iterator> | 9 #include <iterator> |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 #include <utility> | 12 #include <utility> |
13 | 13 |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
16 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "components/autofill/core/browser/address_field.h" | 18 #include "components/autofill/core/browser/address_field.h" |
19 #include "components/autofill/core/browser/autofill_field.h" | 19 #include "components/autofill/core/browser/autofill_field.h" |
20 #include "components/autofill/core/browser/autofill_scanner.h" | 20 #include "components/autofill/core/browser/autofill_scanner.h" |
21 #include "components/autofill/core/browser/credit_card_field.h" | 21 #include "components/autofill/core/browser/credit_card_field.h" |
22 #include "components/autofill/core/browser/email_field.h" | 22 #include "components/autofill/core/browser/email_field.h" |
23 #include "components/autofill/core/browser/form_structure.h" | 23 #include "components/autofill/core/browser/form_structure.h" |
24 #include "components/autofill/core/browser/name_field.h" | 24 #include "components/autofill/core/browser/name_field.h" |
25 #include "components/autofill/core/browser/phone_field.h" | 25 #include "components/autofill/core/browser/phone_field.h" |
26 #include "components/autofill/core/common/autofill_regexes.h" | 26 #include "components/autofill/core/common/autofill_regexes.h" |
27 #include "components/autofill/core/common/autofill_util.h" | |
vabr (Chromium)
2016/09/07 16:18:06
For what is this #include needed?
kolos1
2016/09/08 08:34:27
I moved IsCheckable to autofill_util.h. IsCheckabl
| |
27 | 28 |
28 namespace autofill { | 29 namespace autofill { |
29 namespace { | 30 namespace { |
30 | 31 |
31 bool ShouldBeProcessed(const AutofillField* field) { | 32 bool ShouldBeProcessed(const AutofillField* field) { |
32 // Ignore checkable fields as they interfere with parsers assuming context. | 33 // Ignore checkable fields as they interfere with parsers assuming context. |
33 // Eg., while parsing address, "Is PO box" checkbox after ADDRESS_LINE1 | 34 // Eg., while parsing address, "Is PO box" checkbox after ADDRESS_LINE1 |
34 // interferes with correctly understanding ADDRESS_LINE2. | 35 // interferes with correctly understanding ADDRESS_LINE2. |
35 // Ignore fields marked as presentational. See | 36 // Ignore fields marked as presentational. See |
36 // http://www.w3.org/TR/wai-aria/roles#presentation | 37 // http://www.w3.org/TR/wai-aria/roles#presentation |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
205 if ((match_type & MATCH_PASSWORD) && type == "password") | 206 if ((match_type & MATCH_PASSWORD) && type == "password") |
206 return true; | 207 return true; |
207 | 208 |
208 if ((match_type & MATCH_NUMBER) && type == "number") | 209 if ((match_type & MATCH_NUMBER) && type == "number") |
209 return true; | 210 return true; |
210 | 211 |
211 return false; | 212 return false; |
212 } | 213 } |
213 | 214 |
214 } // namespace autofill | 215 } // namespace autofill |
OLD | NEW |