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

Unified Diff: Source/devtools/front_end/InplaceFormatterEditorAction.js

Issue 176843007: DevTools: Support inplace formatting for snippets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/InplaceFormatterEditorAction.js
diff --git a/Source/devtools/front_end/InplaceFormatterEditorAction.js b/Source/devtools/front_end/InplaceFormatterEditorAction.js
index 7a21020c9c7b71e4ed57bde4079182b2ccaec80d..7c22631469d47d6e4395476d5d74a0d915869d2e 100644
--- a/Source/devtools/front_end/InplaceFormatterEditorAction.js
+++ b/Source/devtools/front_end/InplaceFormatterEditorAction.js
@@ -66,7 +66,10 @@ WebInspector.InplaceFormatterEditorAction.prototype = {
*/
_isFormattable: function(uiSourceCode)
{
- return !!uiSourceCode && uiSourceCode.contentType() === WebInspector.resourceTypes.Stylesheet;
+ if (!uiSourceCode)
+ return false;
+ return uiSourceCode.contentType() === WebInspector.resourceTypes.Stylesheet ||
+ uiSourceCode.project().type() === WebInspector.projectTypes.Snippets;
pfeldman 2014/03/03 14:44:55 weird indent.
},
_formatSourceInPlace: function()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698