mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Stop using NS_STYLE_FONT_WEIGHT_NORMAL and NS_STYLE_FONT_WEIGHT_BOLD
The Servo side of the changes for https://bugzilla.mozilla.org/show_bug.cgi?id=1452040
This commit is contained in:
parent
7f3b9ca013
commit
f72136800f
2 changed files with 4 additions and 4 deletions
|
@ -33,9 +33,9 @@ impl<'a> ToNsCssValue for &'a FontWeight {
|
||||||
fn convert(self, nscssvalue: &mut nsCSSValue) {
|
fn convert(self, nscssvalue: &mut nsCSSValue) {
|
||||||
match *self {
|
match *self {
|
||||||
FontWeight::Normal =>
|
FontWeight::Normal =>
|
||||||
nscssvalue.set_enum(structs::NS_STYLE_FONT_WEIGHT_NORMAL as i32),
|
nscssvalue.set_enum(structs::NS_FONT_WEIGHT_NORMAL as i32),
|
||||||
FontWeight::Bold =>
|
FontWeight::Bold =>
|
||||||
nscssvalue.set_enum(structs::NS_STYLE_FONT_WEIGHT_BOLD as i32),
|
nscssvalue.set_enum(structs::NS_FONT_WEIGHT_BOLD as i32),
|
||||||
FontWeight::Weight(weight) => nscssvalue.set_integer(weight.0 as i32),
|
FontWeight::Weight(weight) => nscssvalue.set_integer(weight.0 as i32),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5330,8 +5330,8 @@ pub extern "C" fn Servo_ParseFontShorthandForMatching(
|
||||||
});
|
});
|
||||||
match font.font_weight {
|
match font.font_weight {
|
||||||
FontWeight::Weight(w) => weight.set_from(w),
|
FontWeight::Weight(w) => weight.set_from(w),
|
||||||
FontWeight::Normal => weight.set_enum(structs::NS_STYLE_FONT_WEIGHT_NORMAL as i32),
|
FontWeight::Normal => weight.set_enum(structs::NS_FONT_WEIGHT_NORMAL as i32),
|
||||||
FontWeight::Bold => weight.set_enum(structs::NS_STYLE_FONT_WEIGHT_BOLD as i32),
|
FontWeight::Bold => weight.set_enum(structs::NS_FONT_WEIGHT_BOLD as i32),
|
||||||
// Resolve relative font weights against the initial of font-weight
|
// Resolve relative font weights against the initial of font-weight
|
||||||
// (normal, which is equivalent to 400).
|
// (normal, which is equivalent to 400).
|
||||||
FontWeight::Bolder => weight.set_enum(structs::NS_FONT_WEIGHT_BOLD as i32),
|
FontWeight::Bolder => weight.set_enum(structs::NS_FONT_WEIGHT_BOLD as i32),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue