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

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

Issue 355163004: Move HTMLTagCollection to its own file (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/html/HTMLCollection.cpp ('k') | Source/core/html/HTMLTagCollection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTagCollection.h
diff --git a/Source/core/dom/TagCollection.h b/Source/core/html/HTMLTagCollection.h
similarity index 64%
copy from Source/core/dom/TagCollection.h
copy to Source/core/html/HTMLTagCollection.h
index 6b97db7f2a765918f046cb4b8143d9856f1f0c71..749a4c29d2f8338eba9dbb5e64838355e1d0e076 100644
--- a/Source/core/dom/TagCollection.h
+++ b/Source/core/html/HTMLTagCollection.h
@@ -4,6 +4,7 @@
* (C) 2001 Dirk Mueller (mueller@kde.org)
* Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2014 Samsung Electronics. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -21,43 +22,15 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef TagCollection_h
-#define TagCollection_h
+#ifndef HTMLTagCollection_h
+#define HTMLTagCollection_h
#include "core/dom/Element.h"
-#include "core/html/HTMLCollection.h"
-#include "wtf/text/AtomicString.h"
+#include "core/dom/TagCollection.h"
namespace WebCore {
-// Collection that limits to a particular tag.
-class TagCollection : public HTMLCollection {
-public:
- static PassRefPtrWillBeRawPtr<TagCollection> create(ContainerNode& rootNode, const AtomicString& namespaceURI, const AtomicString& localName)
- {
- ASSERT(namespaceURI != starAtom);
- return adoptRefWillBeNoop(new TagCollection(rootNode, TagCollectionType, namespaceURI, localName));
- }
-
- static PassRefPtrWillBeRawPtr<TagCollection> create(ContainerNode& rootNode, CollectionType type, const AtomicString& localName)
- {
- ASSERT_UNUSED(type, type == TagCollectionType);
- return adoptRefWillBeNoop(new TagCollection(rootNode, TagCollectionType, starAtom, localName));
- }
-
- virtual ~TagCollection();
-
- bool elementMatches(const Element&) const;
-
-protected:
- TagCollection(ContainerNode& rootNode, CollectionType, const AtomicString& namespaceURI, const AtomicString& localName);
-
- AtomicString m_namespaceURI;
- AtomicString m_localName;
-};
-
-DEFINE_TYPE_CASTS(TagCollection, LiveNodeListBase, collection, collection->type() == TagCollectionType, collection.type() == TagCollectionType);
-
+// Collection that limits to a particular tag and whose rootNode is in an HTMLDocument.
class HTMLTagCollection FINAL : public TagCollection {
public:
static PassRefPtrWillBeRawPtr<HTMLTagCollection> create(ContainerNode& rootNode, CollectionType type, const AtomicString& localName)
@@ -90,4 +63,4 @@ inline bool HTMLTagCollection::elementMatches(const Element& testElement) const
} // namespace WebCore
-#endif // TagCollection_h
+#endif // HTMLTagCollection_h
« no previous file with comments | « Source/core/html/HTMLCollection.cpp ('k') | Source/core/html/HTMLTagCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698