| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. |
| 6 * All rights reserved. | 6 * All rights reserved. |
| 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 ASSERT(matchRequest.ruleSet); | 189 ASSERT(matchRequest.ruleSet); |
| 190 ASSERT(m_context.element()); | 190 ASSERT(m_context.element()); |
| 191 | 191 |
| 192 Element& element = *m_context.element(); | 192 Element& element = *m_context.element(); |
| 193 const AtomicString& pseudoId = element.shadowPseudoId(); | 193 const AtomicString& pseudoId = element.shadowPseudoId(); |
| 194 if (!pseudoId.isEmpty()) { | 194 if (!pseudoId.isEmpty()) { |
| 195 ASSERT(element.isStyledElement()); | 195 ASSERT(element.isStyledElement()); |
| 196 collectMatchingRulesForList( | 196 collectMatchingRulesForList( |
| 197 matchRequest.ruleSet->shadowPseudoElementRules(pseudoId), cascadeOrder, | 197 matchRequest.ruleSet->shadowPseudoElementRules(pseudoId), cascadeOrder, |
| 198 matchRequest); | 198 matchRequest); |
| 199 AtomicString alias = CSSSelector::aliasForShadowPseudoId(pseudoId); |
| 200 if (!alias.isEmpty()) { |
| 201 collectMatchingRulesForList( |
| 202 matchRequest.ruleSet->shadowPseudoElementRules(alias), cascadeOrder, |
| 203 matchRequest); |
| 204 } |
| 199 } | 205 } |
| 200 | 206 |
| 201 if (element.isVTTElement()) | 207 if (element.isVTTElement()) |
| 202 collectMatchingRulesForList(matchRequest.ruleSet->cuePseudoRules(), | 208 collectMatchingRulesForList(matchRequest.ruleSet->cuePseudoRules(), |
| 203 cascadeOrder, matchRequest); | 209 cascadeOrder, matchRequest); |
| 204 // Check whether other types of rules are applicable in the current tree | 210 // Check whether other types of rules are applicable in the current tree |
| 205 // scope. Criteria for this: | 211 // scope. Criteria for this: |
| 206 // a) the rules are UA rules. | 212 // a) the rules are UA rules. |
| 207 // b) matching tree boundary crossing rules. | 213 // b) matching tree boundary crossing rules. |
| 208 // c) the rules come from a shadow style sheet in the same tree scope as the | 214 // c) the rules come from a shadow style sheet in the same tree scope as the |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 return !m_matchedRules.isEmpty(); | 377 return !m_matchedRules.isEmpty(); |
| 372 } | 378 } |
| 373 | 379 |
| 374 void ElementRuleCollector::addMatchedRulesToTracker( | 380 void ElementRuleCollector::addMatchedRulesToTracker( |
| 375 StyleRuleUsageTracker* tracker) const { | 381 StyleRuleUsageTracker* tracker) const { |
| 376 for (auto matchedRule : m_matchedRules) | 382 for (auto matchedRule : m_matchedRules) |
| 377 tracker->track(matchedRule.ruleData()->rule()); | 383 tracker->track(matchedRule.ruleData()->rule()); |
| 378 } | 384 } |
| 379 | 385 |
| 380 } // namespace blink | 386 } // namespace blink |
| OLD | NEW |