Kill gecko_only from vector_longhand

This commit is contained in:
Anthony Ramine 2017-07-04 14:41:44 +02:00
parent 42e551f606
commit 6c7c00f4c8

View file

@ -69,20 +69,16 @@
// FIXME (Manishearth): Add computed_value_as_specified argument // FIXME (Manishearth): Add computed_value_as_specified argument
// and handle the empty case correctly // and handle the empty case correctly
<%doc> <%doc>
To be used in cases where we have a grammar like To be used in cases where we have a grammar like "<thing> [ , <thing> ]*".
"<thing> [ , <thing> ]*". `gecko_only` should be set
to True for cases where Servo takes a single value
and Stylo supports vector values.
Setting allow_empty to False allows for cases where the vector Setting allow_empty to False allows for cases where the vector
is empty. The grammar for these is usually "none | <thing> [ , <thing> ]*". is empty. The grammar for these is usually "none | <thing> [ , <thing> ]*".
We assume that the default/initial value is an empty vector for these. We assume that the default/initial value is an empty vector for these.
`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, allow_empty=False,
delegate_animate=False, separator='Comma', **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:
#[allow(unused_imports)] #[allow(unused_imports)]
use smallvec::SmallVec; use smallvec::SmallVec;
use std::fmt; use std::fmt;
@ -268,9 +264,6 @@
.collect()) .collect())
} }
} }
% else:
${caller.body()}
% endif
</%call> </%call>
</%def> </%def>
<%def name="longhand(*args, **kwargs)"> <%def name="longhand(*args, **kwargs)">