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 #ifndef InvalidationData_h | |
6 #define InvalidationData_h | |
7 | |
8 #include "core/css/invalidation/InvalidationSet.h" | |
9 | |
10 namespace blink { | |
11 | |
12 enum InvalidationType { | |
13 InvalidateDescendants = 0, | |
rune
2015/09/14 23:06:51
Enums start from 0 if you don't specify. Just drop
Eric Willigers
2015/09/15 05:39:17
Done.
| |
14 InvalidateSiblings = 1, | |
15 InvalidationTypeCount = 2 | |
16 }; | |
17 | |
18 class CORE_EXPORT InvalidationData final : public RefCountedWillBeGarbageCollect ed<InvalidationData> { | |
19 WTF_MAKE_NONCOPYABLE(InvalidationData); | |
20 public: | |
21 static PassRefPtrWillBeRawPtr<InvalidationData> create() | |
22 { | |
23 return adoptRefWillBeNoop(new InvalidationData); | |
24 } | |
25 | |
26 void combine(const InvalidationData& other); | |
27 | |
28 PassRefPtrWillBeRawPtr<InvalidationSet> descendants() { return m_invalidatio nSet[InvalidateDescendants]; } | |
29 PassRefPtrWillBeRawPtr<InvalidationSet> siblings() { return m_invalidationSe t[InvalidateSiblings]; } | |
30 | |
31 const InvalidationSet* descendants() const { return m_invalidationSet[Invali dateDescendants].get(); } | |
32 const InvalidationSet* siblings() const { return m_invalidationSet[Invalidat eSiblings].get(); } | |
33 | |
34 PassRefPtrWillBeRawPtr<InvalidationSet> select(InvalidationType type) { retu rn m_invalidationSet[type]; } | |
35 | |
36 InvalidationSet& ensureInvalidationSet(InvalidationType); | |
37 | |
38 DECLARE_TRACE(); | |
39 | |
40 private: | |
41 InvalidationData() {} | |
42 | |
43 RefPtrWillBeMember<InvalidationSet> m_invalidationSet[InvalidationTypeCount] ; | |
44 }; | |
45 | |
46 } // namespace blink | |
47 | |
48 #endif // InvalidationData_h | |
OLD | NEW |