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

Side by Side Diff: Source/devtools/front_end/SASSSourceMapping.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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 * @param {WebInspector.SourceMap} sourceMap 278 * @param {WebInspector.SourceMap} sourceMap
279 */ 279 */
280 _bindUISourceCode: function(header, sourceMap) 280 _bindUISourceCode: function(header, sourceMap)
281 { 281 {
282 header.pushSourceMapping(this); 282 header.pushSourceMapping(this);
283 var rawURL = header.sourceURL; 283 var rawURL = header.sourceURL;
284 var sources = sourceMap.sources(); 284 var sources = sourceMap.sources();
285 for (var i = 0; i < sources.length; ++i) { 285 for (var i = 0; i < sources.length; ++i) {
286 var url = sources[i]; 286 var url = sources[i];
287 if (!this._workspace.hasMappingForURL(url) && !this._workspace.uiSou rceCodeForURL(url)) { 287 if (!this._workspace.hasMappingForURL(url) && !this._workspace.uiSou rceCodeForURL(url)) {
288 var contentProvider = sourceMap.sourceContentProvider(url, WebIn spector.resourceTypes.Stylesheet, "text/x-scss"); 288 var contentProvider = sourceMap.sourceContentProvider(url, WebIn spector.resourceTypes.Stylesheet);
289 var uiSourceCode = this._networkWorkspaceProvider.addFileForURL( url, contentProvider, true); 289 var uiSourceCode = this._networkWorkspaceProvider.addFileForURL( url, contentProvider, true);
290 uiSourceCode.setSourceMapping(this); 290 uiSourceCode.setSourceMapping(this);
291 } 291 }
292 this._addCSSURLforSASSURL(rawURL, url); 292 this._addCSSURLforSASSURL(rawURL, url);
293 } 293 }
294 }, 294 },
295 295
296 /** 296 /**
297 * @param {WebInspector.RawLocation} rawLocation 297 * @param {WebInspector.RawLocation} rawLocation
298 * @return {WebInspector.UILocation} 298 * @return {WebInspector.UILocation}
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 { 366 {
367 /** @type {Object.<string, WebInspector.SourceMap>} */ 367 /** @type {Object.<string, WebInspector.SourceMap>} */
368 this._sourceMapByURL = {}; 368 this._sourceMapByURL = {};
369 /** @type {Object.<string, Array.<function(?WebInspector.SourceMap)>>} * / 369 /** @type {Object.<string, Array.<function(?WebInspector.SourceMap)>>} * /
370 this._pendingSourceMapLoadingCallbacks = {}; 370 this._pendingSourceMapLoadingCallbacks = {};
371 this._sourceMapByStyleSheetURL = {}; 371 this._sourceMapByStyleSheetURL = {};
372 this._cssURLsForSASSURL = {}; 372 this._cssURLsForSASSURL = {};
373 this._timeoutForURL = {}; 373 this._timeoutForURL = {};
374 } 374 }
375 } 375 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698