Commit 912d5a5c authored by Benjamin Otte's avatar Benjamin Otte

cssvalue: Make the array parser no longer parse "none"

Arrays that support it, handle it themselves.
parent 44ba5d25
......@@ -157,16 +157,11 @@ _gtk_css_array_value_new_from_array (GtkCssValue **values,
GtkCssValue *
_gtk_css_array_value_parse (GtkCssParser *parser,
GtkCssValue *(* parse_func) (GtkCssParser *parser),
gboolean allow_none)
GtkCssValue *(* parse_func) (GtkCssParser *parser))
{
GtkCssValue *value, *result;
GPtrArray *values;
if (allow_none &&
_gtk_css_parser_try (parser, "none", TRUE))
return _gtk_css_value_ref (&none_singleton);
values = g_ptr_array_new ();
do {
......
......@@ -30,8 +30,7 @@ GtkCssValue * _gtk_css_array_value_new (GtkCssValue *
GtkCssValue * _gtk_css_array_value_new_from_array (GtkCssValue **values,
guint n_values);
GtkCssValue * _gtk_css_array_value_parse (GtkCssParser *parser,
GtkCssValue * (* parse_func) (GtkCssParser *),
gboolean allow_none);
GtkCssValue * (* parse_func) (GtkCssParser *));
GtkCssValue * _gtk_css_array_value_get_nth (const GtkCssValue *value,
guint i);
......
......@@ -222,7 +222,7 @@ static GtkCssValue *
font_family_parse (GtkCssStyleProperty *property,
GtkCssParser *parser)
{
return _gtk_css_array_value_parse (parser, font_family_parse_one, FALSE);
return _gtk_css_array_value_parse (parser, font_family_parse_one);
}
static void
......@@ -394,7 +394,7 @@ static GtkCssValue *
parse_css_area (GtkCssStyleProperty *property,
GtkCssParser *parser)
{
return _gtk_css_array_value_parse (parser, parse_css_area_one, FALSE);
return _gtk_css_array_value_parse (parser, parse_css_area_one);
}
static GtkCssValue *
......@@ -427,7 +427,7 @@ static GtkCssValue *
bindings_value_parse (GtkCssStyleProperty *property,
GtkCssParser *parser)
{
return _gtk_css_array_value_parse (parser, bindings_value_parse_one, FALSE);
return _gtk_css_array_value_parse (parser, bindings_value_parse_one);
}
static void
......@@ -569,7 +569,7 @@ static GtkCssValue *
background_image_value_parse (GtkCssStyleProperty *property,
GtkCssParser *parser)
{
return _gtk_css_array_value_parse (parser, background_image_value_parse_one, FALSE);
return _gtk_css_array_value_parse (parser, background_image_value_parse_one);
}
static void
......@@ -671,7 +671,7 @@ static GtkCssValue *
transition_property_parse (GtkCssStyleProperty *property,
GtkCssParser *parser)
{
return _gtk_css_array_value_parse (parser, transition_property_parse_one, FALSE);
return _gtk_css_array_value_parse (parser, transition_property_parse_one);
}
static GtkCssValue *
......@@ -684,14 +684,14 @@ static GtkCssValue *
transition_time_parse (GtkCssStyleProperty *property,
GtkCssParser *parser)
{
return _gtk_css_array_value_parse (parser, transition_time_parse_one, FALSE);
return _gtk_css_array_value_parse (parser, transition_time_parse_one);
}
static GtkCssValue *
transition_timing_function_parse (GtkCssStyleProperty *property,
GtkCssParser *parser)
{
return _gtk_css_array_value_parse (parser, _gtk_css_ease_value_parse, FALSE);
return _gtk_css_array_value_parse (parser, _gtk_css_ease_value_parse);
}
static GtkCssValue *
......@@ -764,21 +764,21 @@ static GtkCssValue *
background_repeat_value_parse (GtkCssStyleProperty *property,
GtkCssParser *parser)
{
return _gtk_css_array_value_parse (parser, background_repeat_value_parse_one, FALSE);
return _gtk_css_array_value_parse (parser, background_repeat_value_parse_one);
}
static GtkCssValue *
background_size_parse (GtkCssStyleProperty *property,
GtkCssParser *parser)
{
return _gtk_css_array_value_parse (parser, _gtk_css_bg_size_value_parse, FALSE);
return _gtk_css_array_value_parse (parser, _gtk_css_bg_size_value_parse);
}
static GtkCssValue *
background_position_parse (GtkCssStyleProperty *property,
GtkCssParser *parser)
{
return _gtk_css_array_value_parse (parser, _gtk_css_position_value_parse, FALSE);
return _gtk_css_array_value_parse (parser, _gtk_css_position_value_parse);
}
/*** REGISTRATION ***/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment