Index: Source/devtools/front_end/audits/AuditRules.js |
diff --git a/Source/devtools/front_end/audits/AuditRules.js b/Source/devtools/front_end/audits/AuditRules.js |
index 2d92316effac8da9201e0876a6ed3b6ed4b7f323..bf7067cce18e7290a3aedcffde3083034354b476 100644 |
--- a/Source/devtools/front_end/audits/AuditRules.js |
+++ b/Source/devtools/front_end/audits/AuditRules.js |
@@ -941,23 +941,15 @@ WebInspector.AuditRules.ImageDimensionsRule.prototype = { |
var targetResult = {}; |
/** |
- * @param {?WebInspector.CSSStyleModel.InlineStyleResult} inlineStyleResult |
- */ |
- function inlineCallback(inlineStyleResult) |
- { |
- if (!inlineStyleResult) |
- return; |
- targetResult.inlineStyle = inlineStyleResult.inlineStyle; |
- targetResult.attributesStyle = inlineStyleResult.attributesStyle; |
- } |
- |
- /** |
* @param {?WebInspector.CSSStyleModel.MatchedStyleResult} matchedStyleResult |
*/ |
function matchedCallback(matchedStyleResult) |
{ |
- if (matchedStyleResult) |
- targetResult.matchedCSSRules = matchedStyleResult.matchedCSSRules; |
+ if (!matchedStyleResult) |
+ return; |
+ targetResult.matchedCSSRules = matchedStyleResult.matchedCSSRules; |
+ targetResult.inlineStyle = matchedStyleResult.inlineStyle; |
+ targetResult.attributesStyle = matchedStyleResult.attributesStyle; |
} |
/** |
@@ -975,7 +967,6 @@ WebInspector.AuditRules.ImageDimensionsRule.prototype = { |
for (var i = 0; nodeIds && i < nodeIds.length; ++i) { |
var stylePromises = [ |
cssModel.matchedStylesPromise(nodeIds[i]).then(matchedCallback), |
- cssModel.inlineStylesPromise(nodeIds[i]).then(inlineCallback), |
cssModel.computedStylePromise(nodeIds[i]).then(computedCallback) |
]; |
var nodePromise = Promise.all(stylePromises).then(imageStylesReady.bind(null, nodeIds[i], targetResult)); |