Index: third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js |
index 0127e4c4355bbda5632eee65677abb82d52f36f5..311aa715aa7bbb9cfe2eaa62d8de1d65ea6a1b62 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js |
+++ b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js |
@@ -103,7 +103,7 @@ WebInspector.FormatterScriptMapping.FormatData = function(projectId, path, mappi |
WebInspector.ScriptFormatterEditorAction = function() |
{ |
this._projectId = "formatter:"; |
- this._project = new WebInspector.ContentProviderBasedProject(WebInspector.workspace, this._projectId, WebInspector.projectTypes.Formatter, "", "formatter"); |
+ this._project = new WebInspector.ContentProviderBasedProject(WebInspector.workspace, this._projectId, WebInspector.projectTypes.Formatter, "formatter"); |
/** @type {!Map.<!WebInspector.Script, !WebInspector.UISourceCode>} */ |
this._uiSourceCodes = new Map(); |
@@ -370,16 +370,8 @@ WebInspector.ScriptFormatterEditorAction.prototype = { |
function innerCallback(formattedContent, formatterMapping) |
{ |
var scripts = this._scriptsForUISourceCode(uiSourceCode); |
- var name; |
- if (uiSourceCode.contentType() === WebInspector.resourceTypes.Document) |
- name = uiSourceCode.displayName(); |
- else |
- name = uiSourceCode.name() || (scripts.length ? scripts[0].scriptId : ""); |
- |
- var networkURL = WebInspector.networkMapping.networkURL(uiSourceCode); |
- |
var contentProvider = new WebInspector.StaticContentProvider(uiSourceCode.contentType(), formattedContent); |
- var formattedUISourceCode = this._project.addContentProvider(networkURL, name + ":formatted", networkURL, contentProvider); |
+ var formattedUISourceCode = this._project.addContentProvider(uiSourceCode.path() + ":formatted", contentProvider); |
var formattedPath = formattedUISourceCode.path(); |
var formatData = new WebInspector.FormatterScriptMapping.FormatData(uiSourceCode.project().id(), uiSourceCode.path(), formatterMapping, scripts); |
this._formatData.set(formattedUISourceCode, formatData); |