mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Auto merge of #17430 - upsuper:font-weight-int, r=nox
Store font-weight as integer directly It doesn't make much sense to store `font-weight` as separate enums, especially given that we would need to support (somehow) arbitrary font weight value when we implement CSS Fonts Level 4. This PR refactors the `font-weight` a bit to make it store as `u16` directly. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17430) <!-- Reviewable:end -->
This commit is contained in:
commit
f11a922760
11 changed files with 111 additions and 194 deletions
|
@ -1906,7 +1906,7 @@ fn static_assert() {
|
|||
}
|
||||
|
||||
pub fn set_font_weight(&mut self, v: longhands::font_weight::computed_value::T) {
|
||||
self.gecko.mFont.weight = v as u16;
|
||||
self.gecko.mFont.weight = v.0;
|
||||
}
|
||||
${impl_simple_copy('font_weight', 'mFont.weight')}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue