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

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

Issue 1564113003: DevTools: merge uisourcecode's url-alike members. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 11 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/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 bb73b7db8fa9bf9b6fe76633d3ef0d29069c0d20..1d8c9e908240c816daa3c884ecc2c942f3d0425d 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
@@ -157,7 +157,7 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data);
this._updateButton(uiSourceCode);
- var path = uiSourceCode.project().id() + ":" + uiSourceCode.path();
+ var path = uiSourceCode.project().id() + ":" + uiSourceCode.url();
var networkURL = WebInspector.networkMapping.networkURL(uiSourceCode);
if (this._isFormatableScript(uiSourceCode) && networkURL && this._pathsToFormatOnLoad.has(path) && !this._formattedPaths.get(path))
this._formatUISourceCodeScript(uiSourceCode);
@@ -264,7 +264,7 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
this._uiSourceCodes.remove(formatData.scripts[i]);
WebInspector.debuggerWorkspaceBinding.popSourceMapping(formatData.scripts[i]);
}
- this._project.removeFile(formattedUISourceCode.path());
+ this._project.removeFile(formattedUISourceCode.url());
},
/**
@@ -289,7 +289,7 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
else {
this._formattedPaths.remove(formatData.projectId + ":" + formatData.path);
this._formatData.remove(uiSourceCodes[i]);
- this._project.removeFile(uiSourceCodes[i].path());
+ this._project.removeFile(uiSourceCodes[i].url());
}
}
},
@@ -339,7 +339,7 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
*/
_formatUISourceCodeScript: function(uiSourceCode)
{
- var formattedPath = this._formattedPaths.get(uiSourceCode.project().id() + ":" + uiSourceCode.path());
+ var formattedPath = this._formattedPaths.get(uiSourceCode.project().id() + ":" + uiSourceCode.url());
if (formattedPath) {
var uiSourceCodePath = formattedPath;
var formattedUISourceCode = this._workspace.uiSourceCode(this._projectId, uiSourceCodePath);
@@ -370,11 +370,11 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
{
var scripts = this._scriptsForUISourceCode(uiSourceCode);
var contentProvider = new WebInspector.StaticContentProvider(uiSourceCode.contentType(), formattedContent);
- 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);
+ var formattedUISourceCode = this._project.addContentProvider(uiSourceCode.url() + ":formatted", contentProvider);
+ var formattedPath = formattedUISourceCode.url();
+ var formatData = new WebInspector.FormatterScriptMapping.FormatData(uiSourceCode.project().id(), uiSourceCode.url(), formatterMapping, scripts);
this._formatData.set(formattedUISourceCode, formatData);
- var path = uiSourceCode.project().id() + ":" + uiSourceCode.path();
+ var path = uiSourceCode.project().id() + ":" + uiSourceCode.url();
this._formattedPaths.set(path, formattedPath);
this._pathsToFormatOnLoad.add(path);
for (var i = 0; i < scripts.length; ++i) {

Powered by Google App Engine
This is Rietveld 408576698