mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Store selectors in matching order, rather than parse order.
We add a slow in-place reverse during parsing to achieve this for now, which gets fixed up later on. MozReview-Commit-ID: 42QkOzSgV3T
This commit is contained in:
parent
fac5aeb092
commit
1d242ad760
4 changed files with 42 additions and 31 deletions
|
@ -419,7 +419,7 @@ where
|
|||
}
|
||||
|
||||
let mut local_context = LocalMatchingContext::new(context, selector);
|
||||
for component in selector.iter_raw_rev_from(from_offset - 1) {
|
||||
for component in selector.iter_raw_parse_order_from(from_offset - 1) {
|
||||
if matches!(*component, Component::Combinator(..)) {
|
||||
return CompoundSelectorMatchingResult::Matched {
|
||||
next_combinator_offset: from_offset - 1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue