| Index: third_party/WebKit/Source/core/dom/TagCollection.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/TagCollection.cpp b/third_party/WebKit/Source/core/dom/TagCollection.cpp
|
| index fb1ef54cf1108eff9d5da87abc067de8a1b6ca66..e50e6fe475cf94d3ddc0e94264226e35c36f128d 100644
|
| --- a/third_party/WebKit/Source/core/dom/TagCollection.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/TagCollection.cpp
|
| @@ -30,17 +30,32 @@ namespace blink {
|
|
|
| TagCollection::TagCollection(ContainerNode& root_node,
|
| CollectionType type,
|
| - const AtomicString& namespace_uri,
|
| - const AtomicString& local_name)
|
| + const AtomicString& qualified_name)
|
| + : HTMLCollection(root_node, type, kDoesNotOverrideItemAfter),
|
| + qualified_name_(qualified_name) {}
|
| +
|
| +TagCollection::~TagCollection() {}
|
| +
|
| +bool TagCollection::ElementMatches(const Element& test_node) const {
|
| + if (qualified_name_ == g_star_atom)
|
| + return true;
|
| +
|
| + return qualified_name_ == test_node.TagQName().ToString();
|
| +}
|
| +
|
| +TagCollectionNS::TagCollectionNS(ContainerNode& root_node,
|
| + CollectionType type,
|
| + const AtomicString& namespace_uri,
|
| + const AtomicString& local_name)
|
| : HTMLCollection(root_node, type, kDoesNotOverrideItemAfter),
|
| namespace_uri_(namespace_uri),
|
| local_name_(local_name) {
|
| DCHECK(namespace_uri_.IsNull() || !namespace_uri_.IsEmpty());
|
| }
|
|
|
| -TagCollection::~TagCollection() {}
|
| +TagCollectionNS::~TagCollectionNS() {}
|
|
|
| -bool TagCollection::ElementMatches(const Element& test_node) const {
|
| +bool TagCollectionNS::ElementMatches(const Element& test_node) const {
|
| // Implements
|
| // https://dom.spec.whatwg.org/#concept-getelementsbytagnamens
|
| if (local_name_ != g_star_atom && local_name_ != test_node.localName())
|
|
|