Replace static_casts with to* helper functions.
[WebKit-https.git] / Source / WebCore / css / ElementRuleCollector.cpp
index 64fb3d1..6ff2062 100644 (file)
@@ -191,7 +191,7 @@ void ElementRuleCollector::collectMatchingRulesForRegion(const MatchRequest& mat
     unsigned size = matchRequest.ruleSet->m_regionSelectorsAndRuleSets.size();
     for (unsigned i = 0; i < size; ++i) {
         const CSSSelector* regionSelector = matchRequest.ruleSet->m_regionSelectorsAndRuleSets.at(i).selector;
-        if (checkRegionSelector(regionSelector, static_cast<Element*>(m_regionForStyling->node()))) {
+        if (checkRegionSelector(regionSelector, toElement(m_regionForStyling->node()))) {
             RuleSet* regionRules = matchRequest.ruleSet->m_regionSelectorsAndRuleSets.at(i).ruleSet.get();
             ASSERT(regionRules);
             collectMatchingRules(MatchRequest(regionRules, matchRequest.includeEmptyRules, matchRequest.scope), ruleRange);