| 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 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class InvalidationSet; | 13 class InvalidationSet; |
| 14 class Document; | 14 class Document; |
| 15 class Element; | 15 class Element; |
| 16 | 16 |
| 17 class StyleInvalidator { | 17 class StyleInvalidator { |
| 18 DISALLOW_ALLOCATION(); | 18 DISALLOW_ALLOCATION(); |
| 19 WTF_MAKE_NONCOPYABLE(StyleInvalidator); | 19 WTF_MAKE_NONCOPYABLE(StyleInvalidator); |
| 20 public: | 20 public: |
| 21 StyleInvalidator(); | 21 StyleInvalidator(); |
| 22 ~StyleInvalidator(); | 22 ~StyleInvalidator(); |
| 23 void invalidate(Document&); | 23 void invalidate(Document&); |
| 24 void scheduleInvalidation(PassRefPtrWillBeRawPtr<InvalidationSet>, Element&)
; | 24 void scheduleInvalidation(PassRefPtr<InvalidationSet>, Element&); |
| 25 void clearInvalidation(Element&); | 25 void clearInvalidation(Element&); |
| 26 | 26 |
| 27 void clearPendingInvalidations(); | 27 void clearPendingInvalidations(); |
| 28 | 28 |
| 29 DECLARE_TRACE(); | 29 DECLARE_TRACE(); |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 struct RecursionData { | 32 struct RecursionData { |
| 33 RecursionData() | 33 RecursionData() |
| 34 : m_invalidateCustomPseudo(false) | 34 : m_invalidateCustomPseudo(false) |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 int m_prevInvalidationSetsSize; | 82 int m_prevInvalidationSetsSize; |
| 83 bool m_prevInvalidateCustomPseudo; | 83 bool m_prevInvalidateCustomPseudo; |
| 84 bool m_prevWholeSubtreeInvalid; | 84 bool m_prevWholeSubtreeInvalid; |
| 85 bool m_treeBoundaryCrossing; | 85 bool m_treeBoundaryCrossing; |
| 86 bool m_insertionPointCrossing; | 86 bool m_insertionPointCrossing; |
| 87 RecursionData* m_data; | 87 RecursionData* m_data; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 using InvalidationList = WillBeHeapVector<RefPtrWillBeMember<InvalidationSet
>>; | 90 using InvalidationList = Vector<RefPtr<InvalidationSet>>; |
| 91 using PendingInvalidationMap = WillBeHeapHashMap<RawPtrWillBeMember<Element>
, OwnPtrWillBeMember<InvalidationList>>; | 91 using PendingInvalidationMap = WillBeHeapHashMap<RawPtrWillBeMember<Element>
, OwnPtr<InvalidationList>>; |
| 92 | 92 |
| 93 InvalidationList& ensurePendingInvalidationList(Element&); | 93 InvalidationList& ensurePendingInvalidationList(Element&); |
| 94 | 94 |
| 95 PendingInvalidationMap m_pendingInvalidationMap; | 95 PendingInvalidationMap m_pendingInvalidationMap; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace blink | 98 } // namespace blink |
| 99 | 99 |
| 100 #endif // StyleInvalidator_h | 100 #endif // StyleInvalidator_h |
| OLD | NEW |