| Index: third_party/WebKit/Source/core/dom/ContainerNode.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/ContainerNode.cpp b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
|
| index a28c419047cceacc3d03784dd27c1b84c67eb90f..5efc3ea16546eaf85bf15c11d26775e446f5f40a 100644
|
| --- a/third_party/WebKit/Source/core/dom/ContainerNode.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
|
| @@ -1440,23 +1440,24 @@ void ContainerNode::InvalidateNodeListCachesInAncestors(
|
| }
|
| }
|
|
|
| -TagCollection* ContainerNode::getElementsByTagName(
|
| - const AtomicString& local_name) {
|
| - if (GetDocument().IsHTMLDocument())
|
| +HTMLCollection* ContainerNode::getElementsByTagName(
|
| + const AtomicString& qualified_name) {
|
| + DCHECK(!qualified_name.IsNull());
|
| +
|
| + if (GetDocument().IsHTMLDocument()) {
|
| return EnsureCachedCollection<HTMLTagCollection>(kHTMLTagCollectionType,
|
| - local_name);
|
| - return EnsureCachedCollection<TagCollection>(kTagCollectionType, local_name);
|
| + qualified_name);
|
| + }
|
| + return EnsureCachedCollection<TagCollection>(kTagCollectionType,
|
| + qualified_name);
|
| }
|
|
|
| -TagCollection* ContainerNode::getElementsByTagNameNS(
|
| +HTMLCollection* ContainerNode::getElementsByTagNameNS(
|
| const AtomicString& namespace_uri,
|
| const AtomicString& local_name) {
|
| - if (namespace_uri == g_star_atom)
|
| - return getElementsByTagName(local_name);
|
| -
|
| - return EnsureCachedCollection<TagCollection>(
|
| - kTagCollectionType, namespace_uri.IsEmpty() ? g_null_atom : namespace_uri,
|
| - local_name);
|
| + return EnsureCachedCollection<TagCollectionNS>(
|
| + kTagCollectionNSType,
|
| + namespace_uri.IsEmpty() ? g_null_atom : namespace_uri, local_name);
|
| }
|
|
|
| // Takes an AtomicString in argument because it is common for elements to share
|
|
|