| 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 | 336 |
| 337 /** | 337 /** |
| 338 * @param {!WebInspector.Resource} resource | 338 * @param {!WebInspector.Resource} resource |
| 339 */ | 339 */ |
| 340 _addResource: function(resource) | 340 _addResource: function(resource) |
| 341 { | 341 { |
| 342 var resourceType = resource.resourceType(); | 342 var resourceType = resource.resourceType(); |
| 343 // Only load selected resource types from resources. | 343 // Only load selected resource types from resources. |
| 344 if (resourceType !== WebInspector.resourceTypes.Image && | 344 if (resourceType !== WebInspector.resourceTypes.Image && |
| 345 resourceType !== WebInspector.resourceTypes.Font && | 345 resourceType !== WebInspector.resourceTypes.Font && |
| 346 resourceType !== WebInspector.resourceTypes.Document) { | 346 resourceType !== WebInspector.resourceTypes.Document && |
| 347 resourceType !== WebInspector.resourceTypes.Manifest) { |
| 347 return; | 348 return; |
| 348 } | 349 } |
| 349 | 350 |
| 350 // Ignore non-images and non-fonts. | 351 // Ignore non-images and non-fonts. |
| 351 if (resourceType === WebInspector.resourceTypes.Image && resource.mimeTy
pe && !resource.mimeType.startsWith("image")) | 352 if (resourceType === WebInspector.resourceTypes.Image && resource.mimeTy
pe && !resource.mimeType.startsWith("image")) |
| 352 return; | 353 return; |
| 353 if (resourceType === WebInspector.resourceTypes.Font && resource.mimeTyp
e && !resource.mimeType.includes("font")) | 354 if (resourceType === WebInspector.resourceTypes.Font && resource.mimeTyp
e && !resource.mimeType.includes("font")) |
| 354 return; | 355 return; |
| 355 if ((resourceType === WebInspector.resourceTypes.Image || resourceType =
== WebInspector.resourceTypes.Font) && resource.contentURL().startsWith("data:")
) | 356 if ((resourceType === WebInspector.resourceTypes.Image || resourceType =
== WebInspector.resourceTypes.Font) && resource.contentURL().startsWith("data:")
) |
| 356 return; | 357 return; |
| (...skipping 82 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 |