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

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

Issue 2303443003: CSS: Additional asserts for style invalidation (Closed)
Patch Set: Created 4 years, 3 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
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // 73 //
74 // .u ~ * {} 74 // .u ~ * {}
75 // For class u we will have a SiblingInvalidationSet with wholeSubtreeInvalid and invalidatesSelf (for all siblings, the sibling itself is invalidated). 75 // For class u we will have a SiblingInvalidationSet with wholeSubtreeInvalid and invalidatesSelf (for all siblings, the sibling itself is invalidated).
76 // 76 //
77 // .t .v, .t ~ .z {} 77 // .t .v, .t ~ .z {}
78 // For class t we will have a SiblingInvalidationSet containing class z, with the SiblingInvalidationSet also holding descendants containing class v. 78 // For class t we will have a SiblingInvalidationSet containing class z, with the SiblingInvalidationSet also holding descendants containing class v.
79 // 79 //
80 // We avoid virtual functions to minimize space consumption. 80 // We avoid virtual functions to minimize space consumption.
81 class CORE_EXPORT InvalidationSet { 81 class CORE_EXPORT InvalidationSet {
82 WTF_MAKE_NONCOPYABLE(InvalidationSet); 82 WTF_MAKE_NONCOPYABLE(InvalidationSet);
83 USING_FAST_MALLOC_WITH_TYPE_NAME(blink::InvalidationSet); 83 USING_FAST_MALLOC(blink::InvalidationSet);
esprehn 2016/09/01 05:30:22 Why change this in this patch? The other macro see
Eric Willigers 2016/09/01 14:56:31 Removed from this patch. I believe the reason is t
84 public: 84 public:
85 InvalidationType type() const { return static_cast<InvalidationType>(m_type) ; } 85 InvalidationType type() const { return static_cast<InvalidationType>(m_type) ; }
86 bool isDescendantInvalidationSet() const { return type() == InvalidateDescen dants; } 86 bool isDescendantInvalidationSet() const { return type() == InvalidateDescen dants; }
87 bool isSiblingInvalidationSet() const { return type() == InvalidateSiblings; } 87 bool isSiblingInvalidationSet() const { return type() == InvalidateSiblings; }
88 88
89 static void cacheTracingFlag(); 89 static void cacheTracingFlag();
90 90
91 bool invalidatesElement(Element&) const; 91 bool invalidatesElement(Element&) const;
92 92
93 void addClass(const AtomicString& className); 93 void addClass(const AtomicString& className);
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 InvalidationSetVector descendants; 241 InvalidationSetVector descendants;
242 InvalidationSetVector siblings; 242 InvalidationSetVector siblings;
243 }; 243 };
244 244
245 DEFINE_TYPE_CASTS(DescendantInvalidationSet, InvalidationSet, value, value->isDe scendantInvalidationSet(), value.isDescendantInvalidationSet()); 245 DEFINE_TYPE_CASTS(DescendantInvalidationSet, InvalidationSet, value, value->isDe scendantInvalidationSet(), value.isDescendantInvalidationSet());
246 DEFINE_TYPE_CASTS(SiblingInvalidationSet, InvalidationSet, value, value->isSibli ngInvalidationSet(), value.isSiblingInvalidationSet()); 246 DEFINE_TYPE_CASTS(SiblingInvalidationSet, InvalidationSet, value, value->isSibli ngInvalidationSet(), value.isSiblingInvalidationSet());
247 247
248 } // namespace blink 248 } // namespace blink
249 249
250 #endif // InvalidationSet_h 250 #endif // InvalidationSet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698