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

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

Issue 1641893002: DevTools: [SASS] introduce workspace/cssModel adapter for SASS processor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove settimeout from test Created 4 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/Source/devtools/front_end/sdk/CSSStyleModel.js ('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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return; 107 return;
108 } 108 }
109 109
110 if (content.slice(0, 3) === ")]}") 110 if (content.slice(0, 3) === ")]}")
111 content = content.substring(content.indexOf('\n')); 111 content = content.substring(content.indexOf('\n'));
112 try { 112 try {
113 var payload = /** @type {!SourceMapV3} */ (JSON.parse(content)); 113 var payload = /** @type {!SourceMapV3} */ (JSON.parse(content));
114 var baseURL = sourceMapURL.startsWith("data:") ? compiledURL : sourc eMapURL; 114 var baseURL = sourceMapURL.startsWith("data:") ? compiledURL : sourc eMapURL;
115 callback(new WebInspector.SourceMap(compiledURL, baseURL, payload)); 115 callback(new WebInspector.SourceMap(compiledURL, baseURL, payload));
116 } catch(e) { 116 } catch(e) {
117 console.error(e.message); 117 console.error(e);
118 WebInspector.console.error("Failed to parse SourceMap: " + sourceMap URL); 118 WebInspector.console.error("Failed to parse SourceMap: " + sourceMap URL);
119 callback(null); 119 callback(null);
120 } 120 }
121 } 121 }
122 } 122 }
123 123
124 WebInspector.SourceMap.prototype = { 124 WebInspector.SourceMap.prototype = {
125 /** 125 /**
126 * @return {string} 126 * @return {string}
127 */ 127 */
128 compiledURL: function()
129 {
130 return this._compiledURL;
131 },
132
133 /**
134 * @return {string}
135 */
128 url: function() 136 url: function()
129 { 137 {
130 return this._sourceMappingURL; 138 return this._sourceMappingURL;
131 }, 139 },
132 140
133 /** 141 /**
134 * @return {!Array.<string>} 142 * @return {!Array.<string>}
135 */ 143 */
136 sources: function() 144 sources: function()
137 { 145 {
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 * @param {number=} sourceColumnNumber 424 * @param {number=} sourceColumnNumber
417 */ 425 */
418 WebInspector.SourceMap.Entry = function(lineNumber, columnNumber, sourceURL, sou rceLineNumber, sourceColumnNumber) 426 WebInspector.SourceMap.Entry = function(lineNumber, columnNumber, sourceURL, sou rceLineNumber, sourceColumnNumber)
419 { 427 {
420 this.lineNumber = lineNumber; 428 this.lineNumber = lineNumber;
421 this.columnNumber = columnNumber; 429 this.columnNumber = columnNumber;
422 this.sourceURL = sourceURL; 430 this.sourceURL = sourceURL;
423 this.sourceLineNumber = sourceLineNumber; 431 this.sourceLineNumber = sourceLineNumber;
424 this.sourceColumnNumber = sourceColumnNumber; 432 this.sourceColumnNumber = sourceColumnNumber;
425 } 433 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/CSSStyleModel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698