Index: Source/core/html/DocumentNameCollection.h |
diff --git a/Source/core/html/DocumentNameCollection.h b/Source/core/html/DocumentNameCollection.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e61789ab2c6f1570e2e0c19335ccc4f84ddaa255 |
--- /dev/null |
+++ b/Source/core/html/DocumentNameCollection.h |
@@ -0,0 +1,30 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef DocumentNameCollection_h |
+#define DocumentNameCollection_h |
+ |
+#include "HTMLNameCollection.h" |
+ |
+namespace WebCore { |
+ |
+class DocumentNameCollection FINAL : public HTMLNameCollection { |
+public: |
+ static PassRefPtrWillBeRawPtr<DocumentNameCollection> create(ContainerNode& document, CollectionType type, const AtomicString& name) |
+ { |
+ ASSERT_UNUSED(type, type == DocumentNamedItems); |
adamk
2014/06/03 20:20:55
Seems like we might want to add a new addCache() m
|
+ return adoptRefWillBeNoop(new DocumentNameCollection(document, name)); |
+ } |
+ |
+ bool elementMatches(const Element&) const; |
+ |
+private: |
+ DocumentNameCollection(ContainerNode& document, const AtomicString& name); |
+}; |
+ |
+DEFINE_TYPE_CASTS(DocumentNameCollection, LiveNodeListBase, collection, collection->type() == DocumentNamedItems, collection.type() == DocumentNamedItems); |
+ |
+} // namespace WebCore |
+ |
+#endif // DocumentNameCollection_h |