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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js

Issue 2412023002: DevTools: migrate InspectorView to tabbed view location. (Closed)
Patch Set: made layers panel closeable. Created 4 years, 2 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/TabbedPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js b/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js
index f1a8e458710cd256a406ca5a88d00f587e79aa05..bee8aaa16cba3d4ed2e954d88cb8da5d3dc217f6 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js
@@ -55,6 +55,7 @@ WebInspector.TabbedPane = function()
/** @type {!Object.<string, !WebInspector.TabbedPaneTab>} */
this._tabsById = {};
this._currentTabLocked = false;
+ this._autoSelectFirstItemOnShow = true;
this._dropDownButton = this._createDropDownButton();
WebInspector.zoomManager.addEventListener(WebInspector.ZoomManager.Events.ZoomChanged, this._zoomChanged, this);
@@ -78,6 +79,14 @@ WebInspector.TabbedPane.prototype = {
},
/**
+ * @param {boolean} autoSelect
+ */
+ setAutoSelectFirstItemOnShow: function(autoSelect)
+ {
+ this._autoSelectFirstItemOnShow = autoSelect;
+ },
+
+ /**
* @return {?WebInspector.Widget}
*/
get visibleView()
@@ -469,7 +478,7 @@ WebInspector.TabbedPane.prototype = {
wasShown: function()
{
var effectiveTab = this._currentTab || this._tabsHistory[0];
- if (effectiveTab)
+ if (effectiveTab && this._autoSelectFirstItemOnShow)
this.selectTab(effectiveTab.id);
},
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/Panel.js ('k') | third_party/WebKit/Source/devtools/front_end/ui/View.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698