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

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

Issue 2536273003: [DevTools] Remove Workspace.projectTypes enum part1. (Closed)
Patch Set: Created 4 years, 1 month 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 7ecc659634d7aec294f548a7578a23932d99f8ed..d4b610b4edef46f639d825216fe16ccb719578b0 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js
@@ -379,11 +379,9 @@ Sources.TabbedEditorContainer = class extends Common.Object {
if (!this._currentFile)
return;
- var currentProjectType = this._currentFile.project().type();
- var addedProjectType = uiSourceCode.project().type();
- var snippetsProjectType = Workspace.projectTypes.Snippets;
- if (this._history.index(this._currentFile.url()) && currentProjectType === snippetsProjectType &&
- addedProjectType !== snippetsProjectType)
+ var currentIsSnippet = Snippets.ScriptSnippetModel.isSnippetUISourceCode(this._currentFile);
+ var addedIsSnippet = Snippets.ScriptSnippetModel.isSnippetUISourceCode(uiSourceCode);
+ if (this._history.index(this._currentFile.url()) && currentIsSnippet && !addedIsSnippet)
this._innerShowFile(uiSourceCode, false);
}

Powered by Google App Engine
This is Rietveld 408576698