Add unicode-range descriptor to @font-face

This commit is contained in:
Simon Sapin 2017-02-02 20:28:21 +01:00
parent 0f351cb851
commit 4701850f37
2 changed files with 62 additions and 7 deletions

View file

@ -11,6 +11,7 @@ use error_reporting::ParseErrorReporter;
#[cfg(feature = "gecko")]
use gecko_bindings::sugar::refptr::{GeckoArcPrincipal, GeckoArcURI};
use servo_url::ServoUrl;
use style_traits::CommaSeparated;
use stylesheets::{MemoryHoleReporter, Origin};
/// Extra data that the style backend may need to parse stylesheets.
@ -102,3 +103,9 @@ pub trait Parse : Sized {
/// Returns an error on failure.
fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()>;
}
impl<T> Parse for Vec<T> where T: Parse + CommaSeparated {
fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
input.parse_comma_separated(|input| T::parse(context, input))
}
}