Change space_separated_allowed into separator

This commit is contained in:
Anthony Ramine 2017-06-27 11:16:24 +02:00
parent c03f5f19ab
commit da9d2001db
2 changed files with 3 additions and 9 deletions

View file

@ -80,7 +80,7 @@
`initial_value` need not be defined for these.
</%doc>
<%def name="vector_longhand(name, gecko_only=False, allow_empty=False,
delegate_animate=False, space_separated_allowed=False, **kwargs)">
delegate_animate=False, separator='Comma', **kwargs)">
<%call expr="longhand(name, vector=True, **kwargs)">
% if not gecko_only:
use smallvec::SmallVec;
@ -218,12 +218,6 @@
pub fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
-> Result<SpecifiedValue, ParseError<'i>> {
use style_traits::Separator;
#[allow(unused_imports)]
use style_traits::{Comma, CommaWithSpace};
<%
separator = "CommaWithSpace" if space_separated_allowed else "Comma"
%>
% if allow_empty:
if input.try(|input| input.expect_ident_matching("none")).is_ok() {
@ -231,7 +225,7 @@
}
% endif
${separator}::parse(input, |parser| {
::style_traits::${separator}::parse(input, |parser| {
single_value::parse(context, parser)
}).map(SpecifiedValue)
}

View file

@ -97,7 +97,7 @@ ${helpers.predefined_type(
delegate_animate=True,
products="gecko",
animation_value_type="ComputedValue",
space_separated_allowed="True",
separator="CommaWithSpace",
spec="https://www.w3.org/TR/SVG2/painting.html#StrokeDashing",
)}