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

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

Issue 18341003: DevTools: [CodeMirror] Add syntax highlighting for some other languages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 7 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 this._sourceMapForScriptId[script.scriptId] = sourceMap; 124 this._sourceMapForScriptId[script.scriptId] = sourceMap;
125 this._scriptForSourceMap.put(sourceMap, script); 125 this._scriptForSourceMap.put(sourceMap, script);
126 126
127 var sourceURLs = sourceMap.sources(); 127 var sourceURLs = sourceMap.sources();
128 for (var i = 0; i < sourceURLs.length; ++i) { 128 for (var i = 0; i < sourceURLs.length; ++i) {
129 var sourceURL = sourceURLs[i]; 129 var sourceURL = sourceURLs[i];
130 if (this._sourceMapForURL[sourceURL]) 130 if (this._sourceMapForURL[sourceURL])
131 continue; 131 continue;
132 this._sourceMapForURL[sourceURL] = sourceMap; 132 this._sourceMapForURL[sourceURL] = sourceMap;
133 if (!this._workspace.hasMappingForURL(sourceURL) && !this._works pace.uiSourceCodeForURL(sourceURL)) { 133 if (!this._workspace.hasMappingForURL(sourceURL) && !this._works pace.uiSourceCodeForURL(sourceURL)) {
134 var contentProvider = sourceMap.sourceContentProvider(source URL, WebInspector.resourceTypes.Script, "text/javascript"); 134 var contentProvider = sourceMap.sourceContentProvider(source URL, WebInspector.resourceTypes.Script);
135 this._networkWorkspaceProvider.addFileForURL(sourceURL, cont entProvider, true); 135 this._networkWorkspaceProvider.addFileForURL(sourceURL, cont entProvider, true);
136 } 136 }
137 var uiSourceCode = this._workspace.uiSourceCodeForURL(sourceURL) ; 137 var uiSourceCode = this._workspace.uiSourceCodeForURL(sourceURL) ;
138 if (uiSourceCode) { 138 if (uiSourceCode) {
139 this._bindUISourceCode(uiSourceCode); 139 this._bindUISourceCode(uiSourceCode);
140 uiSourceCode.isContentScript = script.isContentScript; 140 uiSourceCode.isContentScript = script.isContentScript;
141 } 141 }
142 } 142 }
143 script.updateLocations(); 143 script.updateLocations();
144 } 144 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 _debuggerReset: function() 222 _debuggerReset: function()
223 { 223 {
224 this._sourceMapForSourceMapURL = {}; 224 this._sourceMapForSourceMapURL = {};
225 this._pendingSourceMapLoadingCallbacks = {}; 225 this._pendingSourceMapLoadingCallbacks = {};
226 this._sourceMapForScriptId = {}; 226 this._sourceMapForScriptId = {};
227 this._scriptForSourceMap = new Map(); 227 this._scriptForSourceMap = new Map();
228 this._sourceMapForURL = {}; 228 this._sourceMapForURL = {};
229 } 229 }
230 } 230 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698