Chromium Code Reviews| Index: Source/core/dom/SelectorQuery.cpp |
| diff --git a/Source/core/dom/SelectorQuery.cpp b/Source/core/dom/SelectorQuery.cpp |
| index 572180d2523e2f0ed1b15c571d590ccf27ae2a36..ee10ce8e35b7d8eb8c4a6d3adf16a3a95c28af74 100644 |
| --- a/Source/core/dom/SelectorQuery.cpp |
| +++ b/Source/core/dom/SelectorQuery.cpp |
| @@ -122,9 +122,8 @@ inline bool SelectorDataList::selectorMatches(const CSSSelector& selector, Eleme |
| SelectorChecker selectorChecker(SelectorChecker::QueryingRules); |
| SelectorChecker::SelectorCheckingContext selectorCheckingContext(&element, SelectorChecker::VisitedMatchDisabled); |
| selectorCheckingContext.selector = &selector; |
| - selectorCheckingContext.scope = !rootNode.isDocumentNode() ? &rootNode : nullptr; |
| - if (selectorCheckingContext.scope) |
| - selectorCheckingContext.scopeContainsLastMatchedElement = true; |
| + selectorCheckingContext.scope = &rootNode; |
| + selectorCheckingContext.scopeContainsLastMatchedElement = true; |
|
esprehn
2015/08/29 23:55:30
Why do we need scopeContainsLastMatchedElement at
|
| return selectorChecker.match(selectorCheckingContext); |
| } |