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 "core/css/invalidation/PendingInvalidations.h" | 8 #include "core/css/invalidation/PendingInvalidations.h" |
9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
10 #include "wtf/Noncopyable.h" | 10 #include "wtf/Noncopyable.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class Document; | 14 class Document; |
15 class Element; | 15 class Element; |
16 class HTMLSlotElement; | 16 class HTMLSlotElement; |
17 class InvalidationSet; | 17 class InvalidationSet; |
18 | 18 |
19 | 19 |
20 class StyleInvalidator { | 20 class StyleInvalidator { |
21 DISALLOW_NEW(); | 21 DISALLOW_NEW(); |
22 WTF_MAKE_NONCOPYABLE(StyleInvalidator); | 22 WTF_MAKE_NONCOPYABLE(StyleInvalidator); |
23 public: | 23 public: |
24 StyleInvalidator(); | 24 StyleInvalidator(); |
25 ~StyleInvalidator(); | 25 ~StyleInvalidator(); |
26 void invalidate(Document&); | 26 void invalidate(Document&); |
27 void scheduleInvalidationSetsForElement(const InvalidationLists&, Element&); | 27 void scheduleInvalidationSetsForElement(const InvalidationLists&, Element&); |
| 28 void rescheduleSiblingInvalidationSetsForRemovedElement(Element& elementFrom
, Element& elementTo, bool invalidateElementTo); |
| 29 void scheduleDescendantsFromSiblingSets(Element&, const InvalidationSetVecto
r& siblingSets); |
28 void clearInvalidation(Element&); | 30 void clearInvalidation(Element&); |
29 | 31 |
30 DECLARE_TRACE(); | 32 DECLARE_TRACE(); |
31 | 33 |
32 private: | 34 private: |
33 struct RecursionData { | 35 struct RecursionData { |
34 RecursionData() | 36 RecursionData() |
35 : m_invalidateCustomPseudo(false) | 37 : m_invalidateCustomPseudo(false) |
36 , m_wholeSubtreeInvalid(false) | 38 , m_wholeSubtreeInvalid(false) |
37 , m_treeBoundaryCrossing(false) | 39 , m_treeBoundaryCrossing(false) |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 using PendingInvalidationMap = HeapHashMap<Member<Element>, OwnPtr<PendingIn
validations>>; | 133 using PendingInvalidationMap = HeapHashMap<Member<Element>, OwnPtr<PendingIn
validations>>; |
132 | 134 |
133 PendingInvalidations& ensurePendingInvalidations(Element&); | 135 PendingInvalidations& ensurePendingInvalidations(Element&); |
134 | 136 |
135 PendingInvalidationMap m_pendingInvalidationMap; | 137 PendingInvalidationMap m_pendingInvalidationMap; |
136 }; | 138 }; |
137 | 139 |
138 } // namespace blink | 140 } // namespace blink |
139 | 141 |
140 #endif // StyleInvalidator_h | 142 #endif // StyleInvalidator_h |
OLD | NEW |