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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/InspectorView.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/InspectorView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js b/third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js
index b7b40e28697a55313c3d40cc3345abda23cdd0fc..6ab7a2d8fc2ce08354d34edd85055153ccd12268 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js
@@ -67,9 +67,6 @@ WebInspector.InspectorView = function()
/** @type {!Object.<string, !Promise.<!WebInspector.Panel> >} */
this._panelPromises = {};
- // Windows and Mac have two different definitions of '[' and ']', so accept both of each.
- this._openBracketIdentifiers = ["U+005B", "U+00DB"].keySet();
- this._closeBracketIdentifiers = ["U+005D", "U+00DD"].keySet();
this._lastActivePanelSetting = WebInspector.settings.createSetting("lastActivePanel", "elements");
InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Events.ShowPanel, showPanel.bind(this));
@@ -451,7 +448,7 @@ WebInspector.InspectorView.prototype = {
// BUG85312: On French AZERTY keyboards, AltGr-]/[ combinations (synonymous to Ctrl-Alt-]/[ on Windows) are used to enter ]/[,
// so for a ]/[-related keydown we delay the panel switch using a timer, to see if there is a keypress event following this one.
// If there is, we cancel the timer and do not consider this a panel switch.
- if (!WebInspector.isWin() || (!this._openBracketIdentifiers[event.keyIdentifier] && !this._closeBracketIdentifiers[event.keyIdentifier])) {
+ if (!WebInspector.isWin() || (event.key !== "[" && event.key !== "]")) {
this._keyDownInternal(event);
return;
}
@@ -466,10 +463,10 @@ WebInspector.InspectorView.prototype = {
var direction = 0;
- if (this._openBracketIdentifiers[event.keyIdentifier])
+ if (event.key === "[")
direction = -1;
- if (this._closeBracketIdentifiers[event.keyIdentifier])
+ if (event.key === "]")
direction = 1;
if (!direction)

Powered by Google App Engine
This is Rietveld 408576698