Skip to content

Commit

Permalink
Stop using NS_STYLE_FONT_WEIGHT_NORMAL and NS_STYLE_FONT_WEIGHT_BOLD
Browse files Browse the repository at this point in the history
  • Loading branch information
jwatt committed Apr 6, 2018
1 parent 7f3b9ca commit f721368
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/style/gecko/rules.rs
Expand Up @@ -33,9 +33,9 @@ impl<'a> ToNsCssValue for &'a FontWeight {
fn convert(self, nscssvalue: &mut nsCSSValue) {
match *self {
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 =>
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),
}
}
Expand Down
4 changes: 2 additions & 2 deletions ports/geckolib/glue.rs
Expand Up @@ -5330,8 +5330,8 @@ pub extern "C" fn Servo_ParseFontShorthandForMatching(
});
match font.font_weight {
FontWeight::Weight(w) => weight.set_from(w),
FontWeight::Normal => weight.set_enum(structs::NS_STYLE_FONT_WEIGHT_NORMAL as i32),
FontWeight::Bold => weight.set_enum(structs::NS_STYLE_FONT_WEIGHT_BOLD as i32),
FontWeight::Normal => weight.set_enum(structs::NS_FONT_WEIGHT_NORMAL as i32),
FontWeight::Bold => weight.set_enum(structs::NS_FONT_WEIGHT_BOLD as i32),
// Resolve relative font weights against the initial of font-weight
// (normal, which is equivalent to 400).
FontWeight::Bolder => weight.set_enum(structs::NS_FONT_WEIGHT_BOLD as i32),
Expand Down

0 comments on commit f721368

Please sign in to comment.