diff --git a/components/style/font_face.rs b/components/style/font_face.rs index a574fd1e5b2..868ca8524a2 100644 --- a/components/style/font_face.rs +++ b/components/style/font_face.rs @@ -9,6 +9,7 @@ #![deny(missing_docs)] use computed_values::font_family::FamilyName; +#[cfg(feature = "gecko")] use computed_values::font_style; use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser, Parser}; use parser::{ParserContext, log_css_error, Parse}; use std::fmt; @@ -282,6 +283,22 @@ macro_rules! font_face_descriptors { } /// css-name rust_identifier: Type = initial_value, +#[cfg(feature = "gecko")] +font_face_descriptors! { + mandatory descriptors = [ + /// The specified url. + "font-family" family: FamilyName = FamilyName(atom!("")), + + /// The format hints specified with the `format()` function. + "src" sources: Vec = Vec::new(), + ] + optional descriptors = [ + /// The style of this font face + "font-style" style: font_style::T = font_style::T::normal, + ] +} + +#[cfg(feature = "servo")] font_face_descriptors! { mandatory descriptors = [ /// The specified url. diff --git a/components/style/properties/helpers.mako.rs b/components/style/properties/helpers.mako.rs index b2c52e1e868..7156e9f9585 100644 --- a/components/style/properties/helpers.mako.rs +++ b/components/style/properties/helpers.mako.rs @@ -380,6 +380,13 @@ -> Result { SpecifiedValue::parse(input) } + impl Parse for SpecifiedValue { + #[inline] + fn parse(_context: &ParserContext, input: &mut Parser) + -> Result { + SpecifiedValue::parse(input) + } + } % if vector: <%call expr="vector_longhand(name, keyword=Keyword(name, values, **keyword_kwargs), **kwargs)">