Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1484)

Side by Side Diff: Source/core/css/invalidation/StyleInvalidator.h

Issue 1225233005: Oilpan: Remove raw pointer to DescendantInvalidationSet from StyleInvalidator::RecursionData (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 11 matching lines...) Expand all
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 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 class RecursionData {
33 DISALLOW_ALLOCATION();
34 public:
33 RecursionData() 35 RecursionData()
34 : m_invalidateCustomPseudo(false) 36 : m_invalidateCustomPseudo(false)
35 , m_wholeSubtreeInvalid(false) 37 , m_wholeSubtreeInvalid(false)
36 , m_treeBoundaryCrossing(false) 38 , m_treeBoundaryCrossing(false)
37 , m_insertionPointCrossing(false) 39 , m_insertionPointCrossing(false)
38 { } 40 { }
39 41
42 DEFINE_INLINE_TRACE()
43 {
44 #if ENABLE(OILPAN)
45 visitor->trace(m_invalidationSets);
46 #endif
47 }
48
40 void pushInvalidationSet(const DescendantInvalidationSet&); 49 void pushInvalidationSet(const DescendantInvalidationSet&);
41 bool matchesCurrentInvalidationSets(Element&); 50 bool matchesCurrentInvalidationSets(Element&);
42 bool hasInvalidationSets() const { return !wholeSubtreeInvalid() && m_in validationSets.size(); } 51 bool hasInvalidationSets() const { return !wholeSubtreeInvalid() && m_in validationSets.size(); }
43 52
44 bool wholeSubtreeInvalid() const { return m_wholeSubtreeInvalid; } 53 bool wholeSubtreeInvalid() const { return m_wholeSubtreeInvalid; }
45 void setWholeSubtreeInvalid() { m_wholeSubtreeInvalid = true; } 54 void setWholeSubtreeInvalid() { m_wholeSubtreeInvalid = true; }
46 55
47 bool treeBoundaryCrossing() const { return m_treeBoundaryCrossing; } 56 bool treeBoundaryCrossing() const { return m_treeBoundaryCrossing; }
48 bool insertionPointCrossing() const { return m_insertionPointCrossing; } 57 bool insertionPointCrossing() const { return m_insertionPointCrossing; }
49 58
50 using InvalidationSets = Vector<const DescendantInvalidationSet*, 16>; 59 using InvalidationSets = WillBeHeapVector<RawPtrWillBeMember<const Desce ndantInvalidationSet>, 16>;
51 InvalidationSets m_invalidationSets; 60 InvalidationSets m_invalidationSets;
52 bool m_invalidateCustomPseudo; 61 bool m_invalidateCustomPseudo;
53 bool m_wholeSubtreeInvalid; 62 bool m_wholeSubtreeInvalid;
54 bool m_treeBoundaryCrossing; 63 bool m_treeBoundaryCrossing;
55 bool m_insertionPointCrossing; 64 bool m_insertionPointCrossing;
56 }; 65 };
57 66
58 bool invalidate(Element&, RecursionData&); 67 bool invalidate(Element&, RecursionData&);
59 bool invalidateChildren(Element&, RecursionData&); 68 bool invalidateChildren(Element&, RecursionData&);
60 bool checkInvalidationSetsAgainstElement(Element&, RecursionData&); 69 bool checkInvalidationSetsAgainstElement(Element&, RecursionData&);
(...skipping 16 matching lines...) Expand all
77 m_data->m_treeBoundaryCrossing = m_treeBoundaryCrossing; 86 m_data->m_treeBoundaryCrossing = m_treeBoundaryCrossing;
78 m_data->m_insertionPointCrossing = m_insertionPointCrossing; 87 m_data->m_insertionPointCrossing = m_insertionPointCrossing;
79 } 88 }
80 89
81 private: 90 private:
82 int m_prevInvalidationSetsSize; 91 int m_prevInvalidationSetsSize;
83 bool m_prevInvalidateCustomPseudo; 92 bool m_prevInvalidateCustomPseudo;
84 bool m_prevWholeSubtreeInvalid; 93 bool m_prevWholeSubtreeInvalid;
85 bool m_treeBoundaryCrossing; 94 bool m_treeBoundaryCrossing;
86 bool m_insertionPointCrossing; 95 bool m_insertionPointCrossing;
87 RecursionData* m_data; 96 RecursionData* m_data;
sof 2015/07/17 11:00:43 What about this raw pointer?
88 }; 97 };
89 98
90 using InvalidationList = WillBeHeapVector<RefPtrWillBeMember<DescendantInval idationSet>>; 99 using InvalidationList = WillBeHeapVector<RefPtrWillBeMember<DescendantInval idationSet>>;
91 using PendingInvalidationMap = WillBeHeapHashMap<RawPtrWillBeMember<Element> , OwnPtrWillBeMember<InvalidationList>>; 100 using PendingInvalidationMap = WillBeHeapHashMap<RawPtrWillBeMember<Element> , OwnPtrWillBeMember<InvalidationList>>;
92 101
93 InvalidationList& ensurePendingInvalidationList(Element&); 102 InvalidationList& ensurePendingInvalidationList(Element&);
94 103
95 PendingInvalidationMap m_pendingInvalidationMap; 104 PendingInvalidationMap m_pendingInvalidationMap;
96 }; 105 };
97 106
98 } // namespace blink 107 } // namespace blink
99 108
100 #endif // StyleInvalidator_h 109 #endif // StyleInvalidator_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698