style: Use a user defined type for font weight everywhere.

Bug: 1436048
Reviewed-by: emilio
This commit is contained in:
Jonathan Watt 2018-04-13 20:34:37 +01:00 committed by Emilio Cobos Álvarez
parent 156ef81878
commit 245d848508
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 18 additions and 7 deletions

View file

@ -177,6 +177,11 @@ impl nsCSSValue {
self.set_string_from_atom_internal(s, nsCSSUnit::eCSSUnit_Local_Font);
}
/// Set to a font weight
pub fn set_font_weight(&mut self, w: u16) {
unsafe { bindings::Gecko_CSSValue_SetFontWeight(self, w as f32) }
}
fn set_int_internal(&mut self, value: i32, unit: nsCSSUnit) {
unsafe { bindings::Gecko_CSSValue_SetInt(self, value, unit) }
}