| Index: Source/core/css/ElementRuleCollector.cpp
|
| diff --git a/Source/core/css/ElementRuleCollector.cpp b/Source/core/css/ElementRuleCollector.cpp
|
| index ed245341ee8f55b0216a8778fc6ba3333af4da53..5fa2a5f9280f1f3511728f9877581edc84c406a3 100644
|
| --- a/Source/core/css/ElementRuleCollector.cpp
|
| +++ b/Source/core/css/ElementRuleCollector.cpp
|
| @@ -280,12 +280,14 @@ void ElementRuleCollector::collectRuleIfMatches(const RuleData& ruleData, Cascad
|
| return;
|
|
|
| StyleRule* rule = ruleData.rule();
|
| +
|
| + // If the rule has no properties to apply, then ignore it in the non-debug mode.
|
| + const StylePropertySet& properties = rule->properties();
|
| + if (properties.isEmpty() && !matchRequest.includeEmptyRules)
|
| + return;
|
| +
|
| SelectorChecker::MatchResult result;
|
| if (ruleMatches(ruleData, matchRequest.scope, &result)) {
|
| - // If the rule has no properties to apply, then ignore it in the non-debug mode.
|
| - const StylePropertySet& properties = rule->properties();
|
| - if (properties.isEmpty() && !matchRequest.includeEmptyRules)
|
| - return;
|
| // FIXME: Exposing the non-standard getMatchedCSSRules API to web is the only reason this is needed.
|
| if (m_sameOriginOnly && !ruleData.hasDocumentSecurityOrigin())
|
| return;
|
|
|