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

Custom properties, take 2 #7555

Merged
merged 10 commits into from Sep 17, 2015

Don’t ignore input at the end of a declaration with var().

  • Loading branch information
SimonSapin committed Sep 17, 2015
commit 70ea5f61a2fdecd89f869b7303c5262d2867795d
@@ -5615,24 +5615,25 @@ mod property_bit_field {
// As of this writing, only the base URL is used for property values:
let context = ParserContext::new(
::stylesheets::Origin::Author, base_url);
let mut input = Parser::new(&css);
match from_shorthand {
Shorthand::None => {
longhands::${property.ident}::parse_specified(&context, &mut input)
Parser::new(&css).parse_entirely(|input| {
match from_shorthand {
Shorthand::None => {
longhands::${property.ident}::parse_specified(&context, input)
}
% for shorthand in SHORTHANDS:
% if property in shorthand.sub_properties:
Shorthand::${shorthand.camel_case} => {
shorthands::${shorthand.ident}::parse_value(&context, input)
.map(|result| match result.${property.ident} {
Some(value) => DeclaredValue::Value(value),
None => DeclaredValue::Initial,
})
}
% endif
% endfor
_ => unreachable!()
}
% for shorthand in SHORTHANDS:
% if property in shorthand.sub_properties:
Shorthand::${shorthand.camel_case} => {
shorthands::${shorthand.ident}::parse_value(&context, &mut input)
.map(|result| match result.${property.ident} {
Some(value) => DeclaredValue::Value(value),
None => DeclaredValue::Initial,
})
}
% endif
% endfor
_ => unreachable!()
}
})
})
.unwrap_or(
// Invalid at computed-value time.

This file was deleted.

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