Upgrade cssparser to a version with the new ToCss trait.

This commit is contained in:
Simon Sapin 2014-12-21 00:02:34 +00:00
parent 366ea4fe79
commit 4a9d5b1130
5 changed files with 25 additions and 7 deletions

View file

@ -124,9 +124,10 @@ dependencies = [
[[package]]
name = "cssparser"
version = "0.1.0"
source = "git+https://github.com/servo/rust-cssparser#97d8c3b20a240881573748d4eadcda610bfb888c"
source = "git+https://github.com/servo/rust-cssparser#a2b0b6b00ad84dc3a4b4faf77ddd63611c8ce58a"
dependencies = [
"encoding 0.2.3 (git+https://github.com/lifthrasiir/rust-encoding)",
"text_writer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -681,6 +682,11 @@ dependencies = [
name = "task_info"
version = "0.0.1"
[[package]]
name = "text_writer"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "time"
version = "0.1.0"

View file

@ -2547,13 +2547,13 @@ pub fn parse_property_declaration_list<I: Iterator<Node>>(input: I, base_url: &U
};
match PropertyDeclaration::parse(n.as_slice(), v.as_slice(), list, base_url, seen) {
PropertyDeclarationParseResult::UnknownProperty => log_css_error(l, format!(
"Unsupported property: {}:{}", n, v.iter().to_css()).as_slice()),
"Unsupported property: {}:{}", n, v.to_css_string()).as_slice()),
PropertyDeclarationParseResult::ExperimentalProperty => log_css_error(l, format!(
"Experimental property, use `servo --enable_experimental` \
or `servo -e` to enable: {}:{}",
n, v.iter().to_css()).as_slice()),
n, v.to_css_string()).as_slice()),
PropertyDeclarationParseResult::InvalidValue => log_css_error(l, format!(
"Invalid value: {}:{}", n, v.iter().to_css()).as_slice()),
"Invalid value: {}:{}", n, v.to_css_string()).as_slice()),
PropertyDeclarationParseResult::ValidOrIgnoredDeclaration => (),
}
}

View file

@ -168,7 +168,7 @@ pub fn parse_style_rule(context: &ParserContext,
block
} = rule;
// FIXME: avoid doing this for valid selectors
let serialized = prelude.iter().to_css();
let serialized = prelude.to_css_string();
match selectors::parse_selector_list(context, prelude.into_iter(), namespaces) {
Ok(selectors) => parent_rules.push(CSSRule::Style(StyleRule{
selectors: selectors,

8
ports/cef/Cargo.lock generated
View file

@ -120,9 +120,10 @@ dependencies = [
[[package]]
name = "cssparser"
version = "0.1.0"
source = "git+https://github.com/servo/rust-cssparser#97d8c3b20a240881573748d4eadcda610bfb888c"
source = "git+https://github.com/servo/rust-cssparser#a2b0b6b00ad84dc3a4b4faf77ddd63611c8ce58a"
dependencies = [
"encoding 0.2.3 (git+https://github.com/lifthrasiir/rust-encoding)",
"text_writer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -665,6 +666,11 @@ dependencies = [
name = "task_info"
version = "0.0.1"
[[package]]
name = "text_writer"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "time"
version = "0.1.0"

8
ports/gonk/Cargo.lock generated
View file

@ -103,9 +103,10 @@ dependencies = [
[[package]]
name = "cssparser"
version = "0.1.0"
source = "git+https://github.com/servo/rust-cssparser#97d8c3b20a240881573748d4eadcda610bfb888c"
source = "git+https://github.com/servo/rust-cssparser#a2b0b6b00ad84dc3a4b4faf77ddd63611c8ce58a"
dependencies = [
"encoding 0.2.3 (git+https://github.com/lifthrasiir/rust-encoding)",
"text_writer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -613,6 +614,11 @@ dependencies = [
name = "task_info"
version = "0.0.1"
[[package]]
name = "text_writer"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "time"
version = "0.1.0"