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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/SoftContextMenu.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/ui/SoftContextMenu.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/SoftContextMenu.js b/third_party/WebKit/Source/devtools/front_end/ui/SoftContextMenu.js
index 33f8545aac8ab70c8d2a099526877f0125454058..c20310caae8bbb395b72e5c4eab0af05f2267999 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/SoftContextMenu.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/SoftContextMenu.js
@@ -300,18 +300,18 @@ WebInspector.SoftContextMenu.prototype = {
_menuKeyDown: function(event)
{
- switch (event.keyIdentifier) {
- case "Up":
+ switch (event.key) {
+ case "ArrowUp":
this._highlightPrevious(); break;
- case "Down":
+ case "ArrowDown":
this._highlightNext(); break;
- case "Left":
+ case "ArrowLeft":
if (this._parentMenu) {
this._highlightMenuItem(null, false);
this._parentMenu._hideSubMenu();
}
break;
- case "Right":
+ case "ArrowRight":
if (!this._highlightedMenuItemElement)
break;
if (this._highlightedMenuItemElement._subItems) {
@@ -320,13 +320,13 @@ WebInspector.SoftContextMenu.prototype = {
this._subMenu._highlightNext();
}
break;
- case "U+001B": // Escape
+ case "Escape":
this._discardMenu(false, event); break;
case "Enter":
if (!isEnterKey(event))
break;
// Fall through
- case "U+0020": // Space
+ case " ": // Space
if (this._highlightedMenuItemElement)
this._triggerAction(this._highlightedMenuItemElement, event);
if (this._highlightedMenuItemElement._subItems) {

Powered by Google App Engine
This is Rietveld 408576698