style: Fixups for css-fonts-4 font-weight.

This commit is contained in:
Emilio Cobos Álvarez 2018-04-21 20:05:37 +02:00
parent 0f19c25706
commit 48de556f8c
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
10 changed files with 51 additions and 64 deletions

View file

@ -20,7 +20,7 @@ use style::values::computed::font::FontWeight;
/// to be expanded or refactored when we support more of the font styling parameters.
///
/// NB: If you change this, you will need to update `style::properties::compute_font_hash()`.
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, Serialize)]
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
pub struct FontTemplateDescriptor {
pub weight: FontWeight,
pub stretch: FontStretch,
@ -29,12 +29,15 @@ pub struct FontTemplateDescriptor {
impl FontTemplateDescriptor {
#[inline]
pub fn new(weight: FontWeight, stretch: FontStretch, italic: bool)
-> FontTemplateDescriptor {
FontTemplateDescriptor {
weight: weight,
stretch: stretch,
italic: italic,
pub fn new(
weight: FontWeight,
stretch: FontStretch,
italic: bool,
) -> Self {
Self {
weight,
stretch,
italic,
}
}