| 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 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 return true; | 197 return true; |
| 198 default: | 198 default: |
| 199 break; | 199 break; |
| 200 } | 200 } |
| 201 | 201 |
| 202 if (!tagName.isEmpty()) { | 202 if (!tagName.isEmpty()) { |
| 203 addToRuleSet(tagName, ensurePendingRules()->tagRules, ruleData); | 203 addToRuleSet(tagName, ensurePendingRules()->tagRules, ruleData); |
| 204 return true; | 204 return true; |
| 205 } | 205 } |
| 206 | 206 |
| 207 // TODO(esprehn): We shouldn't favor tagName over m_shadowHostRules, it mean
s | |
| 208 // selectors with div:host end up in the tagName list matched against all ta
gs | |
| 209 // even though they can't match anything at all. | |
| 210 if (component.isHostPseudoClass()) { | 207 if (component.isHostPseudoClass()) { |
| 208 ASSERT(component.isLastInTagHistory() || (component.relation() == CSSSel
ector::SubSelector && component.tagHistory()->match() == CSSSelector::PseudoElem
ent)); |
| 211 m_shadowHostRules.append(ruleData); | 209 m_shadowHostRules.append(ruleData); |
| 212 return true; | 210 return true; |
| 213 } | 211 } |
| 214 | 212 |
| 215 return false; | 213 return false; |
| 216 } | 214 } |
| 217 | 215 |
| 218 void RuleSet::addRule(StyleRule* rule, unsigned selectorIndex, AddRuleFlags addR
uleFlags) | 216 void RuleSet::addRule(StyleRule* rule, unsigned selectorIndex, AddRuleFlags addR
uleFlags) |
| 219 { | 217 { |
| 220 RuleData ruleData(rule, selectorIndex, m_ruleCount++, addRuleFlags); | 218 RuleData ruleData(rule, selectorIndex, m_ruleCount++, addRuleFlags); |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 | 399 |
| 402 #ifndef NDEBUG | 400 #ifndef NDEBUG |
| 403 void RuleSet::show() const | 401 void RuleSet::show() const |
| 404 { | 402 { |
| 405 for (const auto& rule: m_allRules) | 403 for (const auto& rule: m_allRules) |
| 406 rule.selector().show(); | 404 rule.selector().show(); |
| 407 } | 405 } |
| 408 #endif | 406 #endif |
| 409 | 407 |
| 410 } // namespace blink | 408 } // namespace blink |
| OLD | NEW |