mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #19781 - upsuper:matching-opt, r=emilio
Optimize selector matching for some common cases This is the "better way" I mentioned in #19774, which seems to actually improve the score of dromaeo_css on talos. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19781) <!-- Reviewable:end -->
This commit is contained in:
commit
525758ea5e
2 changed files with 92 additions and 26 deletions
|
@ -9,7 +9,7 @@ use context::StackLimitChecker;
|
|||
use dom::{TElement, TNode};
|
||||
use selector_parser::SelectorImpl;
|
||||
use selectors::matching::{CompoundSelectorMatchingResult, MatchingContext};
|
||||
use selectors::matching::matches_compound_selector;
|
||||
use selectors::matching::matches_compound_selector_from;
|
||||
use selectors::parser::{Combinator, Component, Selector};
|
||||
use smallvec::SmallVec;
|
||||
use std::fmt;
|
||||
|
@ -691,7 +691,7 @@ where
|
|||
debug!("TreeStyleInvalidator::process_invalidation({:?}, {:?}, {:?})",
|
||||
self.element, invalidation, invalidation_kind);
|
||||
|
||||
let matching_result = matches_compound_selector(
|
||||
let matching_result = matches_compound_selector_from(
|
||||
&invalidation.selector,
|
||||
invalidation.offset,
|
||||
self.processor.matching_context(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue