mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Optimize serialization of identifiers of length <= 16 🐉🐲
Much like we optimize to_ascii_lowercase. This also fixes a bug in Servo where attr() rules with an unknown namespace prefix are parsed, which is wrong.
This commit is contained in:
parent
e57319a734
commit
f4c9c598a3
13 changed files with 96 additions and 65 deletions
|
@ -1728,10 +1728,10 @@ impl ToCss for PseudoElement {
|
|||
dest.write_char('(')?;
|
||||
let mut iter = args.iter();
|
||||
if let Some(first) = iter.next() {
|
||||
serialize_identifier(&first.to_string(), dest)?;
|
||||
serialize_atom_identifier(first, dest)?;
|
||||
for item in iter {
|
||||
dest.write_str(", ")?;
|
||||
serialize_identifier(&item.to_string(), dest)?;
|
||||
serialize_atom_identifier(item, dest)?;
|
||||
}
|
||||
}
|
||||
dest.write_char(')')?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue