Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(555)

Unified Diff: sky/engine/core/dom/SelectorQuery.cpp

Issue 801283006: Get rid of SelectorCheckingContext. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: missing static. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/css/SelectorChecker.cpp ('k') | sky/engine/core/html/HTMLContentElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/SelectorQuery.cpp
diff --git a/sky/engine/core/dom/SelectorQuery.cpp b/sky/engine/core/dom/SelectorQuery.cpp
index 4f1946ec1aba8c8145069175c6b9aa5de349893e..1995e874a3dc7ac57c9800a9cb41e001ffff0971 100644
--- a/sky/engine/core/dom/SelectorQuery.cpp
+++ b/sky/engine/core/dom/SelectorQuery.cpp
@@ -73,11 +73,10 @@ PassRefPtr<Element> SelectorQuery::queryFirst(ContainerNode& rootNode) const
bool SelectorQuery::selectorMatches(ContainerNode& rootNode, Element& element) const
{
- SelectorChecker checker;
+ SelectorChecker checker(element);
for (const CSSSelector* selector = m_selectors.first(); selector; selector = CSSSelectorList::next(*selector)) {
- SelectorChecker::SelectorCheckingContext context(*selector, &element);
- context.scope = !rootNode.isDocumentNode() ? &rootNode : 0;
- if (checker.match(context))
+ const ContainerNode* scope = !rootNode.isDocumentNode() ? &rootNode : 0;
+ if (checker.match(*selector, scope))
return true;
}
return false;
« no previous file with comments | « sky/engine/core/css/SelectorChecker.cpp ('k') | sky/engine/core/html/HTMLContentElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698