[gtk+] cssvalue: Make the array parser no longer parse "none"
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] cssvalue: Make the array parser no longer parse "none"
- Date: Mon, 3 Sep 2012 10:59:39 +0000 (UTC)
commit 912d5a5c237683880144290333cef887b2591806
Author: Benjamin Otte <otte redhat com>
Date: Wed Aug 29 12:30:33 2012 +0200
cssvalue: Make the array parser no longer parse "none"
Arrays that support it, handle it themselves.
gtk/gtkcssarrayvalue.c | 7 +------
gtk/gtkcssarrayvalueprivate.h | 3 +--
gtk/gtkcssstylepropertyimpl.c | 20 ++++++++++----------
3 files changed, 12 insertions(+), 18 deletions(-)
---
diff --git a/gtk/gtkcssarrayvalue.c b/gtk/gtkcssarrayvalue.c
index 69f81bf..6c3cb4e 100644
--- a/gtk/gtkcssarrayvalue.c
+++ b/gtk/gtkcssarrayvalue.c
@@ -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 {
diff --git a/gtk/gtkcssarrayvalueprivate.h b/gtk/gtkcssarrayvalueprivate.h
index 3c0277c..23fb5c4 100644
--- a/gtk/gtkcssarrayvalueprivate.h
+++ b/gtk/gtkcssarrayvalueprivate.h
@@ -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);
diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c
index 3e3ee76..a7c0af3 100644
--- a/gtk/gtkcssstylepropertyimpl.c
+++ b/gtk/gtkcssstylepropertyimpl.c
@@ -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 ***/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]