| 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 if (pseudoId == "-webkit-input-placeholder") { |
| 200 collectMatchingRulesForList( |
| 201 matchRequest.ruleSet->placeholderPseudoRules(), cascadeOrder, |
| 202 matchRequest); |
| 203 } |
| 199 } | 204 } |
| 200 | 205 |
| 201 if (element.isVTTElement()) | 206 if (element.isVTTElement()) |
| 202 collectMatchingRulesForList(matchRequest.ruleSet->cuePseudoRules(), | 207 collectMatchingRulesForList(matchRequest.ruleSet->cuePseudoRules(), |
| 203 cascadeOrder, matchRequest); | 208 cascadeOrder, matchRequest); |
| 204 // Check whether other types of rules are applicable in the current tree | 209 // Check whether other types of rules are applicable in the current tree |
| 205 // scope. Criteria for this: | 210 // scope. Criteria for this: |
| 206 // a) the rules are UA rules. | 211 // a) the rules are UA rules. |
| 207 // b) matching tree boundary crossing rules. | 212 // b) matching tree boundary crossing rules. |
| 208 // c) the rules come from a shadow style sheet in the same tree scope as the | 213 // 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(); | 376 return !m_matchedRules.isEmpty(); |
| 372 } | 377 } |
| 373 | 378 |
| 374 void ElementRuleCollector::addMatchedRulesToTracker( | 379 void ElementRuleCollector::addMatchedRulesToTracker( |
| 375 StyleRuleUsageTracker* tracker) const { | 380 StyleRuleUsageTracker* tracker) const { |
| 376 for (auto matchedRule : m_matchedRules) | 381 for (auto matchedRule : m_matchedRules) |
| 377 tracker->track(matchedRule.ruleData()->rule()); | 382 tracker->track(matchedRule.ruleData()->rule()); |
| 378 } | 383 } |
| 379 | 384 |
| 380 } // namespace blink | 385 } // namespace blink |
| OLD | NEW |