mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Avoid one allocation in selector matching
This commit is contained in:
parent
60d0757a02
commit
74913ff05a
1 changed files with 6 additions and 6 deletions
|
@ -275,12 +275,12 @@ impl Stylist {
|
|||
"Style attributes do not apply to pseudo-elements");
|
||||
|
||||
// In cascading order
|
||||
let rule_map_list = ~[&self.ua_rule_map.normal,
|
||||
&self.user_rule_map.normal,
|
||||
&self.author_rule_map.normal,
|
||||
&self.author_rule_map.important,
|
||||
&self.user_rule_map.important,
|
||||
&self.ua_rule_map.important];
|
||||
let rule_map_list = [&self.ua_rule_map.normal,
|
||||
&self.user_rule_map.normal,
|
||||
&self.author_rule_map.normal,
|
||||
&self.author_rule_map.important,
|
||||
&self.user_rule_map.important,
|
||||
&self.ua_rule_map.important];
|
||||
|
||||
// TODO: Make this a stack-allocated vector
|
||||
let mut matching_rules_list: [~[Rule], ..6] = [~[], ~[], ~[], ~[], ~[], ~[]];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue