| Index: Source/core/dom/SelectorQuery.cpp
|
| diff --git a/Source/core/dom/SelectorQuery.cpp b/Source/core/dom/SelectorQuery.cpp
|
| index 2dda9c39f1d47402f223fa8c94c97f9f6290d646..e190720d677a3cd183b3fd16ba5c6c17307fe833 100644
|
| --- a/Source/core/dom/SelectorQuery.cpp
|
| +++ b/Source/core/dom/SelectorQuery.cpp
|
| @@ -176,10 +176,10 @@ void SelectorDataList::collectElementsByClassName(ContainerNode& rootNode, const
|
| }
|
|
|
| template <typename SelectorQueryTrait>
|
| -void SelectorDataList::collectElementsByTagName(ContainerNode& rootNode, const QualifiedName& tagName, typename SelectorQueryTrait::OutputType& output) const
|
| +void SelectorDataList::collectElementsByTagName(ContainerNode& rootNode, const CSSSelector& tagSelector, typename SelectorQueryTrait::OutputType& output) const
|
| {
|
| for (Element& element : ElementTraversal::descendantsOf(rootNode)) {
|
| - if (SelectorChecker::tagMatches(element, tagName)) {
|
| + if (SelectorChecker::tagMatches(element, tagSelector)) {
|
| SelectorQueryTrait::appendElement(output, element);
|
| if (SelectorQueryTrait::shouldOnlyMatchFirstElement)
|
| return;
|
| @@ -468,7 +468,7 @@ void SelectorDataList::execute(ContainerNode& rootNode, typename SelectorQueryTr
|
| collectElementsByClassName<SelectorQueryTrait>(rootNode, firstSelector.value(), output);
|
| return;
|
| case CSSSelector::Tag:
|
| - collectElementsByTagName<SelectorQueryTrait>(rootNode, firstSelector.tagQName(), output);
|
| + collectElementsByTagName<SelectorQueryTrait>(rootNode, firstSelector, output);
|
| return;
|
| default:
|
| break; // If we need another fast path, add here.
|
|
|