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

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

Issue 2648253006: [DevTools] Hide empty toolbars (Closed)
Patch Set: Created 3 years, 11 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/resources/ResourcesPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
index 58a3e642cdab996bb9782eb1741aa93a34e3d2c1..ccbef798afc87718b90c55e21aa1e8b21e909824 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
@@ -639,9 +639,10 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar {
this.visibleView = view;
this._storageViewToolbar.removeToolbarItems();
- var toolbarItems = view instanceof UI.SimpleView ? view.syncToolbarItems() : null;
- for (var i = 0; toolbarItems && i < toolbarItems.length; ++i)
+ var toolbarItems = (view instanceof UI.SimpleView && view.syncToolbarItems()) || [];
+ for (var i = 0; i < toolbarItems.length; ++i)
this._storageViewToolbar.appendToolbarItem(toolbarItems[i]);
+ this._storageViewToolbar.setVisible(toolbarItems.length > 0);
}
closeVisibleView() {

Powered by Google App Engine
This is Rietveld 408576698