mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
Clean up serialization and other hacks
This commit is contained in:
parent
5df4b82a6b
commit
af4d2e910e
3 changed files with 89 additions and 48 deletions
|
@ -775,8 +775,7 @@ pub mod longhands {
|
|||
% endfor
|
||||
&T::Length(length) => write!(f, "{:?}", length),
|
||||
&T::Percentage(number) => write!(f, "{}%", number),
|
||||
// XXX HACK WRONG
|
||||
&T::Calc(calc) => write!(f, "{}%", 10.),
|
||||
&T::Calc(calc) => write!(f, "{:?}", calc)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1914,9 +1913,9 @@ pub mod longhands {
|
|||
specified::LengthOrPercentage::Length(value) => value,
|
||||
specified::LengthOrPercentage::Percentage(value) =>
|
||||
specified::Length::FontRelative(specified::FontRelativeLength::Em(value)),
|
||||
// XXX WRONG HACK
|
||||
specified::LengthOrPercentage::Calc(calc) =>
|
||||
specified::Length::FontRelative(specified::FontRelativeLength::Em(20.)),
|
||||
// FIXME(dzbarsky) handle calc for font-size
|
||||
specified::LengthOrPercentage::Calc(_) =>
|
||||
specified::Length::FontRelative(specified::FontRelativeLength::Em(1.)),
|
||||
})
|
||||
.or_else(|()| {
|
||||
match_ignore_ascii_case! { try!(input.expect_ident()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue