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

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

Issue 2089063005: Schedule sibling invalidation sets for sibling insert/remove. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed minDirectAdjacent optimization. Created 4 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
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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 class CORE_EXPORT SiblingInvalidationSet final : public InvalidationSet { 188 class CORE_EXPORT SiblingInvalidationSet final : public InvalidationSet {
189 public: 189 public:
190 static PassRefPtr<SiblingInvalidationSet> create(PassRefPtr<DescendantInvali dationSet> descendants) 190 static PassRefPtr<SiblingInvalidationSet> create(PassRefPtr<DescendantInvali dationSet> descendants)
191 { 191 {
192 return adoptRef(new SiblingInvalidationSet(descendants)); 192 return adoptRef(new SiblingInvalidationSet(descendants));
193 } 193 }
194 194
195 unsigned maxDirectAdjacentSelectors() const { return m_maxDirectAdjacentSele ctors; } 195 unsigned maxDirectAdjacentSelectors() const { return m_maxDirectAdjacentSele ctors; }
196 void updateMaxDirectAdjacentSelectors(unsigned value) { m_maxDirectAdjacentS electors = std::max(value, m_maxDirectAdjacentSelectors); } 196 void updateMaxDirectAdjacentSelectors(unsigned value) { m_maxDirectAdjacentS electors = std::max(value, m_maxDirectAdjacentSelectors); }
197 197
198 const DescendantInvalidationSet* siblingDescendants() const { return m_sibli ngDescendantInvalidationSet.get(); } 198 DescendantInvalidationSet* siblingDescendants() const { return m_siblingDesc endantInvalidationSet.get(); }
199 DescendantInvalidationSet& ensureSiblingDescendants(); 199 DescendantInvalidationSet& ensureSiblingDescendants();
200 200
201 DescendantInvalidationSet* descendants() const { return m_descendantInvalida tionSet.get(); } 201 DescendantInvalidationSet* descendants() const { return m_descendantInvalida tionSet.get(); }
202 DescendantInvalidationSet& ensureDescendants(); 202 DescendantInvalidationSet& ensureDescendants();
203 203
204 private: 204 private:
205 explicit SiblingInvalidationSet(PassRefPtr<DescendantInvalidationSet> descen dants); 205 explicit SiblingInvalidationSet(PassRefPtr<DescendantInvalidationSet> descen dants);
206 206
207 // Indicates the maximum possible number of siblings affected. 207 // Indicates the maximum possible number of siblings affected.
208 unsigned m_maxDirectAdjacentSelectors; 208 unsigned m_maxDirectAdjacentSelectors;
(...skipping 12 matching lines...) Expand all
221 InvalidationSetVector descendants; 221 InvalidationSetVector descendants;
222 InvalidationSetVector siblings; 222 InvalidationSetVector siblings;
223 }; 223 };
224 224
225 DEFINE_TYPE_CASTS(DescendantInvalidationSet, InvalidationSet, value, value->isDe scendantInvalidationSet(), value.isDescendantInvalidationSet()); 225 DEFINE_TYPE_CASTS(DescendantInvalidationSet, InvalidationSet, value, value->isDe scendantInvalidationSet(), value.isDescendantInvalidationSet());
226 DEFINE_TYPE_CASTS(SiblingInvalidationSet, InvalidationSet, value, value->isSibli ngInvalidationSet(), value.isSiblingInvalidationSet()); 226 DEFINE_TYPE_CASTS(SiblingInvalidationSet, InvalidationSet, value, value->isSibli ngInvalidationSet(), value.isSiblingInvalidationSet());
227 227
228 } // namespace blink 228 } // namespace blink
229 229
230 #endif // InvalidationSet_h 230 #endif // InvalidationSet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698