aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXidorn Quan <me@upsuper.org>2017-05-19 13:25:05 +1000
committerXidorn Quan <me@upsuper.org>2017-05-19 13:56:56 +1000
commit32a10073c1143cd27843dd942c294e89aee692fe (patch)
treeb72df17b573aae1a3581b12ee28b204798d0ca4a
parent0c1fd2f26e898341c2761aa386e6cefea0ec7d94 (diff)
downloadservo-32a10073c1143cd27843dd942c294e89aee692fe.tar.gz
servo-32a10073c1143cd27843dd942c294e89aee692fe.zip
Align serialization of keyframes rule with Gecko.
-rw-r--r--components/style/stylesheets.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/components/style/stylesheets.rs b/components/style/stylesheets.rs
index 7dd567ccfcf..4b8438e59d9 100644
--- a/components/style/stylesheets.rs
+++ b/components/style/stylesheets.rs
@@ -575,18 +575,14 @@ impl ToCssWithGuard for KeyframesRule {
where W: fmt::Write {
try!(dest.write_str("@keyframes "));
try!(self.name.to_css(dest));
- try!(dest.write_str(" { "));
+ try!(dest.write_str(" {"));
let iter = self.keyframes.iter();
- let mut first = true;
for lock in iter {
- if !first {
- try!(dest.write_str(" "));
- }
- first = false;
+ try!(dest.write_str("\n"));
let keyframe = lock.read_with(&guard);
try!(keyframe.to_css(guard, dest));
}
- dest.write_str(" }")
+ dest.write_str("\n}")
}
}