Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(565)

Unified Diff: Source/core/html/DocumentNameCollection.h

Issue 315473002: Stop having HTMLNameCollection override HTMLCollection::virtualItemAfter() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/DocumentNameCollection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/DocumentNameCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698