Allow nonstandard font-weight values for system fonts

This commit is contained in:
Manish Goregaokar 2017-07-24 17:16:30 -07:00
parent a35c8f08e2
commit 9c6f11c965
2 changed files with 8 additions and 6 deletions

View file

@ -2022,10 +2022,8 @@ fn static_assert() {
${impl_simple_copy('font_weight', 'mFont.weight')}
pub fn clone_font_weight(&self) -> longhands::font_weight::computed_value::T {
debug_assert!(self.gecko.mFont.weight >= 100);
debug_assert!(self.gecko.mFont.weight <= 900);
debug_assert!(self.gecko.mFont.weight % 10 == 0);
unsafe { transmute(self.gecko.mFont.weight) }
debug_assert!(self.gecko.mFont.weight <= ::std::u16::MAX);
longhands::font_weight::computed_value::T(self.gecko.mFont.weight)
}
${impl_simple_type_with_conversion("font_synthesis", "mFont.synthesis")}