mirror of
https://github.com/servo/servo.git
synced 2025-08-30 01:28:21 +01:00
Make DeclaredValue store CSSWideKeyword
Rather than having separate variant for each CSS-wide keyword.
This commit is contained in:
parent
29fd30601e
commit
03f6d21cb5
10 changed files with 120 additions and 115 deletions
|
@ -99,21 +99,24 @@
|
|||
impl<'a> LonghandsToSerialize<'a> {
|
||||
fn to_css_declared<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
match *self.list_style_position {
|
||||
DeclaredValue::Initial => try!(write!(dest, "outside")),
|
||||
DeclaredValue::CSSWideKeyword(CSSWideKeyword::Initial) =>
|
||||
try!(write!(dest, "outside")),
|
||||
_ => try!(self.list_style_position.to_css(dest))
|
||||
}
|
||||
|
||||
try!(write!(dest, " "));
|
||||
|
||||
match *self.list_style_image {
|
||||
DeclaredValue::Initial => try!(write!(dest, "none")),
|
||||
DeclaredValue::CSSWideKeyword(CSSWideKeyword::Initial) =>
|
||||
try!(write!(dest, "none")),
|
||||
_ => try!(self.list_style_image.to_css(dest))
|
||||
};
|
||||
|
||||
try!(write!(dest, " "));
|
||||
|
||||
match *self.list_style_type {
|
||||
DeclaredValue::Initial => write!(dest, "disc"),
|
||||
DeclaredValue::CSSWideKeyword(CSSWideKeyword::Initial) =>
|
||||
write!(dest, "disc"),
|
||||
_ => self.list_style_type.to_css(dest)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue