mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
auto merge of #4535 : servo/servo/pre-rustup_20141221, r=jdm
This prepares for the rust upgrade currently being conducted.
This commit is contained in:
commit
e8fac3681b
35 changed files with 63 additions and 66 deletions
|
@ -28,5 +28,5 @@ impl<T, I: Iterator<Result<T, SyntaxError>>> Iterator<T> for ErrorLoggerIterator
|
|||
/// to log CSS parse errors to stderr.
|
||||
pub fn log_css_error(location: SourceLocation, message: &str) {
|
||||
// TODO eventually this will got into a "web console" or something.
|
||||
info!("{:u}:{:u} {:s}", location.line, location.column, message)
|
||||
info!("{}:{} {}", location.line, location.column, message)
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ pub fn parse_font_face_rule(rule: AtRule, parent_rules: &mut Vec<CSSRule>, base_
|
|||
for item in ErrorLoggerIterator(parse_declaration_list(block.into_iter())) {
|
||||
match item {
|
||||
DeclarationListItem::AtRule(rule) => log_css_error(
|
||||
rule.location, format!("Unsupported at-rule in declaration list: @{:s}", rule.name).as_slice()),
|
||||
rule.location, format!("Unsupported at-rule in declaration list: @{}", rule.name).as_slice()),
|
||||
DeclarationListItem::Declaration(Declaration{ location, name, value, important }) => {
|
||||
if important {
|
||||
log_css_error(location, "!important is not allowed on @font-face descriptors");
|
||||
|
@ -94,7 +94,7 @@ pub fn parse_font_face_rule(rule: AtRule, parent_rules: &mut Vec<CSSRule>, base_
|
|||
};
|
||||
},
|
||||
_ => {
|
||||
log_css_error(location, format!("Unsupported declaration {:s}", name).as_slice());
|
||||
log_css_error(location, format!("Unsupported declaration {}", name).as_slice());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -787,11 +787,9 @@ pub mod longhands {
|
|||
|
||||
<%self:single_component_value name="list-style-image">
|
||||
pub use super::computed_as_specified as to_computed_value;
|
||||
#[deriving(Clone)]
|
||||
pub type SpecifiedValue = Option<Url>;
|
||||
pub mod computed_value {
|
||||
use url::Url;
|
||||
#[deriving(Clone, PartialEq)]
|
||||
pub type T = Option<Url>;
|
||||
}
|
||||
pub fn from_component_value(input: &ComponentValue, base_url: &Url)
|
||||
|
@ -823,7 +821,6 @@ pub mod longhands {
|
|||
use super::super::super::common_types::computed;
|
||||
pub type T = Option<computed::Image>;
|
||||
}
|
||||
#[deriving(Clone)]
|
||||
pub type SpecifiedValue = common_specified::CSSImage;
|
||||
#[inline]
|
||||
pub fn get_initial_value() -> computed_value::T {
|
||||
|
@ -2420,7 +2417,7 @@ pub fn parse_property_declaration_list<I: Iterator<Node>>(input: I, base_url: &U
|
|||
for item in items.into_iter().rev() {
|
||||
match item {
|
||||
DeclarationListItem::AtRule(rule) => log_css_error(
|
||||
rule.location, format!("Unsupported at-rule in declaration list: @{:s}", rule.name).as_slice()),
|
||||
rule.location, format!("Unsupported at-rule in declaration list: @{}", rule.name).as_slice()),
|
||||
DeclarationListItem::Declaration(Declaration{ location: l, name: n, value: v, important: i}) => {
|
||||
// TODO: only keep the last valid declaration for a given name.
|
||||
let (list, seen) = if i {
|
||||
|
|
|
@ -153,7 +153,7 @@ pub fn parse_nested_at_rule(context: &ParserContext,
|
|||
}
|
||||
"font-face" => parse_font_face_rule(rule, parent_rules, base_url),
|
||||
_ => log_css_error(rule.location,
|
||||
format!("Unsupported at-rule: @{:s}", lower_name).as_slice())
|
||||
format!("Unsupported at-rule: @{}", lower_name).as_slice())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue