Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start using the ToCss trait, to be used for CSS serialization #4455

Merged
merged 8 commits into from Dec 29, 2014
Next

Upgrade cssparser to a version with the new ToCss trait.

  • Loading branch information
SimonSapin committed Dec 29, 2014
commit 4a9d5b1130e5f6201bd291324d4db2ca61c2774e

Some generated files are not rendered by default. Learn more.

@@ -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 => (),
}
}
@@ -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,

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.