OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "config.h" |
| 6 #include "core/css/invalidation/InvalidationData.h" |
| 7 |
| 8 namespace blink { |
| 9 |
| 10 DescendantInvalidationSet& InvalidationData::ensureInvalidationSet(InvalidateTyp
e type) |
| 11 { |
| 12 if (!m_invalidationSet[type]) |
| 13 m_invalidationSet[type] = DescendantInvalidationSet::create(); |
| 14 |
| 15 return *m_invalidationSet[type]; |
| 16 } |
| 17 |
| 18 void InvalidationData::combine(const InvalidationData& other) |
| 19 { |
| 20 if (other.descendants()) |
| 21 ensureInvalidationSet(InvalidateDescendants).combine(*other.descendants(
)); |
| 22 |
| 23 if (other.siblings()) |
| 24 ensureInvalidationSet(InvalidateSiblings).combine(*other.siblings()); |
| 25 } |
| 26 |
| 27 DEFINE_TRACE(InvalidationData) |
| 28 { |
| 29 visitor->trace(m_invalidationSet[InvalidateDescendants]); |
| 30 visitor->trace(m_invalidationSet[InvalidateSiblings]); |
| 31 } |
| 32 |
| 33 } // namespace blink |
OLD | NEW |