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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 toTracedValue(value.get()); | 301 toTracedValue(value.get()); |
302 value->endArray(); | 302 value->endArray(); |
303 fprintf(stderr, "%s\n", value->toString().ascii().data()); | 303 fprintf(stderr, "%s\n", value->toString().ascii().data()); |
304 } | 304 } |
305 #endif // NDEBUG | 305 #endif // NDEBUG |
306 | 306 |
307 SiblingInvalidationSet::SiblingInvalidationSet( | 307 SiblingInvalidationSet::SiblingInvalidationSet( |
308 PassRefPtr<DescendantInvalidationSet> descendants) | 308 PassRefPtr<DescendantInvalidationSet> descendants) |
309 : InvalidationSet(InvalidateSiblings), | 309 : InvalidationSet(InvalidateSiblings), |
310 m_maxDirectAdjacentSelectors(1), | 310 m_maxDirectAdjacentSelectors(1), |
311 m_descendantInvalidationSet(descendants) {} | 311 m_descendantInvalidationSet(std::move(descendants)) {} |
312 | 312 |
313 DescendantInvalidationSet& SiblingInvalidationSet::ensureSiblingDescendants() { | 313 DescendantInvalidationSet& SiblingInvalidationSet::ensureSiblingDescendants() { |
314 if (!m_siblingDescendantInvalidationSet) | 314 if (!m_siblingDescendantInvalidationSet) |
315 m_siblingDescendantInvalidationSet = DescendantInvalidationSet::create(); | 315 m_siblingDescendantInvalidationSet = DescendantInvalidationSet::create(); |
316 return *m_siblingDescendantInvalidationSet; | 316 return *m_siblingDescendantInvalidationSet; |
317 } | 317 } |
318 | 318 |
319 DescendantInvalidationSet& SiblingInvalidationSet::ensureDescendants() { | 319 DescendantInvalidationSet& SiblingInvalidationSet::ensureDescendants() { |
320 if (!m_descendantInvalidationSet) | 320 if (!m_descendantInvalidationSet) |
321 m_descendantInvalidationSet = DescendantInvalidationSet::create(); | 321 m_descendantInvalidationSet = DescendantInvalidationSet::create(); |
322 return *m_descendantInvalidationSet; | 322 return *m_descendantInvalidationSet; |
323 } | 323 } |
324 | 324 |
325 } // namespace blink | 325 } // namespace blink |
OLD | NEW |