mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Impl ToCss on LonghandsToSerialize directly
This commit is contained in:
parent
f327b2fc73
commit
4bc0fbeeb1
13 changed files with 52 additions and 61 deletions
|
@ -554,15 +554,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ToCss for LonghandsToSerialize<'a> {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result
|
||||
where W: fmt::Write,
|
||||
{
|
||||
self.to_css_declared(dest)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Parse the given shorthand and fill the result into the
|
||||
/// `declarations` vector.
|
||||
pub fn parse(context: &ParserContext,
|
||||
|
@ -635,8 +626,8 @@
|
|||
})
|
||||
}
|
||||
|
||||
impl<'a> LonghandsToSerialize<'a> {
|
||||
fn to_css_declared<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
impl<'a> ToCss for LonghandsToSerialize<'a> {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
super::serialize_four_sides(
|
||||
dest,
|
||||
self.${to_rust_ident(sub_property_pattern % 'top')},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue