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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js

Issue 1564113003: DevTools: merge uisourcecode's url-alike members. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 11 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
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 if (sourceMap) 149 if (sourceMap)
150 this._sourceMapByURL[completeSourceMapURL] = sourceMap; 150 this._sourceMapByURL[completeSourceMapURL] = sourceMap;
151 else 151 else
152 delete this._sourceMapByURL[completeSourceMapURL]; 152 delete this._sourceMapByURL[completeSourceMapURL];
153 153
154 // Then report sources. 154 // Then report sources.
155 var sources = sourceMap ? sourceMap.sources() : []; 155 var sources = sourceMap ? sourceMap.sources() : [];
156 for (var i = 0; i < sources.length; ++i) { 156 for (var i = 0; i < sources.length; ++i) {
157 var sassURL = sources[i]; 157 var sassURL = sources[i];
158 if (!this._networkMapping.hasMappingForURL(sassURL)) { 158 if (!this._networkMapping.hasMappingForNetworkURL(sassURL)) {
159 var contentProvider = sourceMap.sourceContentProvider(sassUR L, WebInspector.resourceTypes.SourceMapStyleSheet); 159 var contentProvider = sourceMap.sourceContentProvider(sassUR L, WebInspector.resourceTypes.SourceMapStyleSheet);
160 this._networkProject.addFileForURL(sassURL, contentProvider, WebInspector.ResourceTreeFrame.fromStyleSheet(header)); 160 this._networkProject.addFileForURL(sassURL, contentProvider, WebInspector.ResourceTreeFrame.fromStyleSheet(header));
161 } 161 }
162 } 162 }
163 163
164 for (var i = 0; callbacks && i < callbacks.length; ++i) 164 for (var i = 0; callbacks && i < callbacks.length; ++i)
165 callbacks[i](sourceMap); 165 callbacks[i](sourceMap);
166 } 166 }
167 }, 167 },
168 168
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 227
228 _reset: function() 228 _reset: function()
229 { 229 {
230 /** @type {!Object.<string, !Array.<function(?WebInspector.SourceMap)>>} */ 230 /** @type {!Object.<string, !Array.<function(?WebInspector.SourceMap)>>} */
231 this._pendingSourceMapLoadingCallbacks = {}; 231 this._pendingSourceMapLoadingCallbacks = {};
232 /** @type {!Object.<string, !WebInspector.SourceMap>} */ 232 /** @type {!Object.<string, !WebInspector.SourceMap>} */
233 this._sourceMapByURL = {}; 233 this._sourceMapByURL = {};
234 this._sourceMapByStyleSheetURL = {}; 234 this._sourceMapByStyleSheetURL = {};
235 } 235 }
236 } 236 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698