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:
bors-servo 2017-07-06 16:18:36 -07:00 committed by GitHub
commit f11a922760
11 changed files with 111 additions and 194 deletions

View file

@ -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')}