| OLD | NEW |
| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 301 |
| 302 /** | 302 /** |
| 303 * @param {!WebInspector.Event} event | 303 * @param {!WebInspector.Event} event |
| 304 */ | 304 */ |
| 305 _styleSheetAdded: function(event) | 305 _styleSheetAdded: function(event) |
| 306 { | 306 { |
| 307 var header = /** @type {!WebInspector.CSSStyleSheetHeader} */ (event.dat
a); | 307 var header = /** @type {!WebInspector.CSSStyleSheetHeader} */ (event.dat
a); |
| 308 if (header.isInline && !header.hasSourceURL && header.origin !== "inspec
tor") | 308 if (header.isInline && !header.hasSourceURL && header.origin !== "inspec
tor") |
| 309 return; | 309 return; |
| 310 | 310 |
| 311 var uiSourceCode = this._createFile(header, WebInspector.ResourceTreeFra
me.fromStyleSheet(header), false); | 311 var originalContentProvider = header.originalContentProvider(); |
| 312 var uiSourceCode = this._createFile(originalContentProvider, WebInspecto
r.ResourceTreeFrame.fromStyleSheet(header), false); |
| 312 if (uiSourceCode) { | 313 if (uiSourceCode) { |
| 313 uiSourceCode[WebInspector.NetworkProject._styleSheetSymbol] = header
; | 314 uiSourceCode[WebInspector.NetworkProject._styleSheetSymbol] = header
; |
| 314 this._addUISourceCodeWithProvider(uiSourceCode, header); | 315 this._addUISourceCodeWithProvider(uiSourceCode, originalContentProvi
der); |
| 315 } | 316 } |
| 316 }, | 317 }, |
| 317 | 318 |
| 318 /** | 319 /** |
| 319 * @param {!WebInspector.Event} event | 320 * @param {!WebInspector.Event} event |
| 320 */ | 321 */ |
| 321 _styleSheetRemoved: function(event) | 322 _styleSheetRemoved: function(event) |
| 322 { | 323 { |
| 323 var header = /** @type {!WebInspector.CSSStyleSheetHeader} */ (event.dat
a); | 324 var header = /** @type {!WebInspector.CSSStyleSheetHeader} */ (event.dat
a); |
| 324 if (header.isInline && !header.hasSourceURL && header.origin !== "inspec
tor") | 325 if (header.isInline && !header.hasSourceURL && header.origin !== "inspec
tor") |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 | 440 |
| 440 _reset: function() | 441 _reset: function() |
| 441 { | 442 { |
| 442 for (var project of this._workspaceProjects.values()) | 443 for (var project of this._workspaceProjects.values()) |
| 443 project.reset(); | 444 project.reset(); |
| 444 this._workspaceProjects.clear(); | 445 this._workspaceProjects.clear(); |
| 445 }, | 446 }, |
| 446 | 447 |
| 447 __proto__: WebInspector.SDKObject.prototype | 448 __proto__: WebInspector.SDKObject.prototype |
| 448 } | 449 } |
| OLD | NEW |