Align serialization of keyframes rule with Gecko. r?heycam
draft
Align serialization of keyframes rule with Gecko. r?heycam
MozReview-Commit-ID: B4XuRpacI2q
--- a/servo/components/style/stylesheets.rs
+++ b/servo/components/style/stylesheets.rs
@@ -570,28 +570,24 @@ pub struct KeyframesRule {
}
impl ToCssWithGuard for KeyframesRule {
// Serialization of KeyframesRule is not specced.
fn to_css<W>(&self, guard: &SharedRwLockReadGuard, dest: &mut W) -> fmt::Result
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}")
}
}
#[allow(missing_docs)]
#[derive(Debug)]
pub struct MediaRule {
pub media_queries: Arc<Locked<MediaList>>,
pub rules: Arc<Locked<CssRules>>,