style: Bump the selector lenght heuristic.
draft
style: Bump the selector lenght heuristic.
A selector with combinators has to have length > 2 (a component, a combinator,
another component).
MozReview-Commit-ID: GvMEbRdOVi2
--- a/servo/components/style/dom_apis.rs
+++ b/servo/components/style/dom_apis.rs
@@ -526,17 +526,17 @@ where
//
// See the comment in collect_invalidations to see why only if we're a root.
//
// The invalidation mechanism is only useful in presence of combinators.
//
// We could do that check properly here, though checking the length of the
// selectors is a good heuristic.
let invalidation_may_be_useful =
- selector_list.0.iter().any(|s| s.len() > 1);
+ selector_list.0.iter().any(|s| s.len() > 2);
if root_element.is_some() || !invalidation_may_be_useful {
query_selector_slow::<E, Q>(
root,
selector_list,
results,
&mut matching_context,
);