| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 this._addUISourceCodeWithProvider(uiSourceCode, script, this._resourceMetada
ta(resource)); | 255 this._addUISourceCodeWithProvider(uiSourceCode, script, this._resourceMetada
ta(resource)); |
| 256 } | 256 } |
| 257 | 257 |
| 258 /** | 258 /** |
| 259 * @param {!Common.Event} event | 259 * @param {!Common.Event} event |
| 260 */ | 260 */ |
| 261 _styleSheetAdded(event) { | 261 _styleSheetAdded(event) { |
| 262 var header = /** @type {!SDK.CSSStyleSheetHeader} */ (event.data); | 262 var header = /** @type {!SDK.CSSStyleSheetHeader} */ (event.data); |
| 263 if (header.isInline && !header.hasSourceURL && header.origin !== 'inspector'
) | 263 if (header.isInline && !header.hasSourceURL && header.origin !== 'inspector'
) |
| 264 return; | 264 return; |
| 265 if (!header.resourceURL()) |
| 266 return; |
| 265 | 267 |
| 266 var originalContentProvider = header.originalContentProvider(); | 268 var originalContentProvider = header.originalContentProvider(); |
| 267 var uiSourceCode = this._createFile(originalContentProvider, SDK.ResourceTre
eFrame.fromStyleSheet(header), false); | 269 var uiSourceCode = this._createFile(originalContentProvider, SDK.ResourceTre
eFrame.fromStyleSheet(header), false); |
| 268 uiSourceCode[Bindings.NetworkProject._styleSheetSymbol] = header; | 270 uiSourceCode[Bindings.NetworkProject._styleSheetSymbol] = header; |
| 269 var resource = SDK.ResourceTreeModel.resourceForURL(uiSourceCode.url()); | 271 var resource = SDK.ResourceTreeModel.resourceForURL(uiSourceCode.url()); |
| 270 this._addUISourceCodeWithProvider(uiSourceCode, originalContentProvider, thi
s._resourceMetadata(resource)); | 272 this._addUISourceCodeWithProvider(uiSourceCode, originalContentProvider, thi
s._resourceMetadata(resource)); |
| 271 } | 273 } |
| 272 | 274 |
| 273 /** | 275 /** |
| 274 * @param {!Common.Event} event | 276 * @param {!Common.Event} event |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 return workspace.uiSourceCode(Bindings.NetworkProject.projectId(header.targe
t(), frame, false), url); | 408 return workspace.uiSourceCode(Bindings.NetworkProject.projectId(header.targe
t(), frame, false), url); |
| 407 } | 409 } |
| 408 }; | 410 }; |
| 409 | 411 |
| 410 Bindings.NetworkProject._networkProjectSymbol = Symbol('networkProject'); | 412 Bindings.NetworkProject._networkProjectSymbol = Symbol('networkProject'); |
| 411 Bindings.NetworkProject._resourceSymbol = Symbol('resource'); | 413 Bindings.NetworkProject._resourceSymbol = Symbol('resource'); |
| 412 Bindings.NetworkProject._scriptSymbol = Symbol('script'); | 414 Bindings.NetworkProject._scriptSymbol = Symbol('script'); |
| 413 Bindings.NetworkProject._styleSheetSymbol = Symbol('styleSheet'); | 415 Bindings.NetworkProject._styleSheetSymbol = Symbol('styleSheet'); |
| 414 Bindings.NetworkProject._targetSymbol = Symbol('target'); | 416 Bindings.NetworkProject._targetSymbol = Symbol('target'); |
| 415 Bindings.NetworkProject._frameSymbol = Symbol('frame'); | 417 Bindings.NetworkProject._frameSymbol = Symbol('frame'); |
| OLD | NEW |