Use a UrlExtraData type alias to unify url handling logic.

This commit is contained in:
Xidorn Quan 2017-04-03 21:17:13 +10:00
parent a097a293b5
commit 37585309e9
24 changed files with 166 additions and 272 deletions

View file

@ -71,7 +71,7 @@
pub mod single_value {
use cssparser::Parser;
use parser::{Parse, ParserContext, ParserContextExtraData};
use parser::{Parse, ParserContext};
use properties::ShorthandId;
use values::computed::{Context, ToComputedValue};
use values::{computed, specified};
@ -211,7 +211,7 @@
#![allow(unused_imports)]
% if not property.derived_from:
use cssparser::Parser;
use parser::{Parse, ParserContext, ParserContextExtraData};
use parser::{Parse, ParserContext};
use properties::{UnparsedValue, ShorthandId};
% endif
use values::{Auto, Either, None_, Normal};
@ -368,7 +368,7 @@
Arc::new(UnparsedValue {
css: css.into_owned(),
first_token_type: first_token_type,
base_url: context.base_url.clone(),
url_data: context.url_data.clone(),
from_shorthand: None,
})))
}
@ -594,7 +594,7 @@
Ok(ParsedDeclaration::${shorthand.camel_case}WithVariables(Arc::new(UnparsedValue {
css: css.into_owned(),
first_token_type: first_token_type,
base_url: context.base_url.clone(),
url_data: context.url_data.clone(),
from_shorthand: Some(ShorthandId::${shorthand.camel_case}),
})))
} else {