OLD | NEW |
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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 class CORE_EXPORT SiblingInvalidationSet final : public InvalidationSet { | 187 class CORE_EXPORT SiblingInvalidationSet final : public InvalidationSet { |
188 public: | 188 public: |
189 static PassRefPtr<SiblingInvalidationSet> create(PassRefPtr<DescendantInvali
dationSet> descendants) | 189 static PassRefPtr<SiblingInvalidationSet> create(PassRefPtr<DescendantInvali
dationSet> descendants) |
190 { | 190 { |
191 return adoptRef(new SiblingInvalidationSet(descendants)); | 191 return adoptRef(new SiblingInvalidationSet(descendants)); |
192 } | 192 } |
193 | 193 |
194 unsigned maxDirectAdjacentSelectors() const { return m_maxDirectAdjacentSele
ctors; } | 194 unsigned maxDirectAdjacentSelectors() const { return m_maxDirectAdjacentSele
ctors; } |
195 void updateMaxDirectAdjacentSelectors(unsigned value) { m_maxDirectAdjacentS
electors = std::max(value, m_maxDirectAdjacentSelectors); } | 195 void updateMaxDirectAdjacentSelectors(unsigned value) { m_maxDirectAdjacentS
electors = std::max(value, m_maxDirectAdjacentSelectors); } |
196 | 196 |
197 const DescendantInvalidationSet* siblingDescendants() const { return m_sibli
ngDescendantInvalidationSet.get(); } | 197 DescendantInvalidationSet* siblingDescendants() const { return m_siblingDesc
endantInvalidationSet.get(); } |
198 DescendantInvalidationSet& ensureSiblingDescendants(); | 198 DescendantInvalidationSet& ensureSiblingDescendants(); |
199 | 199 |
200 DescendantInvalidationSet* descendants() const { return m_descendantInvalida
tionSet.get(); } | 200 DescendantInvalidationSet* descendants() const { return m_descendantInvalida
tionSet.get(); } |
201 DescendantInvalidationSet& ensureDescendants(); | 201 DescendantInvalidationSet& ensureDescendants(); |
202 | 202 |
203 private: | 203 private: |
204 explicit SiblingInvalidationSet(PassRefPtr<DescendantInvalidationSet> descen
dants); | 204 explicit SiblingInvalidationSet(PassRefPtr<DescendantInvalidationSet> descen
dants); |
205 | 205 |
206 // Indicates the maximum possible number of siblings affected. | 206 // Indicates the maximum possible number of siblings affected. |
207 unsigned m_maxDirectAdjacentSelectors; | 207 unsigned m_maxDirectAdjacentSelectors; |
(...skipping 12 matching lines...) Expand all Loading... |
220 InvalidationSetVector descendants; | 220 InvalidationSetVector descendants; |
221 InvalidationSetVector siblings; | 221 InvalidationSetVector siblings; |
222 }; | 222 }; |
223 | 223 |
224 DEFINE_TYPE_CASTS(DescendantInvalidationSet, InvalidationSet, value, value->isDe
scendantInvalidationSet(), value.isDescendantInvalidationSet()); | 224 DEFINE_TYPE_CASTS(DescendantInvalidationSet, InvalidationSet, value, value->isDe
scendantInvalidationSet(), value.isDescendantInvalidationSet()); |
225 DEFINE_TYPE_CASTS(SiblingInvalidationSet, InvalidationSet, value, value->isSibli
ngInvalidationSet(), value.isSiblingInvalidationSet()); | 225 DEFINE_TYPE_CASTS(SiblingInvalidationSet, InvalidationSet, value, value->isSibli
ngInvalidationSet(), value.isSiblingInvalidationSet()); |
226 | 226 |
227 } // namespace blink | 227 } // namespace blink |
228 | 228 |
229 #endif // InvalidationSet_h | 229 #endif // InvalidationSet_h |
OLD | NEW |