function evalCallback(styleSheets) {
            if (!styleSheets.length)
                return callback(null);

            var selectors = [];
            var testedSelectors = {};
            for (var i = 0; i < styleSheets.length; ++i) {
                var styleSheet = styleSheets[i];
                for (var curRule = 0; curRule < styleSheet.rules.length; ++curRule) {
                    var selectorText = styleSheet.rules[curRule].selectorText;
                    if (testedSelectors[selectorText])
                        continue;
                    selectors.push(selectorText);
                    testedSelectors[selectorText] = 1;
                }
            }

            var foundSelectors = {};

            /**
             * @param {!Array.<!WebInspector.AuditRules.ParsedStyleSheet>} styleSheets
             */
            function selectorsCallback(styleSheets)
            {
                if (progress.isCanceled()) {
                    callback(null);
                    return;
                }

                var inlineBlockOrdinal = 0;
                var totalStylesheetSize = 0;
                var totalUnusedStylesheetSize = 0;
                var summary;

                for (var i = 0; i < styleSheets.length; ++i) {
                    var styleSheet = styleSheets[i];
                    var unusedRules = [];
                    for (var curRule = 0; curRule < styleSheet.rules.length; ++curRule) {
                        var rule = styleSheet.rules[curRule];
                        if (!testedSelectors[rule.selectorText] || foundSelectors[rule.selectorText])
                            continue;
                        unusedRules.push(rule.selectorText);
                    }
                    totalStylesheetSize += styleSheet.rules.length;
                    totalUnusedStylesheetSize += unusedRules.length;

                    if (!unusedRules.length)
                        continue;

                    var resource = WebInspector.resourceForURL(styleSheet.sourceURL);
                    var isInlineBlock = resource && resource.request && resource.request.resourceType() === WebInspector.resourceTypes.Document;
                    var url = !isInlineBlock ? WebInspector.AuditRuleResult.linkifyDisplayName(styleSheet.sourceURL) : WebInspector.UIString("Inline block #%d", ++inlineBlockOrdinal);
                    var pctUnused = Math.round(100 * unusedRules.length / styleSheet.rules.length);
                    if (!summary)
                        summary = result.addChild("", true);
                    var entry = summary.addFormatted("%s: %d% is not used by the current page.", url, pctUnused);

                    for (var j = 0; j < unusedRules.length; ++j)
                        entry.addSnippet(unusedRules[j]);

                    result.violationCount += unusedRules.length;
                }

                if (!totalUnusedStylesheetSize)
                    return callback(null);

                var totalUnusedPercent = Math.round(100 * totalUnusedStylesheetSize / totalStylesheetSize);
                summary.value = WebInspector.UIString("%s rules (%d%) of CSS not used by the current page.", totalUnusedStylesheetSize, totalUnusedPercent);

                callback(result);
            }

            /**
             * @param {?function()} boundSelectorsCallback
             * @param {string} selector
             * @param {?DOMAgent.NodeId} nodeId
             */
            function queryCallback(boundSelectorsCallback, selector, nodeId)
            {
                if (nodeId)
                    foundSelectors[selector] = true;
                if (boundSelectorsCallback)
                    boundSelectorsCallback();
            }

            /**
             * @param {!Array.<string>} selectors
             * @param {!WebInspector.DOMDocument} document
             */
            function documentLoaded(selectors, document) {
                var pseudoSelectorRegexp = /::?(?:[\w-]+)(?:\(.*?\))?/g;
                if (!selectors.length) {
                    selectorsCallback([]);
                    return;
                }
                for (var i = 0; i < selectors.length; ++i) {
                    if (progress.isCanceled()) {
                        callback(null);
                        return;
                    }
                    var effectiveSelector = selectors[i].replace(pseudoSelectorRegexp, "");
                    domModel.querySelector(document.id, effectiveSelector, queryCallback.bind(null, i === selectors.length - 1 ? selectorsCallback.bind(null, styleSheets) : null, selectors[i]));
                }
            }

            domModel.requestDocument(documentLoaded.bind(null, selectors));
        }
@param {!Array.<!WebInspector.AuditRules.ParsedStyleSheet>} styleSheets