mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
Upgrade to rustc ba2f13ef0 2015-02-04
This commit is contained in:
parent
bc6882bdef
commit
d5dd1d658e
136 changed files with 1091 additions and 878 deletions
|
@ -31,19 +31,19 @@ pub fn iter_font_face_rules_inner<F>(rules: &[CSSRule], device: &Device,
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Show, PartialEq, Eq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum Source {
|
||||
Url(UrlSource),
|
||||
Local(String),
|
||||
}
|
||||
|
||||
#[derive(Clone, Show, PartialEq, Eq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct UrlSource {
|
||||
pub url: Url,
|
||||
pub format_hints: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Show, PartialEq, Eq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct FontFaceRule {
|
||||
pub family: String,
|
||||
pub sources: Vec<Source>,
|
||||
|
@ -58,9 +58,10 @@ pub fn parse_font_face_block(context: &ParserContext, input: &mut Parser)
|
|||
while let Some(declaration) = iter.next() {
|
||||
match declaration {
|
||||
Err(range) => {
|
||||
let pos = range.start;
|
||||
let message = format!("Unsupported @font-face descriptor declaration: '{}'",
|
||||
iter.input.slice(range));
|
||||
log_css_error(iter.input, range.start, &*message);
|
||||
log_css_error(iter.input, pos, &*message);
|
||||
}
|
||||
Ok(FontFaceDescriptorDeclaration::Family(value)) => {
|
||||
family = Some(value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue