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

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

Issue 2282413002: Replaced PassRefPtr copies with moves in Source/core. (Closed)
Patch Set: rebased 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 private: 203 private:
204 DescendantInvalidationSet() 204 DescendantInvalidationSet()
205 : InvalidationSet(InvalidateDescendants) {} 205 : InvalidationSet(InvalidateDescendants) {}
206 }; 206 };
207 207
208 class CORE_EXPORT SiblingInvalidationSet final : public InvalidationSet { 208 class CORE_EXPORT SiblingInvalidationSet final : public InvalidationSet {
209 public: 209 public:
210 static PassRefPtr<SiblingInvalidationSet> create(PassRefPtr<DescendantInvali dationSet> descendants) 210 static PassRefPtr<SiblingInvalidationSet> create(PassRefPtr<DescendantInvali dationSet> descendants)
211 { 211 {
212 return adoptRef(new SiblingInvalidationSet(descendants)); 212 return adoptRef(new SiblingInvalidationSet(std::move(descendants)));
213 } 213 }
214 214
215 unsigned maxDirectAdjacentSelectors() const { return m_maxDirectAdjacentSele ctors; } 215 unsigned maxDirectAdjacentSelectors() const { return m_maxDirectAdjacentSele ctors; }
216 void updateMaxDirectAdjacentSelectors(unsigned value) { m_maxDirectAdjacentS electors = std::max(value, m_maxDirectAdjacentSelectors); } 216 void updateMaxDirectAdjacentSelectors(unsigned value) { m_maxDirectAdjacentS electors = std::max(value, m_maxDirectAdjacentSelectors); }
217 217
218 DescendantInvalidationSet* siblingDescendants() const { return m_siblingDesc endantInvalidationSet.get(); } 218 DescendantInvalidationSet* siblingDescendants() const { return m_siblingDesc endantInvalidationSet.get(); }
219 DescendantInvalidationSet& ensureSiblingDescendants(); 219 DescendantInvalidationSet& ensureSiblingDescendants();
220 220
221 DescendantInvalidationSet* descendants() const { return m_descendantInvalida tionSet.get(); } 221 DescendantInvalidationSet* descendants() const { return m_descendantInvalida tionSet.get(); }
222 DescendantInvalidationSet& ensureDescendants(); 222 DescendantInvalidationSet& ensureDescendants();
(...skipping 18 matching lines...) Expand all
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