Index: third_party/WebKit/Source/core/dom/AllDescendantsCollection.h |
diff --git a/third_party/WebKit/Source/core/dom/AllDescendantsCollection.h b/third_party/WebKit/Source/core/dom/AllDescendantsCollection.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c6d5fac4d2efeca389b0bacb148f8e363dd47e71 |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/dom/AllDescendantsCollection.h |
@@ -0,0 +1,36 @@ |
+// 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
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef AllDescendantsCollection_h |
+#define AllDescendantsCollection_h |
+ |
+#include "core/html/HTMLCollection.h" |
+ |
+namespace blink { |
+ |
+class AllDescendantsCollection : public HTMLCollection { |
+ public: |
+ static AllDescendantsCollection* Create(ContainerNode& root_node, |
+ CollectionType type) { |
+ DCHECK_EQ(type, kAllDescendantsCollectionType); |
+ return new AllDescendantsCollection(root_node, |
+ kAllDescendantsCollectionType); |
+ } |
+ |
+ bool ElementMatches(const Element&) const { return true; } |
+ |
+ protected: |
tkent
2017/05/09 00:28:01
should be private?
|
+ AllDescendantsCollection(ContainerNode& root_node, CollectionType type) |
+ : HTMLCollection(root_node, type, kDoesNotOverrideItemAfter) {} |
+}; |
+ |
+DEFINE_TYPE_CASTS(AllDescendantsCollection, |
+ LiveNodeListBase, |
+ collection, |
+ collection->GetType() == kAllDescendantsCollectionType, |
+ collection.GetType() == kAllDescendantsCollectionType); |
+ |
+} // namespace blink |
+ |
+#endif // AllDescendantsCollection_h |