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

Side by Side Diff: Source/devtools/front_end/ScriptFormatterEditorAction.js

Issue 211243006: DevTools: fix pretty-print functionality for VM scripts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @implements {WebInspector.SourceMapping} 7 * @implements {WebInspector.SourceMapping}
8 * @param {!WebInspector.Workspace} workspace 8 * @param {!WebInspector.Workspace} workspace
9 * @param {!WebInspector.DebuggerModel} debuggerModel 9 * @param {!WebInspector.DebuggerModel} debuggerModel
10 */ 10 */
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 switch (uiSourceCode.contentType()) { 77 switch (uiSourceCode.contentType()) {
78 case WebInspector.resourceTypes.Document: 78 case WebInspector.resourceTypes.Document:
79 isInlineScript = true; 79 isInlineScript = true;
80 break; 80 break;
81 case WebInspector.resourceTypes.Script: 81 case WebInspector.resourceTypes.Script:
82 isInlineScript = false; 82 isInlineScript = false;
83 break; 83 break;
84 default: 84 default:
85 return []; 85 return [];
86 } 86 }
87 if (!uiSourceCode.url) {
88 var scriptId = uiSourceCode._sourceMapping._scriptIdForUISourceCode. get(uiSourceCode);
pfeldman 2014/03/25 18:31:10 Too much private field access for one line.
lushnikov 2014/03/25 18:58:42 Done.
89 var script = this._debuggerModel.scriptForId(scriptId);
90 return [ script ];
91 }
87 var scripts = this._debuggerModel.scriptsForSourceURL(uiSourceCode.url); 92 var scripts = this._debuggerModel.scriptsForSourceURL(uiSourceCode.url);
88 93
89 function filterOutIncorrectInlineType(script) 94 function filterOutIncorrectInlineType(script)
90 { 95 {
91 return script.isInlineScript() === isInlineScript; 96 return script.isInlineScript() === isInlineScript;
92 } 97 }
93 98
94 return scripts.filter(filterOutIncorrectInlineType); 99 return scripts.filter(filterOutIncorrectInlineType);
95 }, 100 },
96 101
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 }, 385 },
381 386
382 /** 387 /**
383 * @param {!WebInspector.UISourceCode} uiSourceCode 388 * @param {!WebInspector.UISourceCode} uiSourceCode
384 */ 389 */
385 _discardFormattedUISourceCodeScript: function(uiSourceCode) 390 _discardFormattedUISourceCodeScript: function(uiSourceCode)
386 { 391 {
387 this._scriptMapping._discardFormattedUISourceCodeScript(uiSourceCode); 392 this._scriptMapping._discardFormattedUISourceCodeScript(uiSourceCode);
388 } 393 }
389 } 394 }
OLDNEW
« 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