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

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

Issue 2376583002: DevTools: remove WI.NetworkMapping.networkURL (Closed)
Patch Set: do not blackbox fs uiSourceCodes Created 4 years, 3 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 c707a6af0232cbd22fe7b929cf307bb76dd32d0f..12f3aba6d5cac222aa86850a61129f24fac5a81d 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
@@ -159,8 +159,7 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
this._updateButton(uiSourceCode);
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))
+ if (this._isFormatableScript(uiSourceCode) && this._pathsToFormatOnLoad.has(path) && !this._formattedPaths.get(path))
this._formatUISourceCodeScript(uiSourceCode);
},
@@ -323,10 +322,8 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
if (uiSourceCode.contentType() === WebInspector.resourceTypes.Document) {
var scripts = [];
var debuggerModels = WebInspector.DebuggerModel.instances();
- for (var i = 0; i < debuggerModels.length; ++i) {
- var networkURL = WebInspector.networkMapping.networkURL(uiSourceCode);
- scripts.pushAll(debuggerModels[i].scriptsForSourceURL(networkURL));
- }
+ for (var i = 0; i < debuggerModels.length; ++i)
+ scripts.pushAll(debuggerModels[i].scriptsForSourceURL(uiSourceCode.url()));
return scripts.filter(isInlineScript);
}
if (uiSourceCode.contentType().isScript()) {

Powered by Google App Engine
This is Rietveld 408576698