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

Issue 819193003: Fix list focus after tab key in chrome://settings/autofillEditAddress page. (Closed)

Created:
6 years ago by bondd
Modified:
5 years, 10 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, estade+watch_chromium.org, arv+watch_chromium.org, rouslan+autofillwatch_chromium.org, hcarmona
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix two focus regressions in chrome://settings/autofillEditAddress page. Sets list item selection and focus correctly when edit is committed in name/phone/email lists on chrome://settings/autofillEditAddress page. "Correctly" means the just-edited list item remains the selected item in the list, and the next focusable element after the list gets focus. The list no longer has focus, but if the user gives focus back to the list using tab/shift+tab then the just-edited list item will receive focus. This is different than the default InlineEditableItemList behavior because most addresses will have only a single name/phone/email, so it's better to move to the next field type rather than to the "Add another" placeholder of the same field type. I tried to keep the changes contained to autofill_options_list.js because that's the only page that needs this focus behavior. Generalizing the code into inline_editable_list.js might result in more regressions to fix elsewhere. The fix implementation is to disable list events during list operations in autofillOptions.ValuesListItem.onEditCommitted_, so that focus is not returned back to the list that was just tabbed away from. Then onEditCommitted_ calls the new InlineEditableItemList.SelectIndexWithoutFocusing method to set the selected list item without setting focus back to the list. Same fix for both regressions. https://crbug.com/440760 was caused by me. https://crbug.com/443491 was from a CL by hcarmona@, but we agreed I should take it because I'm more familiar with this code. BUG=440760, 443491 Committed: https://crrev.com/10a45b9048e77944987d387b0eff3b5fcfd7a0bc Cr-Commit-Position: refs/heads/master@{#314675}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address reviewer comments on patch set 1. #

Patch Set 3 : Add tests. #

Total comments: 3

Patch Set 4 : Add wrapper for disabling events. #

Total comments: 11

Patch Set 5 : Address reviewer comments on patch set 4. #

Total comments: 20

Patch Set 6 : Address reviewer comments on patch set 5. #

Total comments: 13

Patch Set 7 : Fix nits in patch set 6. #

Patch Set 8 : Make UI test work for phone list. #

Total comments: 9

Patch Set 9 : Move WindowedPersonalDataManagerObserver entirely into cc file. #

Total comments: 4

Patch Set 10 : Rename WindowedPersonalDataManagerObserver and add TODOs. #

Patch Set 11 : Rebase. #

Patch Set 12 : Temp try test: press shift+tab twice. #

Patch Set 13 : Temp try test: call CreateTestProfile() for all tests. #

Patch Set 14 : Temp try test: revert b440646 and b444507. Add log message at start of 'add' and 'edit' parts of te… #

Patch Set 15 : Temp try test: add ListenForFirstItemSelected. #

Patch Set 16 : Temp try test: re-apply b440646, b444507 and 'press shift+tab twice' fix. #

Patch Set 17 : Temp try test: add ListenForCommitEdit. #

Patch Set 18 : Temp try test: disable tests for TOOLKIT_VIEWS. #

Total comments: 1

Patch Set 19 : Add skip_ok_button for Windows and ChromeOS. #

Total comments: 4

Patch Set 20 : Remove a couple log statements and add a comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+598 lines, -105 lines) Patch
M chrome/browser/autofill/autofill_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/autofill/autofill_interactive_uitest.cc View 1 2 3 4 5 6 7 8 10 chunks +6 lines, -94 lines 0 comments Download
M chrome/browser/autofill/autofill_server_browsertest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
A chrome/browser/autofill/autofill_uitest_util.h View 1 2 3 4 5 6 7 8 1 chunk +22 lines, -0 lines 0 comments Download
A chrome/browser/autofill/autofill_uitest_util.cc View 1 2 3 4 5 6 7 8 9 1 chunk +104 lines, -0 lines 0 comments Download
M chrome/browser/resources/options/autofill_options_list.js View 1 2 3 4 5 6 7 8 9 10 14 15 3 chunks +14 lines, -7 lines 0 comments Download
M chrome/browser/resources/options/inline_editable_list.js View 1 2 3 4 5 6 7 8 9 10 14 15 4 chunks +62 lines, -1 line 0 comments Download
A chrome/browser/ui/webui/options/autofill_options_interactive_uitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +380 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -1 line 0 comments Download
M components/autofill/core/browser/personal_data_manager.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (13 generated)
bondd
I racked my brain trying to find a better way to do this but no ...
6 years ago (2014-12-23 02:11:55 UTC) #3
James Hawkins
Can you add an explanation to the CL description why this particular fix is necessary ...
5 years, 11 months ago (2015-01-06 18:54:51 UTC) #6
bondd
Addressed reviewer comments and added requested details to CL description. https://codereview.chromium.org/819193003/diff/1/chrome/browser/resources/options/inline_editable_list.js File chrome/browser/resources/options/inline_editable_list.js (right): https://codereview.chromium.org/819193003/diff/1/chrome/browser/resources/options/inline_editable_list.js#newcode582 ...
5 years, 11 months ago (2015-01-06 23:07:24 UTC) #7
James Hawkins
On 2015/01/06 23:07:24, bondd wrote: > Addressed reviewer comments and added requested details to CL ...
5 years, 11 months ago (2015-01-08 18:34:38 UTC) #8
bondd
Added tests. Tests check for regression of both bugs: http://crbug.com/440760 and http://crbug.com/443491 name and email ...
5 years, 11 months ago (2015-01-14 00:33:43 UTC) #9
James Hawkins
https://codereview.chromium.org/819193003/diff/40001/chrome/browser/resources/options/autofill_options_list.js File chrome/browser/resources/options/autofill_options_list.js (right): https://codereview.chromium.org/819193003/diff/40001/chrome/browser/resources/options/autofill_options_list.js#newcode211 chrome/browser/resources/options/autofill_options_list.js:211: this.list.eventsDisabled = true; This seems really fragile. I'm really ...
5 years, 11 months ago (2015-01-14 17:32:52 UTC) #10
bondd
https://codereview.chromium.org/819193003/diff/40001/chrome/browser/resources/options/autofill_options_list.js File chrome/browser/resources/options/autofill_options_list.js (right): https://codereview.chromium.org/819193003/diff/40001/chrome/browser/resources/options/autofill_options_list.js#newcode211 chrome/browser/resources/options/autofill_options_list.js:211: this.list.eventsDisabled = true; On 2015/01/14 17:32:52, James Hawkins wrote: ...
5 years, 11 months ago (2015-01-14 23:13:54 UTC) #11
James Hawkins
On 2015/01/14 23:13:54, bondd wrote: > https://codereview.chromium.org/819193003/diff/40001/chrome/browser/resources/options/autofill_options_list.js > File chrome/browser/resources/options/autofill_options_list.js (right): > > https://codereview.chromium.org/819193003/diff/40001/chrome/browser/resources/options/autofill_options_list.js#newcode211 > ...
5 years, 11 months ago (2015-01-14 23:17:11 UTC) #12
bondd
Added wrapper function for disabling events. Good idea, it's definitely better and safer this way. ...
5 years, 11 months ago (2015-01-15 03:04:02 UTC) #13
James Hawkins
I'm really concerned that we're piling hacks on top of hacks. I'd like to revisit ...
5 years, 11 months ago (2015-01-15 16:10:44 UTC) #14
Dan Beam
Changing the data or selection models should probably change the UI by default. Most classes ...
5 years, 11 months ago (2015-01-21 18:18:08 UTC) #16
bondd
On 2015/01/21 18:18:08, Dan Beam wrote: > Changing the data or selection models should probably ...
5 years, 11 months ago (2015-01-22 01:05:05 UTC) #18
bondd
https://codereview.chromium.org/819193003/diff/1/chrome/browser/resources/options/autofill_options_list.js File chrome/browser/resources/options/autofill_options_list.js (right): https://codereview.chromium.org/819193003/diff/1/chrome/browser/resources/options/autofill_options_list.js#newcode225 chrome/browser/resources/options/autofill_options_list.js:225: } On 2015/01/21 18:18:07, Dan Beam wrote: > } ...
5 years, 11 months ago (2015-01-22 01:05:23 UTC) #19
Dan Beam
https://codereview.chromium.org/819193003/diff/100001/chrome/browser/resources/options/autofill_options_list.js File chrome/browser/resources/options/autofill_options_list.js (right): https://codereview.chromium.org/819193003/diff/100001/chrome/browser/resources/options/autofill_options_list.js#newcode211 chrome/browser/resources/options/autofill_options_list.js:211: this.list.executeWithChangeEventsDisabled(function() { i guess this pattern is ok, but: ...
5 years, 11 months ago (2015-01-22 05:38:49 UTC) #20
bondd
https://codereview.chromium.org/819193003/diff/100001/chrome/browser/resources/options/autofill_options_list.js File chrome/browser/resources/options/autofill_options_list.js (right): https://codereview.chromium.org/819193003/diff/100001/chrome/browser/resources/options/autofill_options_list.js#newcode211 chrome/browser/resources/options/autofill_options_list.js:211: this.list.executeWithChangeEventsDisabled(function() { On 2015/01/22 05:38:48, Dan Beam wrote: > ...
5 years, 11 months ago (2015-01-22 20:23:58 UTC) #21
Dan Beam
https://codereview.chromium.org/819193003/diff/120001/chrome/browser/resources/options/inline_editable_list.js File chrome/browser/resources/options/inline_editable_list.js (right): https://codereview.chromium.org/819193003/diff/120001/chrome/browser/resources/options/inline_editable_list.js#newcode687 chrome/browser/resources/options/inline_editable_list.js:687: this.ignoreChangeEventsCount_++; leaving as boolean and doing: assert(!this.ignoreChangeEvents_); is easier ...
5 years, 11 months ago (2015-01-23 22:46:15 UTC) #22
bondd
Enable phone list test and made it work with validation callback. Phone list validation requires ...
5 years, 10 months ago (2015-01-29 19:01:02 UTC) #26
Dan Beam
lgtm https://codereview.chromium.org/819193003/diff/180001/chrome/browser/autofill/autofill_uitest_util.cc File chrome/browser/autofill/autofill_uitest_util.cc (right): https://codereview.chromium.org/819193003/diff/180001/chrome/browser/autofill/autofill_uitest_util.cc#newcode61 chrome/browser/autofill/autofill_uitest_util.cc:61: PersonalDataManager* GetPersonalDataManager(Browser* browser) { nit: ask for a ...
5 years, 10 months ago (2015-01-29 19:31:45 UTC) #27
Evan Stade
https://codereview.chromium.org/819193003/diff/180001/chrome/browser/autofill/autofill_uitest_util.cc File chrome/browser/autofill/autofill_uitest_util.cc (right): https://codereview.chromium.org/819193003/diff/180001/chrome/browser/autofill/autofill_uitest_util.cc#newcode67 chrome/browser/autofill/autofill_uitest_util.cc:67: test::SetProfileInfo( why not GetFullProfile()? https://codereview.chromium.org/819193003/diff/180001/chrome/browser/autofill/autofill_uitest_util.h File chrome/browser/autofill/autofill_uitest_util.h (right): https://codereview.chromium.org/819193003/diff/180001/chrome/browser/autofill/autofill_uitest_util.h#newcode19 ...
5 years, 10 months ago (2015-01-29 22:20:11 UTC) #29
bondd
estade@: I moved WindowedPersonalDataManagerObserver entirely to the cc file as you suggested. It required moving ...
5 years, 10 months ago (2015-01-30 04:10:35 UTC) #31
Evan Stade
https://codereview.chromium.org/819193003/diff/220001/chrome/browser/autofill/autofill_uitest_util.cc File chrome/browser/autofill/autofill_uitest_util.cc (right): https://codereview.chromium.org/819193003/diff/220001/chrome/browser/autofill/autofill_uitest_util.cc#newcode19 chrome/browser/autofill/autofill_uitest_util.cc:19: // This class is used to wait for asynchronous ...
5 years, 10 months ago (2015-01-30 19:16:33 UTC) #32
bondd
https://codereview.chromium.org/819193003/diff/220001/chrome/browser/autofill/autofill_uitest_util.cc File chrome/browser/autofill/autofill_uitest_util.cc (right): https://codereview.chromium.org/819193003/diff/220001/chrome/browser/autofill/autofill_uitest_util.cc#newcode19 chrome/browser/autofill/autofill_uitest_util.cc:19: // This class is used to wait for asynchronous ...
5 years, 10 months ago (2015-01-30 20:24:17 UTC) #33
Evan Stade
On 2015/01/30 20:24:17, bondd wrote: > https://codereview.chromium.org/819193003/diff/220001/chrome/browser/autofill/autofill_uitest_util.cc > File chrome/browser/autofill/autofill_uitest_util.cc (right): > > https://codereview.chromium.org/819193003/diff/220001/chrome/browser/autofill/autofill_uitest_util.cc#newcode19 > ...
5 years, 10 months ago (2015-01-30 20:32:47 UTC) #34
bondd
Renamed WindowedPersonalDataManagerObserver to PdmChangeWaiter. Noticed WindowedPersonalDataManagerObserver is duplicated in two places in other test code. ...
5 years, 10 months ago (2015-01-30 22:10:00 UTC) #35
Evan Stade
lgtm
5 years, 10 months ago (2015-01-30 22:26:41 UTC) #36
Dan Beam
if you'd like to commit now and let me fix the button strip issue, that's ...
5 years, 10 months ago (2015-02-04 19:50:46 UTC) #37
Dan Beam
lgtm https://codereview.chromium.org/819193003/diff/420001/chrome/browser/ui/webui/options/autofill_options_interactive_uitest.cc File chrome/browser/ui/webui/options/autofill_options_interactive_uitest.cc (right): https://codereview.chromium.org/819193003/diff/420001/chrome/browser/ui/webui/options/autofill_options_interactive_uitest.cc#newcode296 chrome/browser/ui/webui/options/autofill_options_interactive_uitest.cc:296: LOG(INFO) << "Starting TestEditAddressListTabKeyEditItem"; remove debugging statements https://codereview.chromium.org/819193003/diff/420001/chrome/browser/ui/webui/options/autofill_options_interactive_uitest.cc#newcode375 ...
5 years, 10 months ago (2015-02-04 20:47:31 UTC) #38
bondd
https://codereview.chromium.org/819193003/diff/420001/chrome/browser/ui/webui/options/autofill_options_interactive_uitest.cc File chrome/browser/ui/webui/options/autofill_options_interactive_uitest.cc (right): https://codereview.chromium.org/819193003/diff/420001/chrome/browser/ui/webui/options/autofill_options_interactive_uitest.cc#newcode296 chrome/browser/ui/webui/options/autofill_options_interactive_uitest.cc:296: LOG(INFO) << "Starting TestEditAddressListTabKeyEditItem"; On 2015/02/04 20:47:29, Dan Beam ...
5 years, 10 months ago (2015-02-04 22:14:17 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/819193003/440001
5 years, 10 months ago (2015-02-04 22:14:56 UTC) #42
commit-bot: I haz the power
Committed patchset #20 (id:440001)
5 years, 10 months ago (2015-02-04 23:30:25 UTC) #43
commit-bot: I haz the power
5 years, 10 months ago (2015-02-04 23:31:56 UTC) #44
Message was sent while issue was closed.
Patchset 20 (id:??) landed as
https://crrev.com/10a45b9048e77944987d387b0eff3b5fcfd7a0bc
Cr-Commit-Position: refs/heads/master@{#314675}

Powered by Google App Engine
This is Rietveld 408576698