mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Adding support for correct shorthand serialization
This commit is contained in:
parent
49431be44a
commit
3831c0650c
23 changed files with 1186 additions and 643 deletions
|
@ -415,23 +415,23 @@ impl ToCss for BorderRadius {
|
|||
self.top_right.0.width == self.top_right.0.height &&
|
||||
self.bottom_right.0.width == self.bottom_right.0.height &&
|
||||
self.bottom_left.0.width == self.bottom_left.0.height {
|
||||
serialize_four_sides((&self.top_left.0.width,
|
||||
&self.top_right.0.width,
|
||||
&self.bottom_right.0.width,
|
||||
&self.bottom_left.0.width),
|
||||
dest)
|
||||
serialize_four_sides(dest,
|
||||
&self.top_left.0.width,
|
||||
&self.top_right.0.width,
|
||||
&self.bottom_right.0.width,
|
||||
&self.bottom_left.0.width)
|
||||
} else {
|
||||
try!(serialize_four_sides((&self.top_left.0.width,
|
||||
&self.top_right.0.width,
|
||||
&self.bottom_right.0.width,
|
||||
&self.bottom_left.0.width),
|
||||
dest));
|
||||
try!(serialize_four_sides(dest,
|
||||
&self.top_left.0.width,
|
||||
&self.top_right.0.width,
|
||||
&self.bottom_right.0.width,
|
||||
&self.bottom_left.0.width));
|
||||
try!(dest.write_str(" / "));
|
||||
serialize_four_sides((&self.top_left.0.height,
|
||||
&self.top_right.0.height,
|
||||
&self.bottom_right.0.height,
|
||||
&self.bottom_left.0.height),
|
||||
dest)
|
||||
serialize_four_sides(dest,
|
||||
&self.top_left.0.height,
|
||||
&self.top_right.0.height,
|
||||
&self.bottom_right.0.height,
|
||||
&self.bottom_left.0.height)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue