mirror of
https://github.com/servo/servo.git
synced 2025-09-06 04:58:21 +01:00
style: Update font-weight property and descriptor to css-fonts-4.
Bug: 1454596 Reviewed-by: xidorn MozReview-Commit-ID: 27aS2UrgXjs
This commit is contained in:
parent
76a14d6a64
commit
bc1126ee8c
10 changed files with 199 additions and 141 deletions
|
@ -5395,10 +5395,9 @@ pub extern "C" fn Servo_ParseFontShorthandForMatching(
|
|||
font_stretch::SpecifiedValue::Keyword(ref kw) => kw,
|
||||
font_stretch::SpecifiedValue::System(_) => return false,
|
||||
});
|
||||
|
||||
match font.font_weight {
|
||||
FontWeight::Weight(w) => weight.set_from(w),
|
||||
FontWeight::Normal => weight.set_enum(structs::NS_FONT_WEIGHT_NORMAL as i32),
|
||||
FontWeight::Bold => weight.set_enum(structs::NS_FONT_WEIGHT_BOLD as i32),
|
||||
FontWeight::Absolute(w) => weight.set_font_weight(w.compute().0),
|
||||
// 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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue