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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeOutline.js

Issue 2033403005: Eradicate keyIndentifier from devtools/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call KeyCodeToKeyIdentifier for unhandle key events Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 handleShortcut: function(event) 877 handleShortcut: function(event)
878 { 878 {
879 var node = this.selectedDOMNode(); 879 var node = this.selectedDOMNode();
880 if (!node) 880 if (!node)
881 return; 881 return;
882 var treeElement = node[this._treeElementSymbol]; 882 var treeElement = node[this._treeElementSymbol];
883 if (!treeElement) 883 if (!treeElement)
884 return; 884 return;
885 885
886 if (WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event) && node.pare ntNode) { 886 if (WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event) && node.pare ntNode) {
887 if (event.keyIdentifier === "Up" && node.previousSibling) { 887 if (event.key === "ArrowUp" && node.previousSibling) {
888 node.moveTo(node.parentNode, node.previousSibling, this.selectNo deAfterEdit.bind(this, treeElement.expanded)); 888 node.moveTo(node.parentNode, node.previousSibling, this.selectNo deAfterEdit.bind(this, treeElement.expanded));
889 event.handled = true; 889 event.handled = true;
890 return; 890 return;
891 } 891 }
892 if (event.keyIdentifier === "Down" && node.nextSibling) { 892 if (event.key === "ArrowDown" && node.nextSibling) {
893 node.moveTo(node.parentNode, node.nextSibling.nextSibling, this. selectNodeAfterEdit.bind(this, treeElement.expanded)); 893 node.moveTo(node.parentNode, node.nextSibling.nextSibling, this. selectNodeAfterEdit.bind(this, treeElement.expanded));
894 event.handled = true; 894 event.handled = true;
895 return; 895 return;
896 } 896 }
897 } 897 }
898 }, 898 },
899 899
900 /** 900 /**
901 * @param {!WebInspector.DOMNode} node 901 * @param {!WebInspector.DOMNode} node
902 * @param {boolean=} startEditing 902 * @param {boolean=} startEditing
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
1782 if (node) { 1782 if (node) {
1783 this.treeOutline._selectedDOMNode = node; 1783 this.treeOutline._selectedDOMNode = node;
1784 this.treeOutline._selectedNodeChanged(); 1784 this.treeOutline._selectedNodeChanged();
1785 } 1785 }
1786 } 1786 }
1787 return true; 1787 return true;
1788 }, 1788 },
1789 1789
1790 __proto__: TreeElement.prototype 1790 __proto__: TreeElement.prototype
1791 } 1791 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698