stylo: System font support for font-weight

This commit is contained in:
Manish Goregaokar 2017-03-21 20:38:12 -07:00 committed by Manish Goregaokar
parent 5b06a32032
commit 4a899530be
4 changed files with 40 additions and 7 deletions

View file

@ -1371,10 +1371,7 @@ 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) }
unsafe { longhands::font_weight::computed_value::T::from_gecko_weight(self.gecko.mFont.weight) }
}
pub fn set_font_synthesis(&mut self, v: longhands::font_synthesis::computed_value::T) {