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 #include "wtf/Noncopyable.h" | 9 #include "wtf/Noncopyable.h" |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 void pushInvalidationSet(const DescendantInvalidationSet&); | 42 void pushInvalidationSet(const DescendantInvalidationSet&); |
43 bool matchesCurrentInvalidationSets(Element&); | 43 bool matchesCurrentInvalidationSets(Element&); |
44 bool hasInvalidationSets() const { return !wholeSubtreeInvalid() && m_in
validationSets.size(); } | 44 bool hasInvalidationSets() const { return !wholeSubtreeInvalid() && m_in
validationSets.size(); } |
45 | 45 |
46 bool wholeSubtreeInvalid() const { return m_wholeSubtreeInvalid; } | 46 bool wholeSubtreeInvalid() const { return m_wholeSubtreeInvalid; } |
47 void setWholeSubtreeInvalid() { m_wholeSubtreeInvalid = true; } | 47 void setWholeSubtreeInvalid() { m_wholeSubtreeInvalid = true; } |
48 | 48 |
49 bool treeBoundaryCrossing() const { return m_treeBoundaryCrossing; } | 49 bool treeBoundaryCrossing() const { return m_treeBoundaryCrossing; } |
50 bool insertionPointCrossing() const { return m_insertionPointCrossing; } | 50 bool insertionPointCrossing() const { return m_insertionPointCrossing; } |
51 | 51 |
52 typedef Vector<const DescendantInvalidationSet*, 16> InvalidationSets; | 52 using InvalidationSets = Vector<const DescendantInvalidationSet*, 16>; |
53 InvalidationSets m_invalidationSets; | 53 InvalidationSets m_invalidationSets; |
54 bool m_invalidateCustomPseudo; | 54 bool m_invalidateCustomPseudo; |
55 bool m_wholeSubtreeInvalid; | 55 bool m_wholeSubtreeInvalid; |
56 bool m_treeBoundaryCrossing; | 56 bool m_treeBoundaryCrossing; |
57 bool m_insertionPointCrossing; | 57 bool m_insertionPointCrossing; |
58 }; | 58 }; |
59 | 59 |
60 bool invalidate(Element&, RecursionData&); | 60 bool invalidate(Element&, RecursionData&); |
61 bool invalidateChildren(Element&, RecursionData&); | 61 bool invalidateChildren(Element&, RecursionData&); |
62 bool checkInvalidationSetsAgainstElement(Element&, RecursionData&); | 62 bool checkInvalidationSetsAgainstElement(Element&, RecursionData&); |
(...skipping 19 matching lines...) Expand all Loading... |
82 | 82 |
83 private: | 83 private: |
84 int m_prevInvalidationSetsSize; | 84 int m_prevInvalidationSetsSize; |
85 bool m_prevInvalidateCustomPseudo; | 85 bool m_prevInvalidateCustomPseudo; |
86 bool m_prevWholeSubtreeInvalid; | 86 bool m_prevWholeSubtreeInvalid; |
87 bool m_treeBoundaryCrossing; | 87 bool m_treeBoundaryCrossing; |
88 bool m_insertionPointCrossing; | 88 bool m_insertionPointCrossing; |
89 RecursionData* m_data; | 89 RecursionData* m_data; |
90 }; | 90 }; |
91 | 91 |
92 typedef WillBeHeapVector<RefPtrWillBeMember<DescendantInvalidationSet>> Inva
lidationList; | 92 using InvalidationList = WillBeHeapVector<RefPtrWillBeMember<DescendantInval
idationSet>>; |
93 typedef WillBeHeapHashMap<RawPtrWillBeMember<Element>, OwnPtrWillBeMember<In
validationList>> PendingInvalidationMap; | 93 using PendingInvalidationMap = WillBeHeapHashMap<RawPtrWillBeMember<Element>
, OwnPtrWillBeMember<InvalidationList>>; |
94 | 94 |
95 InvalidationList& ensurePendingInvalidationList(Element&); | 95 InvalidationList& ensurePendingInvalidationList(Element&); |
96 | 96 |
97 PendingInvalidationMap m_pendingInvalidationMap; | 97 PendingInvalidationMap m_pendingInvalidationMap; |
98 }; | 98 }; |
99 | 99 |
100 } // namespace blink | 100 } // namespace blink |
101 | 101 |
102 #endif // StyleInvalidator_h | 102 #endif // StyleInvalidator_h |
OLD | NEW |