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

Unified Diff: Source/core/dom/TagCollection.h

Issue 305963014: Introduce and use type casting functions for several HTMLCollection types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/ClassCollection.h ('k') | Source/core/html/HTMLAllCollection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/TagCollection.h
diff --git a/Source/core/dom/TagCollection.h b/Source/core/dom/TagCollection.h
index 9314a1d1146a3779957493a1db74e64777656926..6b97db7f2a765918f046cb4b8143d9856f1f0c71 100644
--- a/Source/core/dom/TagCollection.h
+++ b/Source/core/dom/TagCollection.h
@@ -56,6 +56,8 @@ protected:
AtomicString m_localName;
};
+DEFINE_TYPE_CASTS(TagCollection, LiveNodeListBase, collection, collection->type() == TagCollectionType, collection.type() == TagCollectionType);
+
class HTMLTagCollection FINAL : public TagCollection {
public:
static PassRefPtrWillBeRawPtr<HTMLTagCollection> create(ContainerNode& rootNode, CollectionType type, const AtomicString& localName)
@@ -72,6 +74,8 @@ private:
AtomicString m_loweredLocalName;
};
+DEFINE_TYPE_CASTS(HTMLTagCollection, LiveNodeListBase, collection, collection->type() == HTMLTagCollectionType, collection.type() == HTMLTagCollectionType);
+
inline bool HTMLTagCollection::elementMatches(const Element& testElement) const
{
// Implements http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-getelementsbytagname
« no previous file with comments | « Source/core/dom/ClassCollection.h ('k') | Source/core/html/HTMLAllCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698