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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/InplaceFormatterEditorAction.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/InplaceFormatterEditorAction.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/InplaceFormatterEditorAction.js b/third_party/WebKit/Source/devtools/front_end/sources/InplaceFormatterEditorAction.js
index 0908f943f2904be16fc5b70dc1f6cb9253530191..7e8a6aa85172c73e035688d1d6a5eb25d353e1da 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/InplaceFormatterEditorAction.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/InplaceFormatterEditorAction.js
@@ -57,12 +57,11 @@ Sources.InplaceFormatterEditorAction = class {
_isFormattable(uiSourceCode) {
if (!uiSourceCode)
return false;
- if (uiSourceCode.project().type() === Workspace.projectTypes.FileSystem)
+ if (uiSourceCode.project().canSetFileContent())
return true;
if (Persistence.persistence.binding(uiSourceCode))
return true;
- return uiSourceCode.contentType().isStyleSheet() ||
- uiSourceCode.project().type() === Workspace.projectTypes.Snippets;
+ return uiSourceCode.contentType().isStyleSheet();
}
_formatSourceInPlace() {

Powered by Google App Engine
This is Rietveld 408576698