| 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 DescendantInvalidationSet; | 13 class DescendantInvalidationSet; |
| 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<DescendantInvalidationSet>,
Element&); | 24 void scheduleInvalidation(PassRefPtrWillBeRawPtr<DescendantInvalidationSet>,
Element&); |
| 25 | 25 void clearInvalidation(Element&); |
| 26 // Clears all style invalidation state for the passed node. | |
| 27 void clearInvalidation(Node&); | |
| 28 | 26 |
| 29 void clearPendingInvalidations(); | 27 void clearPendingInvalidations(); |
| 30 | 28 |
| 31 DECLARE_TRACE(); | 29 DECLARE_TRACE(); |
| 32 | 30 |
| 33 private: | 31 private: |
| 34 struct RecursionData { | 32 struct RecursionData { |
| 35 RecursionData() | 33 RecursionData() |
| 36 : m_invalidateCustomPseudo(false) | 34 : m_invalidateCustomPseudo(false) |
| 37 , m_wholeSubtreeInvalid(false) | 35 , m_wholeSubtreeInvalid(false) |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 using PendingInvalidationMap = WillBeHeapHashMap<RawPtrWillBeMember<Element>
, OwnPtrWillBeMember<InvalidationList>>; | 91 using PendingInvalidationMap = WillBeHeapHashMap<RawPtrWillBeMember<Element>
, OwnPtrWillBeMember<InvalidationList>>; |
| 94 | 92 |
| 95 InvalidationList& ensurePendingInvalidationList(Element&); | 93 InvalidationList& ensurePendingInvalidationList(Element&); |
| 96 | 94 |
| 97 PendingInvalidationMap m_pendingInvalidationMap; | 95 PendingInvalidationMap m_pendingInvalidationMap; |
| 98 }; | 96 }; |
| 99 | 97 |
| 100 } // namespace blink | 98 } // namespace blink |
| 101 | 99 |
| 102 #endif // StyleInvalidator_h | 100 #endif // StyleInvalidator_h |
| OLD | NEW |