Commit 878257c8 authored by eustas@chromium.org's avatar eustas@chromium.org

DevTools: Preserve tab selection in NetworkItemView

BUG=380541

Review URL: https://codereview.chromium.org/311073002

git-svn-id: svn://svn.chromium.org/blink/trunk@175466 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 24986e95
......@@ -91,11 +91,8 @@ WebInspector.NetworkItemView.prototype = {
if (!tabId)
tabId = WebInspector.settings.resourceViewTab.get();
if (!this.selectTab(tabId)) {
this._isInFallbackSelection = true;
if (!this.selectTab(tabId))
this.selectTab("headers");
delete this._isInFallbackSelection;
}
},
_tabSelected: function(event)
......
......@@ -299,15 +299,16 @@ WebInspector.TabbedPane.prototype = {
/**
* @param {string} id
* @param {boolean=} userGesture
* @return {boolean}
*/
selectTab: function(id, userGesture)
{
var focused = this.hasFocus();
var tab = this._tabsById[id];
if (!tab)
return;
return false;
if (this._currentTab && this._currentTab.id === id)
return;
return true;
this._hideCurrentTab();
this._showTab(tab);
......@@ -322,6 +323,7 @@ WebInspector.TabbedPane.prototype = {
var eventData = { tabId: id, view: tab.view, isUserGesture: userGesture };
this.dispatchEventToListeners(WebInspector.TabbedPane.EventTypes.TabSelected, eventData);
return true;
},
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment