Use integer for specified and computed font-weight

This commit is contained in:
Xidorn Quan 2017-07-06 15:31:24 +10:00
parent 4f0f2fb13e
commit 8b842f5417
11 changed files with 111 additions and 194 deletions

View file

@ -31,7 +31,7 @@ impl ToNsCssValue for FamilyName {
impl ToNsCssValue for font_weight::T {
fn convert(self, nscssvalue: &mut nsCSSValue) {
nscssvalue.set_integer(self as i32)
nscssvalue.set_integer(self.0 as i32)
}
}
@ -42,7 +42,7 @@ impl ToNsCssValue for FontWeight {
nscssvalue.set_enum(structs::NS_STYLE_FONT_WEIGHT_NORMAL as i32),
FontWeight::Bold =>
nscssvalue.set_enum(structs::NS_STYLE_FONT_WEIGHT_BOLD as i32),
FontWeight::Weight(weight) => nscssvalue.set_integer(weight as i32),
FontWeight::Weight(weight) => nscssvalue.set_integer(weight.0 as i32),
}
}
}