mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Avoid useless allocations in custom property name serialization.
And make transition-property more correct by serializing --0 unescaped instead of escaped. Bug: 1466645 Reviewed-by: xidorn MozReview-Commit-ID: CCBSe5Frd0d
This commit is contained in:
parent
63ca2a803d
commit
c6e43c0329
3 changed files with 32 additions and 7 deletions
|
@ -756,13 +756,13 @@ impl ToCss for TransitionProperty {
|
|||
where
|
||||
W: Write,
|
||||
{
|
||||
use values::serialize_atom_identifier;
|
||||
use values::serialize_atom_name;
|
||||
match *self {
|
||||
TransitionProperty::Shorthand(ref s) => s.to_css(dest),
|
||||
TransitionProperty::Longhand(ref l) => l.to_css(dest),
|
||||
TransitionProperty::Custom(ref name) => {
|
||||
dest.write_str("--")?;
|
||||
serialize_atom_identifier(name, dest)
|
||||
serialize_atom_name(name, dest)
|
||||
}
|
||||
TransitionProperty::Unsupported(ref i) => i.to_css(dest),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue