mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +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");
|
"Style attributes do not apply to pseudo-elements");
|
||||||
|
|
||||||
// In cascading order
|
// In cascading order
|
||||||
let rule_map_list = ~[&self.ua_rule_map.normal,
|
let rule_map_list = [&self.ua_rule_map.normal,
|
||||||
&self.user_rule_map.normal,
|
&self.user_rule_map.normal,
|
||||||
&self.author_rule_map.normal,
|
&self.author_rule_map.normal,
|
||||||
&self.author_rule_map.important,
|
&self.author_rule_map.important,
|
||||||
&self.user_rule_map.important,
|
&self.user_rule_map.important,
|
||||||
&self.ua_rule_map.important];
|
&self.ua_rule_map.important];
|
||||||
|
|
||||||
// TODO: Make this a stack-allocated vector
|
// TODO: Make this a stack-allocated vector
|
||||||
let mut matching_rules_list: [~[Rule], ..6] = [~[], ~[], ~[], ~[], ~[], ~[]];
|
let mut matching_rules_list: [~[Rule], ..6] = [~[], ~[], ~[], ~[], ~[], ~[]];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue