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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js

Issue 2698183003: DevTools: teach automapping to map complex sourcemap setups. (Closed)
Patch Set: rebaseline Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/text-source-map-expected.txt ('k') | 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 /* 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 _parseSources(sourceMap) { 416 _parseSources(sourceMap) {
417 var sourcesList = []; 417 var sourcesList = [];
418 var sourceRoot = sourceMap.sourceRoot || ''; 418 var sourceRoot = sourceMap.sourceRoot || '';
419 if (sourceRoot && !sourceRoot.endsWith('/')) 419 if (sourceRoot && !sourceRoot.endsWith('/'))
420 sourceRoot += '/'; 420 sourceRoot += '/';
421 for (var i = 0; i < sourceMap.sources.length; ++i) { 421 for (var i = 0; i < sourceMap.sources.length; ++i) {
422 var href = sourceRoot + sourceMap.sources[i]; 422 var href = sourceRoot + sourceMap.sources[i];
423 var url = Common.ParsedURL.completeURL(this._sourceMappingURL, href) || hr ef; 423 var url = Common.ParsedURL.completeURL(this._sourceMappingURL, href) || hr ef;
424 var source = sourceMap.sourcesContent && sourceMap.sourcesContent[i]; 424 var source = sourceMap.sourcesContent && sourceMap.sourcesContent[i];
425 if (url === this._compiledURL && source) 425 if (url === this._compiledURL && source)
426 url += Common.UIString(' [sm]'); 426 url += Common.UIString('? [sm]');
427 this._sourceInfos.set(url, new SDK.TextSourceMap.SourceInfo(source, null)) ; 427 this._sourceInfos.set(url, new SDK.TextSourceMap.SourceInfo(source, null)) ;
428 sourcesList.push(url); 428 sourcesList.push(url);
429 } 429 }
430 sourceMap[SDK.TextSourceMap._sourcesListSymbol] = sourcesList; 430 sourceMap[SDK.TextSourceMap._sourcesListSymbol] = sourcesList;
431 } 431 }
432 432
433 /** 433 /**
434 * @param {!SDK.SourceMapV3} map 434 * @param {!SDK.SourceMapV3} map
435 * @param {number} lineNumber 435 * @param {number} lineNumber
436 * @param {number} columnNumber 436 * @param {number} columnNumber
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 * @param {?string} content 589 * @param {?string} content
590 * @param {?Array<!SDK.SourceMapEntry>} reverseMappings 590 * @param {?Array<!SDK.SourceMapEntry>} reverseMappings
591 */ 591 */
592 constructor(content, reverseMappings) { 592 constructor(content, reverseMappings) {
593 this.content = content; 593 this.content = content;
594 this.reverseMappings = reverseMappings; 594 this.reverseMappings = reverseMappings;
595 } 595 }
596 }; 596 };
597 597
598 SDK.TextSourceMap._sourcesListSymbol = Symbol('sourcesList'); 598 SDK.TextSourceMap._sourcesListSymbol = Symbol('sourcesList');
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/text-source-map-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698