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

Unified Diff: third_party/WebKit/Source/devtools/front_end/resources/DOMStorageItemsView.js

Issue 2560553004: Revert of [DevTools] Remove methods on Common.Event. (Closed)
Patch Set: Created 4 years 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/resources/DOMStorageItemsView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/DOMStorageItemsView.js b/third_party/WebKit/Source/devtools/front_end/resources/DOMStorageItemsView.js
index f4814b08072e4685f3f7d59462a5ac2a9b537715..303f117d8a35bfd0a5dfb9f35422a3106c1cfae5 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/DOMStorageItemsView.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/DOMStorageItemsView.js
@@ -37,10 +37,10 @@
this.deleteButton = new UI.ToolbarButton(Common.UIString('Delete'), 'largeicon-delete');
this.deleteButton.setVisible(false);
- this.deleteButton.addEventListener(UI.ToolbarButton.Events.Click, this._deleteButtonClicked, this);
+ this.deleteButton.addEventListener('click', this._deleteButtonClicked, this);
this.refreshButton = new UI.ToolbarButton(Common.UIString('Refresh'), 'largeicon-refresh');
- this.refreshButton.addEventListener(UI.ToolbarButton.Events.Click, this._refreshButtonClicked, this);
+ this.refreshButton.addEventListener('click', this._refreshButtonClicked, this);
this.domStorage.addEventListener(
Resources.DOMStorage.Events.DOMStorageItemsCleared, this._domStorageItemsCleared, this);
@@ -83,6 +83,7 @@
this._dataGrid.rootNode().removeChildren();
this._dataGrid.addCreationNode(false);
this.deleteButton.setVisible(false);
+ event.consume(true);
}
/**
@@ -95,6 +96,8 @@
var storageData = event.data;
var rootNode = this._dataGrid.rootNode();
var children = rootNode.children;
+
+ event.consume(true);
for (var i = 0; i < children.length; ++i) {
var childNode = children[i];
@@ -117,6 +120,7 @@
var rootNode = this._dataGrid.rootNode();
var children = rootNode.children;
+ event.consume(true);
this.deleteButton.setVisible(true);
for (var i = 0; i < children.length; ++i) {
@@ -138,6 +142,8 @@
var storageData = event.data;
var rootNode = this._dataGrid.rootNode();
var children = rootNode.children;
+
+ event.consume(true);
var keyFound = false;
for (var i = 0; i < children.length; ++i) {
@@ -203,9 +209,6 @@
return dataGrid;
}
- /**
- * @param {!Common.Event} event
- */
_deleteButtonClicked(event) {
if (!this._dataGrid || !this._dataGrid.selectedNode)
return;
@@ -213,9 +216,6 @@
this._deleteCallback(this._dataGrid.selectedNode);
}
- /**
- * @param {!Common.Event} event
- */
_refreshButtonClicked(event) {
this._update();
}

Powered by Google App Engine
This is Rietveld 408576698