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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js

Issue 2390333002: DevTools: fix tabbed editor to not open all bound files (Closed)
Patch Set: nit 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/sources/TabbedEditorContainer.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js b/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js
index f423c4a2cf5f7711c7151390ba14b5b364848fb2..2c4c8762777f5cdb90f11f20324a3f9d99516fee 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js
@@ -90,23 +90,18 @@ WebInspector.TabbedEditorContainer.prototype = {
var binding = /** @type {!WebInspector.PersistenceBinding} */(event.data);
var networkTabId = this._tabIds.get(binding.network);
var fileSystemTabId = this._tabIds.get(binding.fileSystem);
- var wasSelectedInFileSystem = this._currentFile === binding.fileSystem;
-
- if (fileSystemTabId) {
- var tabIndex = this._tabbedPane.tabIndex(fileSystemTabId);
- this._closeTabs([fileSystemTabId]);
- }
- if (networkTabId) {
- if (wasSelectedInFileSystem)
- this._tabbedPane.selectTab(networkTabId, false);
+ if (networkTabId)
this._tabbedPane.changeTabTitle(networkTabId, this._titleForFile(binding.fileSystem), this._tooltipForFile(binding.fileSystem));
+ if (!fileSystemTabId)
return;
- }
-
- var tabId = this._appendFileTab(binding.network, false, tabIndex);
+ var wasSelectedInFileSystem = this._currentFile === binding.fileSystem;
+ var tabIndex = this._tabbedPane.tabIndex(fileSystemTabId);
+ this._closeTabs([fileSystemTabId]);
+ if (!networkTabId)
+ networkTabId = this._appendFileTab(binding.network, false, tabIndex);
if (wasSelectedInFileSystem)
- this._tabbedPane.selectTab(tabId, false);
+ this._tabbedPane.selectTab(networkTabId, false);
},
/**
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-tabbed-editor-opens-network-uisourcecode-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698