mirror of
https://github.com/servo/servo.git
synced 2025-06-24 00:54:32 +01:00
Change space_separated_allowed into separator
This commit is contained in:
parent
c03f5f19ab
commit
da9d2001db
2 changed files with 3 additions and 9 deletions
|
@ -80,7 +80,7 @@
|
||||||
`initial_value` need not be defined for these.
|
`initial_value` need not be defined for these.
|
||||||
</%doc>
|
</%doc>
|
||||||
<%def name="vector_longhand(name, gecko_only=False, allow_empty=False,
|
<%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)">
|
<%call expr="longhand(name, vector=True, **kwargs)">
|
||||||
% if not gecko_only:
|
% if not gecko_only:
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
|
@ -218,12 +218,6 @@
|
||||||
pub fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
|
pub fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
|
||||||
-> Result<SpecifiedValue, ParseError<'i>> {
|
-> Result<SpecifiedValue, ParseError<'i>> {
|
||||||
use style_traits::Separator;
|
use style_traits::Separator;
|
||||||
#[allow(unused_imports)]
|
|
||||||
use style_traits::{Comma, CommaWithSpace};
|
|
||||||
|
|
||||||
<%
|
|
||||||
separator = "CommaWithSpace" if space_separated_allowed else "Comma"
|
|
||||||
%>
|
|
||||||
|
|
||||||
% if allow_empty:
|
% if allow_empty:
|
||||||
if input.try(|input| input.expect_ident_matching("none")).is_ok() {
|
if input.try(|input| input.expect_ident_matching("none")).is_ok() {
|
||||||
|
@ -231,7 +225,7 @@
|
||||||
}
|
}
|
||||||
% endif
|
% endif
|
||||||
|
|
||||||
${separator}::parse(input, |parser| {
|
::style_traits::${separator}::parse(input, |parser| {
|
||||||
single_value::parse(context, parser)
|
single_value::parse(context, parser)
|
||||||
}).map(SpecifiedValue)
|
}).map(SpecifiedValue)
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ ${helpers.predefined_type(
|
||||||
delegate_animate=True,
|
delegate_animate=True,
|
||||||
products="gecko",
|
products="gecko",
|
||||||
animation_value_type="ComputedValue",
|
animation_value_type="ComputedValue",
|
||||||
space_separated_allowed="True",
|
separator="CommaWithSpace",
|
||||||
spec="https://www.w3.org/TR/SVG2/painting.html#StrokeDashing",
|
spec="https://www.w3.org/TR/SVG2/painting.html#StrokeDashing",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue