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 | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All |
6 * rights reserved. | 6 * 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 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1121 if (m_nthInvalidationSet) | 1121 if (m_nthInvalidationSet) |
1122 invalidationLists.descendants.push_back(m_nthInvalidationSet); | 1122 invalidationLists.descendants.push_back(m_nthInvalidationSet); |
1123 } | 1123 } |
1124 | 1124 |
1125 DescendantInvalidationSet& RuleFeatureSet::ensureNthInvalidationSet() { | 1125 DescendantInvalidationSet& RuleFeatureSet::ensureNthInvalidationSet() { |
1126 if (!m_nthInvalidationSet) | 1126 if (!m_nthInvalidationSet) |
1127 m_nthInvalidationSet = DescendantInvalidationSet::create(); | 1127 m_nthInvalidationSet = DescendantInvalidationSet::create(); |
1128 return *m_nthInvalidationSet; | 1128 return *m_nthInvalidationSet; |
1129 } | 1129 } |
1130 | 1130 |
| 1131 void RuleFeatureSet::collectTypeRuleInvalidationSet( |
| 1132 InvalidationLists& invalidationLists, |
| 1133 ContainerNode& rootNode) const { |
| 1134 if (m_typeRuleInvalidationSet) { |
| 1135 invalidationLists.descendants.push_back(m_typeRuleInvalidationSet); |
| 1136 TRACE_SCHEDULE_STYLE_INVALIDATION(rootNode, *m_typeRuleInvalidationSet, |
| 1137 ruleSetInvalidation); |
| 1138 } |
| 1139 } |
| 1140 |
| 1141 DescendantInvalidationSet& RuleFeatureSet::ensureTypeRuleInvalidationSet() { |
| 1142 if (!m_typeRuleInvalidationSet) |
| 1143 m_typeRuleInvalidationSet = DescendantInvalidationSet::create(); |
| 1144 return *m_typeRuleInvalidationSet; |
| 1145 } |
| 1146 |
1131 void RuleFeatureSet::addFeaturesToUniversalSiblingInvalidationSet( | 1147 void RuleFeatureSet::addFeaturesToUniversalSiblingInvalidationSet( |
1132 const InvalidationSetFeatures& siblingFeatures, | 1148 const InvalidationSetFeatures& siblingFeatures, |
1133 const InvalidationSetFeatures& descendantFeatures) { | 1149 const InvalidationSetFeatures& descendantFeatures) { |
1134 SiblingInvalidationSet& universalSet = | 1150 SiblingInvalidationSet& universalSet = |
1135 ensureUniversalSiblingInvalidationSet(); | 1151 ensureUniversalSiblingInvalidationSet(); |
1136 addFeaturesToInvalidationSet(universalSet, siblingFeatures); | 1152 addFeaturesToInvalidationSet(universalSet, siblingFeatures); |
1137 universalSet.updateMaxDirectAdjacentSelectors( | 1153 universalSet.updateMaxDirectAdjacentSelectors( |
1138 siblingFeatures.maxDirectAdjacentSelectors); | 1154 siblingFeatures.maxDirectAdjacentSelectors); |
1139 | 1155 |
1140 if (&siblingFeatures == &descendantFeatures) | 1156 if (&siblingFeatures == &descendantFeatures) |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1173 return !classes.isEmpty() || !attributes.isEmpty() || !ids.isEmpty() || | 1189 return !classes.isEmpty() || !attributes.isEmpty() || !ids.isEmpty() || |
1174 !tagNames.isEmpty() || customPseudoElement; | 1190 !tagNames.isEmpty() || customPseudoElement; |
1175 } | 1191 } |
1176 | 1192 |
1177 bool RuleFeatureSet::InvalidationSetFeatures::hasTagIdClassOrAttribute() const { | 1193 bool RuleFeatureSet::InvalidationSetFeatures::hasTagIdClassOrAttribute() const { |
1178 return !classes.isEmpty() || !attributes.isEmpty() || !ids.isEmpty() || | 1194 return !classes.isEmpty() || !attributes.isEmpty() || !ids.isEmpty() || |
1179 !tagNames.isEmpty(); | 1195 !tagNames.isEmpty(); |
1180 } | 1196 } |
1181 | 1197 |
1182 } // namespace blink | 1198 } // namespace blink |
OLD | NEW |