| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }); |
| OLD | NEW |