Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Issue 22040002: [Autofill] Add a separate enumeration for HTML field type hints. (Closed)

Created:
7 years, 4 months ago by Ilya Sherman
Modified:
7 years, 4 months ago
Reviewers:
Nicolas Zea, Evan Stade
CC:
chromium-reviews, Raman Kakilate, benquan, jam, ahutter, browser-components-watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, Dane Wallinga, dyu1, Albert Bodenhamer, estade+watch_chromium.org, Ilya Sherman, rouslan+autofillwatch_chromium.org
Visibility:
Public.

Description

[Autofill] Add a separate enumeration for HTML field type hints. The Autofill code currently uses a single enum AutofillFieldType to describe all field types. However, several of the field type hints provided in the HTML autocomplete specification do not map nicely onto the native (server-supported) field types. This CL adds two new enumerations corresponding to the exact types specified in the HTML5 spec, and updates the relevant code to map from these types to the native types that Autofill understands. Implementing support for properly filling 'country' and 'street-address' types will come in subsequent CLs (which should be much smaller, whew!). BUG=254682, 261978 R=estade@chromium.org TBR=zea@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=216149

Patch Set 1 #

Patch Set 2 : Add docs #

Total comments: 24

Patch Set 3 : NativeFieldType -> ServerFieldType #

Patch Set 4 : GetEquivalentNativeType() -> GetStorableType() and other clarifications/nits #

Patch Set 5 : native_type -> storable_type #

Patch Set 6 : Rebase #

Patch Set 7 : Drop all handling of street-address for now #

Patch Set 8 : Revert accidental diff #

Patch Set 9 : Rebase #

Patch Set 10 : Fix browser test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+837 lines, -409 lines) Patch
M chrome/browser/autofill/form_structure_browsertest.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/autofill_helper.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc View 1 2 3 4 5 6 7 9 chunks +21 lines, -14 lines 0 comments Download
M chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc View 1 2 3 4 5 6 chunks +35 lines, -23 lines 0 comments Download
M chrome/browser/ui/autofill/data_model_wrapper.cc View 1 2 3 4 5 6 5 chunks +15 lines, -11 lines 0 comments Download
M chrome/test/data/autofill/heuristics/input/01_autocomplete_attribute_basic.html View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/test/data/autofill/heuristics/output/01_autocomplete_attribute_advanced.out View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/test/data/autofill/heuristics/output/01_autocomplete_attribute_basic.out View 1 2 3 4 5 6 7 8 9 2 chunks +33 lines, -30 lines 0 comments Download
M chrome/test/data/autofill/heuristics/output/01_autocomplete_attribute_invalid.out View 1 2 3 4 5 6 7 8 9 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/test/data/autofill/heuristics/output/01_autocomplete_attribute_malicious.out View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M components/autofill/content/browser/autocheckout_manager.cc View 1 2 3 4 5 3 chunks +14 lines, -11 lines 0 comments Download
M components/autofill/content/browser/wallet/full_wallet.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/content/browser/wallet/wallet_address.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/content/browser/wallet/wallet_items.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/core/browser/address.cc View 1 2 3 4 5 1 chunk +52 lines, -38 lines 0 comments Download
M components/autofill/core/browser/autofill_data_model.cc View 1 2 3 4 5 1 chunk +6 lines, -8 lines 0 comments Download
M components/autofill/core/browser/autofill_field.h View 1 2 2 chunks +11 lines, -2 lines 0 comments Download
M components/autofill/core/browser/autofill_field.cc View 1 2 3 4 5 4 chunks +18 lines, -1 line 0 comments Download
M components/autofill/core/browser/autofill_field_unittest.cc View 1 2 3 4 5 2 chunks +8 lines, -5 lines 0 comments Download
M components/autofill/core/browser/autofill_manager.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/core/browser/autofill_manager_unittest.cc View 1 2 3 4 5 5 chunks +5 lines, -5 lines 0 comments Download
M components/autofill/core/browser/autofill_merge_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/core/browser/autofill_profile.cc View 1 2 3 4 5 6 7 chunks +16 lines, -20 lines 0 comments Download
M components/autofill/core/browser/autofill_type.h View 1 2 3 4 5 6 1 chunk +24 lines, -10 lines 0 comments Download
M components/autofill/core/browser/autofill_type.cc View 1 2 3 4 5 6 7 6 chunks +267 lines, -16 lines 0 comments Download
M components/autofill/core/browser/autofill_type_unittest.cc View 1 2 3 4 5 6 1 chunk +49 lines, -12 lines 0 comments Download
M components/autofill/core/browser/contact_info.cc View 1 2 3 4 1 chunk +39 lines, -24 lines 0 comments Download
M components/autofill/core/browser/credit_card.cc View 1 2 3 4 5 1 chunk +8 lines, -7 lines 0 comments Download
M components/autofill/core/browser/field_types.h View 1 2 3 4 5 6 1 chunk +64 lines, -0 lines 0 comments Download
M components/autofill/core/browser/form_group.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M components/autofill/core/browser/form_structure.h View 1 2 2 chunks +2 lines, -12 lines 0 comments Download
M components/autofill/core/browser/form_structure.cc View 1 2 3 4 5 6 7 8 9 12 chunks +98 lines, -108 lines 0 comments Download
M components/autofill/core/browser/form_structure_unittest.cc View 1 2 2 chunks +9 lines, -6 lines 0 comments Download
M components/autofill/core/browser/personal_data_manager.cc View 1 2 3 4 5 6 4 chunks +4 lines, -5 lines 0 comments Download
M components/autofill/core/browser/phone_number.cc View 1 2 3 4 5 5 chunks +16 lines, -20 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Ilya Sherman
7 years, 4 months ago (2013-08-03 07:13:21 UTC) #1
Ilya Sherman
(Note: There are still a handful of TODOs left in this CL. I am planning ...
7 years, 4 months ago (2013-08-03 07:14:19 UTC) #2
Evan Stade
mostly LG, just worried about subtleties. https://codereview.chromium.org/22040002/diff/5001/chrome/browser/ui/autofill/data_model_wrapper.cc File chrome/browser/ui/autofill/data_model_wrapper.cc (right): https://codereview.chromium.org/22040002/diff/5001/chrome/browser/ui/autofill/data_model_wrapper.cc#newcode126 chrome/browser/ui/autofill/data_model_wrapper.cc:126: HtmlFieldType html_type = ...
7 years, 4 months ago (2013-08-05 18:47:24 UTC) #3
Ilya Sherman
https://chromiumcodereview.appspot.com/22040002/diff/5001/chrome/browser/ui/autofill/data_model_wrapper.cc File chrome/browser/ui/autofill/data_model_wrapper.cc (right): https://chromiumcodereview.appspot.com/22040002/diff/5001/chrome/browser/ui/autofill/data_model_wrapper.cc#newcode126 chrome/browser/ui/autofill/data_model_wrapper.cc:126: HtmlFieldType html_type = field->html_type(); On 2013/08/05 18:47:24, Evan Stade ...
7 years, 4 months ago (2013-08-06 05:05:39 UTC) #4
Evan Stade
https://codereview.chromium.org/22040002/diff/5001/chrome/browser/ui/autofill/data_model_wrapper.cc File chrome/browser/ui/autofill/data_model_wrapper.cc (right): https://codereview.chromium.org/22040002/diff/5001/chrome/browser/ui/autofill/data_model_wrapper.cc#newcode126 chrome/browser/ui/autofill/data_model_wrapper.cc:126: HtmlFieldType html_type = field->html_type(); On 2013/08/06 05:05:39, Ilya Sherman ...
7 years, 4 months ago (2013-08-06 18:39:59 UTC) #5
Ilya Sherman
Could you please also take a look at [ https://chromiumcodereview.appspot.com/22009003/ ]? That CL will need ...
7 years, 4 months ago (2013-08-06 23:04:56 UTC) #6
Evan Stade
lgtm
7 years, 4 months ago (2013-08-06 23:07:35 UTC) #7
Ilya Sherman
TBR zea for chrome/browser/sync/test/integration/autofill_helper.cc
7 years, 4 months ago (2013-08-07 05:01:26 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/isherman@chromium.org/22040002/17004
7 years, 4 months ago (2013-08-07 05:01:46 UTC) #9
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=157261
7 years, 4 months ago (2013-08-07 05:54:55 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/isherman@chromium.org/22040002/112001
7 years, 4 months ago (2013-08-07 06:18:04 UTC) #11
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 4 months ago (2013-08-07 06:25:17 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/isherman@chromium.org/22040002/112001
7 years, 4 months ago (2013-08-07 06:31:06 UTC) #13
commit-bot: I haz the power
7 years, 4 months ago (2013-08-07 10:17:18 UTC) #14
Message was sent while issue was closed.
Change committed as 216149

Powered by Google App Engine
This is Rietveld 408576698