mirror of
https://github.com/servo/servo.git
synced 2025-07-02 04:53:39 +01:00
Optimize selector matching for some common cases.
This commit is contained in:
parent
7de87c487b
commit
d0fd92221c
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