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

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

Issue 464963002: DevTools: Make UISourceCode Target-agnostic (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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: Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
diff --git a/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js b/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
index ee7d5b8c50ef324ad2d84902ca51aa42e24561b4..68dc333459557ee505a8ff196f020c8c9ba2530d 100644
--- a/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
+++ b/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js
@@ -312,7 +312,7 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
{
var uiSourceCodes = this._formatData.keys();
for (var i = 0; i < uiSourceCodes.length; ++i) {
- uiSourceCodes[i].setSourceMappingForTarget(target, null);
+ WebInspector.debuggerWorkspaceBinding.setSourceMapping(target, uiSourceCodes[i], null);
var formatData = this._formatData.get(uiSourceCodes[i]);
var scripts = [];
for (var j = 0; j < formatData.scripts.length; ++j) {
@@ -364,7 +364,7 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
return scripts.filter(isInlineScript);
}
if (uiSourceCode.contentType() === WebInspector.resourceTypes.Script) {
- var rawLocations = (uiSourceCode.uiLocationToRawLocations(0, 0));
+ var rawLocations = WebInspector.debuggerWorkspaceBinding.uiLocationToRawLocations(uiSourceCode, 0, 0);
return rawLocations.map(function(rawLocation) { return rawLocation.script()});
}
return [];
@@ -427,7 +427,7 @@ WebInspector.ScriptFormatterEditorAction.prototype = {
var targets = WebInspector.targetManager.targets();
for (var i = 0; i < targets.length; ++i) {
var scriptMapping = /** @type {!WebInspector.FormatterScriptMapping} */(this._scriptMappingByTarget.get(targets[i]));
- formattedUISourceCode.setSourceMappingForTarget(targets[i], scriptMapping);
+ WebInspector.debuggerWorkspaceBinding.setSourceMapping(targets[i], formattedUISourceCode, scriptMapping);
}
this._showIfNeeded(uiSourceCode, formattedUISourceCode, formatterMapping);
}

Powered by Google App Engine
This is Rietveld 408576698