mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +01:00
style: Use a user defined type for font weight everywhere.
Bug: 1436048 Reviewed-by: emilio
This commit is contained in:
parent
156ef81878
commit
245d848508
4 changed files with 18 additions and 7 deletions
|
@ -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) }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue