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

Unified Diff: Source/devtools/front_end/DOMStorageItemsView.js

Issue 21163003: DevTools: Implement undo, redo operations for the DOMStorage views. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing after arv's changes for ExceptionState Created 7 years, 4 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
« no previous file with comments | « Source/devtools/front_end/DOMStorage.js ('k') | Source/devtools/front_end/ResourcesPanel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/DOMStorageItemsView.js
diff --git a/Source/devtools/front_end/DOMStorageItemsView.js b/Source/devtools/front_end/DOMStorageItemsView.js
index e9f652fe48d2ef6791bf5e4ef6b7c3c98847334a..5d94705b053e1331002de02789d492b814eaae3b 100644
--- a/Source/devtools/front_end/DOMStorageItemsView.js
+++ b/Source/devtools/front_end/DOMStorageItemsView.js
@@ -68,6 +68,26 @@ WebInspector.DOMStorageItemsView.prototype = {
},
/**
+ * @param {KeyboardEvent} event
+ */
+ handleShortcut: function(event)
+ {
+ if (WebInspector.KeyboardShortcut.eventHasCtrlOrMeta(event) && !event.shiftKey && event.keyIdentifier === "U+005A") { // Z key
+ this.domStorage.undo();
+ event.handled = true;
+ return;
+ }
+
+ var isRedoKey = WebInspector.isMac() ? event.metaKey && event.shiftKey && event.keyIdentifier === "U+005A" : // Z key
+ event.ctrlKey && event.keyIdentifier === "U+0059"; // Y key
+ if (isRedoKey) {
+ this.domStorage.redo();
+ event.handled = true;
+ return;
+ }
+ },
+
+ /**
* @param {WebInspector.Event} event
*/
_domStorageItemsCleared: function(event)
« no previous file with comments | « Source/devtools/front_end/DOMStorage.js ('k') | Source/devtools/front_end/ResourcesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698