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

Side by Side Diff: third_party/WebKit/Source/core/css/invalidation/InvalidationSet.h

Issue 1474213002: [PartitionAlloc] Annotate common Blink types for heap profiling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ctti
Patch Set: Remove redundancy from macro Created 5 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef InvalidationSet_h 31 #ifndef InvalidationSet_h
32 #define InvalidationSet_h 32 #define InvalidationSet_h
33 33
34 #include "core/CoreExport.h" 34 #include "core/CoreExport.h"
35 #include "wtf/Allocator.h"
35 #include "wtf/Assertions.h" 36 #include "wtf/Assertions.h"
36 #include "wtf/Forward.h" 37 #include "wtf/Forward.h"
37 #include "wtf/HashSet.h" 38 #include "wtf/HashSet.h"
38 #include "wtf/RefCounted.h" 39 #include "wtf/RefCounted.h"
39 #include "wtf/RefPtr.h" 40 #include "wtf/RefPtr.h"
40 #include "wtf/text/AtomicStringHash.h" 41 #include "wtf/text/AtomicStringHash.h"
41 #include "wtf/text/StringHash.h" 42 #include "wtf/text/StringHash.h"
42 43
43 namespace blink { 44 namespace blink {
44 45
45 class DescendantInvalidationSet; 46 class DescendantInvalidationSet;
46 class Element; 47 class Element;
47 class TracedValue; 48 class TracedValue;
48 49
49 enum InvalidationType { 50 enum InvalidationType {
50 InvalidateDescendants, 51 InvalidateDescendants,
51 InvalidateSiblings 52 InvalidateSiblings
52 }; 53 };
53 54
54 // Tracks data to determine which descendants in a DOM subtree, or 55 // Tracks data to determine which descendants in a DOM subtree, or
55 // siblings and their descendants, need to have style recalculated. 56 // siblings and their descendants, need to have style recalculated.
56 class CORE_EXPORT InvalidationSet : public RefCounted<InvalidationSet> { 57 class CORE_EXPORT InvalidationSet : public RefCounted<InvalidationSet> {
57 WTF_MAKE_NONCOPYABLE(InvalidationSet); 58 WTF_MAKE_NONCOPYABLE(InvalidationSet);
59 USING_FAST_MALLOC_WITH_TYPE_NAME(blink::InvalidationSet);
58 public: 60 public:
59 virtual ~InvalidationSet() {} 61 virtual ~InvalidationSet() {}
60 62
61 virtual bool isDescendantInvalidationSet() const { return false; } 63 virtual bool isDescendantInvalidationSet() const { return false; }
62 virtual bool isSiblingInvalidationSet() const { return false; } 64 virtual bool isSiblingInvalidationSet() const { return false; }
63 65
64 static void cacheTracingFlag(); 66 static void cacheTracingFlag();
65 67
66 bool invalidatesElement(Element&) const; 68 bool invalidatesElement(Element&) const;
67 69
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 InvalidationSetVector descendants; 184 InvalidationSetVector descendants;
183 InvalidationSetVector siblings; 185 InvalidationSetVector siblings;
184 }; 186 };
185 187
186 DEFINE_TYPE_CASTS(DescendantInvalidationSet, InvalidationSet, value, value->isDe scendantInvalidationSet(), value.isDescendantInvalidationSet()); 188 DEFINE_TYPE_CASTS(DescendantInvalidationSet, InvalidationSet, value, value->isDe scendantInvalidationSet(), value.isDescendantInvalidationSet());
187 DEFINE_TYPE_CASTS(SiblingInvalidationSet, InvalidationSet, value, value->isSibli ngInvalidationSet(), value.isSiblingInvalidationSet()); 189 DEFINE_TYPE_CASTS(SiblingInvalidationSet, InvalidationSet, value, value->isSibli ngInvalidationSet(), value.isSiblingInvalidationSet());
188 190
189 } // namespace blink 191 } // namespace blink
190 192
191 #endif // InvalidationSet_h 193 #endif // InvalidationSet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698