OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 this._styleSheetsParsedCallback(this._styleSheets); | 527 this._styleSheetsParsedCallback(this._styleSheets); |
528 }, | 528 }, |
529 | 529 |
530 _processNextStyleSheet: function() | 530 _processNextStyleSheet: function() |
531 { | 531 { |
532 if (!this._styleSheetHeaders.length) { | 532 if (!this._styleSheetHeaders.length) { |
533 this._finish(); | 533 this._finish(); |
534 return; | 534 return; |
535 } | 535 } |
536 this._currentStyleSheetHeader = this._styleSheetHeaders.shift(); | 536 this._currentStyleSheetHeader = this._styleSheetHeaders.shift(); |
537 this._parser.fetchAndParse(this._currentStyleSheetHeader, this._onStyleS
heetParsed.bind(this)); | 537 this._parser.fetchAndParse(this._currentStyleSheetHeader).then(this._onS
tyleSheetParsed.bind(this)).done(); |
538 }, | 538 }, |
539 | 539 |
540 /** | 540 /** |
541 * @param {!Array.<!WebInspector.CSSParser.Rule>} rules | 541 * @param {!Array.<!WebInspector.CSSParser.Rule>} rules |
542 */ | 542 */ |
543 _onStyleSheetParsed: function(rules) | 543 _onStyleSheetParsed: function(rules) |
544 { | 544 { |
545 if (this._progress.isCanceled()) { | 545 if (this._progress.isCanceled()) { |
546 this._terminateWorker(); | 546 this._terminateWorker(); |
547 return; | 547 return; |
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1597 result.violationCount = badUrls.length; | 1597 result.violationCount = badUrls.length; |
1598 }, | 1598 }, |
1599 | 1599 |
1600 _collectorCallback: function(matchingResourceData, request, cookie) | 1600 _collectorCallback: function(matchingResourceData, request, cookie) |
1601 { | 1601 { |
1602 matchingResourceData[request.url] = (matchingResourceData[request.url] |
| 0) + cookie.size(); | 1602 matchingResourceData[request.url] = (matchingResourceData[request.url] |
| 0) + cookie.size(); |
1603 }, | 1603 }, |
1604 | 1604 |
1605 __proto__: WebInspector.AuditRules.CookieRuleBase.prototype | 1605 __proto__: WebInspector.AuditRules.CookieRuleBase.prototype |
1606 } | 1606 } |
OLD | NEW |