| Index: Source/core/dom/SelectorQuery.cpp
|
| diff --git a/Source/core/dom/SelectorQuery.cpp b/Source/core/dom/SelectorQuery.cpp
|
| index 2dda9c39f1d47402f223fa8c94c97f9f6290d646..6a5d428934d4258c09430f6dfa83f20f63bad1f4 100644
|
| --- a/Source/core/dom/SelectorQuery.cpp
|
| +++ b/Source/core/dom/SelectorQuery.cpp
|
| @@ -179,7 +179,10 @@ template <typename SelectorQueryTrait>
|
| void SelectorDataList::collectElementsByTagName(ContainerNode& rootNode, const QualifiedName& tagName, typename SelectorQueryTrait::OutputType& output) const
|
| {
|
| for (Element& element : ElementTraversal::descendantsOf(rootNode)) {
|
| - if (SelectorChecker::tagMatches(element, tagName)) {
|
| + // querySelector*() doesn't allow namespaces and throws before it gets
|
| + // here so we can ignore them.
|
| + ASSERT(tagName.namespaceURI() == starAtom);
|
| + if (tagName == anyQName() || element.hasLocalName(tagName.localName())) {
|
| SelectorQueryTrait::appendElement(output, element);
|
| if (SelectorQueryTrait::shouldOnlyMatchFirstElement)
|
| return;
|
|
|