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

Side by Side Diff: chrome/browser/resources/options/autofill_options_list.js

Issue 683813004: Fewer focusable items in chrome://settings/searchEngines (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment about weird behavior in autofill_options_browsertest.js Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 cr.define('options.autofillOptions', function() { 5 cr.define('options.autofillOptions', function() {
6 /** @const */ var DeletableItem = options.DeletableItem; 6 /** @const */ var DeletableItem = options.DeletableItem;
7 /** @const */ var DeletableItemList = options.DeletableItemList; 7 /** @const */ var DeletableItemList = options.DeletableItemList;
8 /** @const */ var InlineEditableItem = options.InlineEditableItem; 8 /** @const */ var InlineEditableItem = options.InlineEditableItem;
9 /** @const */ var InlineEditableItemList = options.InlineEditableItemList; 9 /** @const */ var InlineEditableItemList = options.InlineEditableItemList;
10 10
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 InlineEditableItemList.prototype.handleListFocusChange_.call(this, e); 448 InlineEditableItemList.prototype.handleListFocusChange_.call(this, e);
449 449
450 if (!e.newValue) { 450 if (!e.newValue) {
451 // When the list loses focus, unselect all the elements. 451 // When the list loses focus, unselect all the elements.
452 this.selectionModel.unselectAll(); 452 this.selectionModel.unselectAll();
453 } else { 453 } else {
454 // When the list gains focus, select the first item if nothing else is 454 // When the list gains focus, select the first item if nothing else is
455 // selected. 455 // selected.
456 var firstItem = this.getListItemByIndex(0); 456 var firstItem = this.getListItemByIndex(0);
457 if (!selectedItem && firstItem && e.newValue) 457 if (!selectedItem && firstItem && e.newValue)
458 firstItem.handleFocus_(); 458 firstItem.handleFocus();
459 } 459 }
460 }, 460 },
461 461
462 /** 462 /**
463 * Called when a new list item should be validated; subclasses are 463 * Called when a new list item should be validated; subclasses are
464 * responsible for implementing if validation is required. 464 * responsible for implementing if validation is required.
465 * @param {number} index The index of the item that was inserted or changed. 465 * @param {number} index The index of the item that was inserted or changed.
466 * @param {number} remove The number items to remove. 466 * @param {number} remove The number items to remove.
467 * @param {string} value The value of the item to insert. 467 * @param {string} value The value of the item to insert.
468 */ 468 */
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 CreditCardListItem: CreditCardListItem, 561 CreditCardListItem: CreditCardListItem,
562 ValuesListItem: ValuesListItem, 562 ValuesListItem: ValuesListItem,
563 NameListItem: NameListItem, 563 NameListItem: NameListItem,
564 AutofillAddressList: AutofillAddressList, 564 AutofillAddressList: AutofillAddressList,
565 AutofillCreditCardList: AutofillCreditCardList, 565 AutofillCreditCardList: AutofillCreditCardList,
566 AutofillValuesList: AutofillValuesList, 566 AutofillValuesList: AutofillValuesList,
567 AutofillNameValuesList: AutofillNameValuesList, 567 AutofillNameValuesList: AutofillNameValuesList,
568 AutofillPhoneValuesList: AutofillPhoneValuesList, 568 AutofillPhoneValuesList: AutofillPhoneValuesList,
569 }; 569 };
570 }); 570 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/BUILD.gn ('k') | chrome/browser/resources/options/deletable_item_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698