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

Unified Diff: third_party/WebKit/Source/core/dom/SelectorQuery.h

Issue 2820013002: Separate the id fast path in SelectorQuery. (Closed)
Patch Set: Update tests. Created 3 years, 8 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 | « no previous file | third_party/WebKit/Source/core/dom/SelectorQuery.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/SelectorQuery.h
diff --git a/third_party/WebKit/Source/core/dom/SelectorQuery.h b/third_party/WebKit/Source/core/dom/SelectorQuery.h
index 934be7a212292fb2dbb0aa3c632e4be9505ed2f7..660c681b6d88138745575a126f3acdd9d63d48f4 100644
--- a/third_party/WebKit/Source/core/dom/SelectorQuery.h
+++ b/third_party/WebKit/Source/core/dom/SelectorQuery.h
@@ -84,6 +84,9 @@ class CORE_EXPORT SelectorQuery {
bool CanUseFastQuery(const ContainerNode& root_node) const;
template <typename SelectorQueryTrait>
+ void ExecuteWithId(ContainerNode& root_node,
+ typename SelectorQueryTrait::OutputType&) const;
+ template <typename SelectorQueryTrait>
void FindTraverseRootsAndExecute(
ContainerNode& root_node,
typename SelectorQueryTrait::OutputType&) const;
@@ -110,6 +113,9 @@ class CORE_EXPORT SelectorQuery {
// m_selectorList will never be empty as SelectorQueryCache::add would have
// thrown an exception.
Vector<const CSSSelector*> selectors_;
+ AtomicString selector_id_;
+ bool selector_id_is_rightmost_ : 1;
+ bool selector_id_affected_by_sibling_combinator_ : 1;
bool uses_deep_combinator_or_shadow_pseudo_ : 1;
bool needs_updated_distribution_ : 1;
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/SelectorQuery.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698