OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef StyleInvalidator_h | 5 #ifndef StyleInvalidator_h |
6 #define StyleInvalidator_h | 6 #define StyleInvalidator_h |
7 | 7 |
8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
9 | 9 |
10 namespace WebCore { | 10 namespace WebCore { |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 struct RecursionData { | 37 struct RecursionData { |
38 RecursionData() | 38 RecursionData() |
39 : m_invalidateCustomPseudo(false) | 39 : m_invalidateCustomPseudo(false) |
40 , m_wholeSubtreeInvalid(false) | 40 , m_wholeSubtreeInvalid(false) |
41 , m_treeBoundaryCrossing(false) | 41 , m_treeBoundaryCrossing(false) |
42 { } | 42 { } |
43 | 43 |
44 void pushInvalidationSet(const DescendantInvalidationSet&); | 44 void pushInvalidationSet(const DescendantInvalidationSet&); |
45 bool matchesCurrentInvalidationSets(Element&); | 45 bool matchesCurrentInvalidationSets(Element&); |
46 bool hasInvalidationSets() const { return m_invalidationSets.size(); } | 46 bool hasInvalidationSets() const { return !wholeSubtreeInvalid() && m_in
validationSets.size(); } |
47 | 47 |
48 bool wholeSubtreeInvalid() const { return m_wholeSubtreeInvalid; } | 48 bool wholeSubtreeInvalid() const { return m_wholeSubtreeInvalid; } |
49 void setWholeSubtreeInvalid() { m_wholeSubtreeInvalid = true; } | 49 void setWholeSubtreeInvalid() { m_wholeSubtreeInvalid = true; } |
50 | 50 |
51 bool treeBoundaryCrossing() const { return m_treeBoundaryCrossing; } | 51 bool treeBoundaryCrossing() const { return m_treeBoundaryCrossing; } |
52 | 52 |
53 typedef Vector<const DescendantInvalidationSet*, 16> InvalidationSets; | 53 typedef Vector<const DescendantInvalidationSet*, 16> InvalidationSets; |
54 InvalidationSets m_invalidationSets; | 54 InvalidationSets m_invalidationSets; |
55 bool m_invalidateCustomPseudo; | 55 bool m_invalidateCustomPseudo; |
56 bool m_wholeSubtreeInvalid; | 56 bool m_wholeSubtreeInvalid; |
(...skipping 30 matching lines...) Expand all Loading... |
87 | 87 |
88 InvalidationList& ensurePendingInvalidationList(Element&); | 88 InvalidationList& ensurePendingInvalidationList(Element&); |
89 | 89 |
90 PendingInvalidationMap m_pendingInvalidationMap; | 90 PendingInvalidationMap m_pendingInvalidationMap; |
91 RecursionData m_recursionData; | 91 RecursionData m_recursionData; |
92 }; | 92 }; |
93 | 93 |
94 } // namespace WebCore | 94 } // namespace WebCore |
95 | 95 |
96 #endif // StyleInvalidator_h | 96 #endif // StyleInvalidator_h |
OLD | NEW |