| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 163 |
| 164 unsigned ruleCount() const { return m_ruleCount; } | 164 unsigned ruleCount() const { return m_ruleCount; } |
| 165 | 165 |
| 166 void compactRulesIfNeeded() | 166 void compactRulesIfNeeded() |
| 167 { | 167 { |
| 168 if (!m_pendingRules) | 168 if (!m_pendingRules) |
| 169 return; | 169 return; |
| 170 compactRules(); | 170 compactRules(); |
| 171 } | 171 } |
| 172 | 172 |
| 173 bool hasSlottedRules() const { return !m_slottedPseudoElementRules.isEmpty()
; } |
| 174 |
| 175 bool hasV0BoundaryCrossingRules() const |
| 176 { |
| 177 return !m_deepCombinatorOrShadowPseudoRules.isEmpty() |
| 178 || !m_contentPseudoElementRules.isEmpty(); |
| 179 } |
| 180 |
| 181 bool needsFullRecalcForRuleSetInvalidation() const |
| 182 { |
| 183 return m_features.needsFullRecalcForRuleSetInvalidation() |
| 184 || hasV0BoundaryCrossingRules(); |
| 185 } |
| 186 |
| 173 #ifndef NDEBUG | 187 #ifndef NDEBUG |
| 174 void show() const; | 188 void show() const; |
| 175 #endif | 189 #endif |
| 176 | 190 |
| 177 DECLARE_TRACE(); | 191 DECLARE_TRACE(); |
| 178 | 192 |
| 179 private: | 193 private: |
| 180 using PendingRuleMap = HeapHashMap<AtomicString, Member<HeapLinkedStack<Rule
Data>>>; | 194 using PendingRuleMap = HeapHashMap<AtomicString, Member<HeapLinkedStack<Rule
Data>>>; |
| 181 using CompactRuleMap = HeapHashMap<AtomicString, Member<HeapTerminatedArray<
RuleData>>>; | 195 using CompactRuleMap = HeapHashMap<AtomicString, Member<HeapTerminatedArray<
RuleData>>>; |
| 182 | 196 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 Member<PendingRuleMaps> m_pendingRules; | 258 Member<PendingRuleMaps> m_pendingRules; |
| 245 | 259 |
| 246 #ifndef NDEBUG | 260 #ifndef NDEBUG |
| 247 HeapVector<RuleData> m_allRules; | 261 HeapVector<RuleData> m_allRules; |
| 248 #endif | 262 #endif |
| 249 }; | 263 }; |
| 250 | 264 |
| 251 } // namespace blink | 265 } // namespace blink |
| 252 | 266 |
| 253 #endif // RuleSet_h | 267 #endif // RuleSet_h |
| OLD | NEW |