OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
tkent
2017/05/09 00:28:01
If you copied the code from the WebKit patch, you
| |
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 AllDescendantsCollection_h | |
6 #define AllDescendantsCollection_h | |
7 | |
8 #include "core/html/HTMLCollection.h" | |
9 | |
10 namespace blink { | |
11 | |
12 class AllDescendantsCollection : public HTMLCollection { | |
13 public: | |
14 static AllDescendantsCollection* Create(ContainerNode& root_node, | |
15 CollectionType type) { | |
16 DCHECK_EQ(type, kAllDescendantsCollectionType); | |
17 return new AllDescendantsCollection(root_node, | |
18 kAllDescendantsCollectionType); | |
19 } | |
20 | |
21 bool ElementMatches(const Element&) const { return true; } | |
22 | |
23 protected: | |
tkent
2017/05/09 00:28:01
should be private?
| |
24 AllDescendantsCollection(ContainerNode& root_node, CollectionType type) | |
25 : HTMLCollection(root_node, type, kDoesNotOverrideItemAfter) {} | |
26 }; | |
27 | |
28 DEFINE_TYPE_CASTS(AllDescendantsCollection, | |
29 LiveNodeListBase, | |
30 collection, | |
31 collection->GetType() == kAllDescendantsCollectionType, | |
32 collection.GetType() == kAllDescendantsCollectionType); | |
33 | |
34 } // namespace blink | |
35 | |
36 #endif // AllDescendantsCollection_h | |
OLD | NEW |