Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/TagCollection.h |
| diff --git a/third_party/WebKit/Source/core/dom/TagCollection.h b/third_party/WebKit/Source/core/dom/TagCollection.h |
| index d46f51b153ba559c877abaebcfe51f1c02fbc58d..ae217493090784ec28d6da27ef7358ebd3946d1a 100644 |
| --- a/third_party/WebKit/Source/core/dom/TagCollection.h |
| +++ b/third_party/WebKit/Source/core/dom/TagCollection.h |
| @@ -33,19 +33,10 @@ namespace blink { |
| class TagCollection : public HTMLCollection { |
| public: |
| static TagCollection* Create(ContainerNode& root_node, |
| - const AtomicString& namespace_uri, |
| - const AtomicString& local_name) { |
| - DCHECK(namespace_uri != g_star_atom); |
| - return new TagCollection(root_node, kTagCollectionType, namespace_uri, |
| - local_name); |
| - } |
| - |
| - static TagCollection* Create(ContainerNode& root_node, |
| CollectionType type, |
| - const AtomicString& local_name) { |
| + const AtomicString& qualified_name) { |
| DCHECK_EQ(type, kTagCollectionType); |
| - return new TagCollection(root_node, kTagCollectionType, g_star_atom, |
| - local_name); |
| + return new TagCollection(root_node, kTagCollectionType, qualified_name); |
| } |
| ~TagCollection() override; |
| @@ -55,8 +46,37 @@ class TagCollection : public HTMLCollection { |
| protected: |
| TagCollection(ContainerNode& root_node, |
| CollectionType, |
| - const AtomicString& namespace_uri, |
| - const AtomicString& local_name); |
| + const AtomicString& qualified_name); |
| + |
| + AtomicString qualified_name_; |
| +}; |
| + |
| +class TagCollectionNS : public HTMLCollection { |
| + public: |
| + static TagCollectionNS* Create(ContainerNode& root_node, |
| + const AtomicString& namespace_uri, |
| + const AtomicString& local_name) { |
| + return new TagCollectionNS(root_node, kTagCollectionNSType, namespace_uri, |
| + local_name); |
| + } |
| + |
| + static TagCollectionNS* Create(ContainerNode& root_node, |
|
fs
2017/05/08 14:20:36
Is this even called?
Shanmuga Pandi
2017/05/10 12:17:22
Removed
|
| + CollectionType type, |
| + const AtomicString& local_name) { |
| + DCHECK_EQ(type, kTagCollectionNSType); |
| + return new TagCollectionNS(root_node, kTagCollectionNSType, g_star_atom, |
| + local_name); |
| + } |
| + |
| + ~TagCollectionNS() override; |
| + |
| + bool ElementMatches(const Element&) const; |
| + |
| + protected: |
|
tkent
2017/05/09 00:28:01
should be private?
Shanmuga Pandi
2017/05/10 12:17:22
Done.
|
| + TagCollectionNS(ContainerNode& root_node, |
| + CollectionType, |
| + const AtomicString& namespace_uri, |
| + const AtomicString& local_name); |
| AtomicString namespace_uri_; |
| AtomicString local_name_; |
| @@ -68,6 +88,12 @@ DEFINE_TYPE_CASTS(TagCollection, |
| collection->GetType() == kTagCollectionType, |
| collection.GetType() == kTagCollectionType); |
| +DEFINE_TYPE_CASTS(TagCollectionNS, |
| + LiveNodeListBase, |
| + collection, |
| + collection->GetType() == kTagCollectionNSType, |
| + collection.GetType() == kTagCollectionNSType); |
| + |
| } // namespace blink |
| #endif // TagCollection_h |