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

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

Issue 1013683002: Fix for Back navigation keyboard shortcut does not work properly for chrome://settings/cookies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nit. Created 5 years, 9 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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', function() { 5 cr.define('options', function() {
6 /** @const */ var DeletableItemList = options.DeletableItemList; 6 /** @const */ var DeletableItemList = options.DeletableItemList;
7 /** @const */ var DeletableItem = options.DeletableItem; 7 /** @const */ var DeletableItem = options.DeletableItem;
8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
9 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; 9 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel;
10 10
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 }, 727 },
728 728
729 /** 729 /**
730 * Handles key down events and looks for left and right arrows, then 730 * Handles key down events and looks for left and right arrows, then
731 * dispatches to the currently expanded item, if any. 731 * dispatches to the currently expanded item, if any.
732 * @param {Event} e The keydown event. 732 * @param {Event} e The keydown event.
733 * @private 733 * @private
734 */ 734 */
735 handleKeyLeftRight_: function(e) { 735 handleKeyLeftRight_: function(e) {
736 var id = e.keyIdentifier; 736 var id = e.keyIdentifier;
737 if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey)
738 return;
737 if ((id == 'Left' || id == 'Right') && this.expandedItem) { 739 if ((id == 'Left' || id == 'Right') && this.expandedItem) {
738 var cs = this.ownerDocument.defaultView.getComputedStyle(this); 740 var cs = this.ownerDocument.defaultView.getComputedStyle(this);
739 var rtl = cs.direction == 'rtl'; 741 var rtl = cs.direction == 'rtl';
740 if ((!rtl && id == 'Left') || (rtl && id == 'Right')) 742 if ((!rtl && id == 'Left') || (rtl && id == 'Right'))
741 this.expandedItem.selectedIndex--; 743 this.expandedItem.selectedIndex--;
742 else 744 else
743 this.expandedItem.selectedIndex++; 745 this.expandedItem.selectedIndex++;
744 this.scrollIndexIntoView(this.expandedItem.listIndex); 746 this.scrollIndexIntoView(this.expandedItem.listIndex);
745 // Prevent the page itself from scrolling. 747 // Prevent the page itself from scrolling.
746 e.preventDefault(); 748 e.preventDefault();
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 parent.endBatchUpdates(); 928 parent.endBatchUpdates();
927 }, 929 },
928 }; 930 };
929 931
930 return { 932 return {
931 CookiesList: CookiesList, 933 CookiesList: CookiesList,
932 CookieListItem: CookieListItem, 934 CookieListItem: CookieListItem,
933 CookieTreeNode: CookieTreeNode, 935 CookieTreeNode: CookieTreeNode,
934 }; 936 };
935 }); 937 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698