mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
style: Avoid looping through every selector more than twice.
I've left the Invalidation stuff on its own since that's more complex, but I think this may help a bit (perhaps not too much though) with the slow rebuild times.
This commit is contained in:
parent
4d71eed898
commit
fc77f1fe31
2 changed files with 167 additions and 171 deletions
|
@ -20,7 +20,7 @@ use style::selector_parser::{SelectorImpl, SelectorParser};
|
|||
use style::shared_lock::SharedRwLock;
|
||||
use style::stylesheets::StyleRule;
|
||||
use style::stylist::{Stylist, Rule};
|
||||
use style::stylist::needs_revalidation;
|
||||
use style::stylist::needs_revalidation_for_testing;
|
||||
use style::thread_state;
|
||||
|
||||
/// Helper method to get some Rules from selector strings.
|
||||
|
@ -126,7 +126,7 @@ fn test_revalidation_selectors() {
|
|||
// Selectors in the ancestor chain (needed for cousin sharing).
|
||||
"p:first-child span",
|
||||
]).into_iter()
|
||||
.filter(|s| needs_revalidation(&s))
|
||||
.filter(|s| needs_revalidation_for_testing(&s))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let reference = parse_selectors(&[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue