[gtk+/wip/cssvalue: 59/165] cssstyelproperty: Rempove specified-type and computed-type props



commit c1626837ec413f15f45c1bcdbedcd4f527a61a39
Author: Benjamin Otte <otte redhat com>
Date:   Tue Mar 27 17:25:41 2012 +0200

    cssstyelproperty: Rempove specified-type and computed-type props
    
    This removes the necessity to keep a GType associated with style
    properties and code can now make use of GtkCssValue completely.

 gtk/gtkcsscustomproperty.c       |    2 -
 gtk/gtkcssstyleproperty.c        |   65 -----------------------
 gtk/gtkcssstylepropertyimpl.c    |  105 --------------------------------------
 gtk/gtkcssstylepropertyprivate.h |    3 -
 gtk/gtkstyleproperties.c         |    2 -
 5 files changed, 0 insertions(+), 177 deletions(-)
---
diff --git a/gtk/gtkcsscustomproperty.c b/gtk/gtkcsscustomproperty.c
index f58e8d6..7785895 100644
--- a/gtk/gtkcsscustomproperty.c
+++ b/gtk/gtkcsscustomproperty.c
@@ -216,7 +216,6 @@ gtk_theming_engine_register_property (const gchar            *name_space,
   node = g_object_new (GTK_TYPE_CSS_CUSTOM_PROPERTY,
                        "initial-value", initial,
                        "name", name,
-                       "computed-type", pspec->value_type,
                        "value-type", pspec->value_type,
                        NULL);
   node->pspec = pspec;
@@ -259,7 +258,6 @@ gtk_style_properties_register_property (GtkStylePropertyParser  parse_func,
   node = g_object_new (GTK_TYPE_CSS_CUSTOM_PROPERTY,
                        "initial-value", initial,
                        "name", pspec->name,
-                       "computed-type", pspec->value_type,
                        "value-type", pspec->value_type,
                        NULL);
   node->pspec = pspec;
diff --git a/gtk/gtkcssstyleproperty.c b/gtk/gtkcssstyleproperty.c
index df8dc09..6921b08 100644
--- a/gtk/gtkcssstyleproperty.c
+++ b/gtk/gtkcssstyleproperty.c
@@ -42,8 +42,6 @@
 enum {
   PROP_0,
   PROP_ID,
-  PROP_SPECIFIED_TYPE,
-  PROP_COMPUTED_TYPE,
   PROP_INHERIT,
   PROP_INITIAL
 };
@@ -79,10 +77,6 @@ gtk_css_style_property_set_property (GObject      *object,
       property->initial_value = g_value_dup_boxed (value);
       g_assert (property->initial_value != NULL);
       break;
-    case PROP_COMPUTED_TYPE:
-      property->computed_type = g_value_get_gtype (value);
-      g_assert (property->computed_type != G_TYPE_NONE);
-      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -99,12 +93,6 @@ gtk_css_style_property_get_property (GObject    *object,
 
   switch (prop_id)
     {
-    case PROP_SPECIFIED_TYPE:
-      g_value_set_gtype (value, G_VALUE_TYPE (&property->initial_value));
-      break;
-    case PROP_COMPUTED_TYPE:
-      g_value_set_gtype (value, property->computed_type);
-      break;
     case PROP_ID:
       g_value_set_boolean (value, property->id);
       break;
@@ -234,20 +222,6 @@ _gtk_css_style_property_class_init (GtkCssStylePropertyClass *klass)
                                                       0, G_MAXUINT, 0,
                                                       G_PARAM_READABLE));
   g_object_class_install_property (object_class,
-                                   PROP_SPECIFIED_TYPE,
-                                   g_param_spec_gtype ("specified-type",
-                                                       P_("Specified type"),
-                                                       P_("The type of values after parsing"),
-                                                       G_TYPE_NONE,
-                                                       G_PARAM_READABLE));
-  g_object_class_install_property (object_class,
-                                   PROP_COMPUTED_TYPE,
-                                   g_param_spec_gtype ("computed-type",
-                                                       P_("Computed type"),
-                                                       P_("The type of values after style lookup"),
-                                                       G_TYPE_NONE,
-                                                       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-  g_object_class_install_property (object_class,
                                    PROP_INHERIT,
                                    g_param_spec_boolean ("inherit",
                                                          P_("Inherit"),
@@ -416,45 +390,6 @@ _gtk_css_style_property_get_initial_value (GtkCssStyleProperty *property)
 }
 
 /**
- * _gtk_css_style_property_get_computed_type:
- * @property: the property to query
- *
- * Gets the #GType used for values for this property after a CSS lookup has
- * happened. _gtk_css_style_property_compute_value() will convert values to
- * this type.
- *
- * Returns: the #GType used for computed values.
- **/
-GType
-_gtk_css_style_property_get_computed_type (GtkCssStyleProperty *property)
-{
-  g_return_val_if_fail (GTK_IS_CSS_STYLE_PROPERTY (property), G_TYPE_NONE);
-
-  return property->computed_type;
-}
-
-/**
- * _gtk_css_style_property_get_specified_type:
- * @property: the property to query
- *
- * Gets the #GType used for values for this property after CSS parsing if
- * the value is not a special keyword. _gtk_css_style_property_compute_value()
- * will convert values of this type to the computed type.
- *
- * The initial value returned by _gtk_css_style_property_get_initial_value()
- * will be of this type.
- *
- * Returns: the #GType used for specified values.
- **/
-GType
-_gtk_css_style_property_get_specified_type (GtkCssStyleProperty *property)
-{
-  g_return_val_if_fail (GTK_IS_CSS_STYLE_PROPERTY (property), G_TYPE_NONE);
-
-  return _gtk_css_value_get_content_type (property->initial_value);
-}
-
-/**
  * _gtk_css_style_property_compute_value:
  * @property: the property
  * @computed: (out): an uninitialized value to be filled with the result
diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c
index 66d40d5..20a020a 100644
--- a/gtk/gtkcssstylepropertyimpl.c
+++ b/gtk/gtkcssstylepropertyimpl.c
@@ -52,8 +52,6 @@
 
 static void
 gtk_css_style_property_register (const char *                   name,
-                                 GType                          specified_type,
-                                 GType                          computed_type,
                                  GType                          value_type,
                                  GtkStylePropertyFlags          flags,
                                  GtkCssStylePropertyParseFunc   parse_value,
@@ -69,7 +67,6 @@ gtk_css_style_property_register (const char *                   name,
 
   node = g_object_new (GTK_TYPE_CSS_STYLE_PROPERTY,
                        "value-type", value_type,
-                       "computed-type", computed_type,
                        "inherit", (flags & GTK_STYLE_PROPERTY_INHERIT) ? TRUE : FALSE,
                        "initial-value", initial_value,
                        "name", name,
@@ -1227,8 +1224,6 @@ _gtk_css_style_property_init_properties (void)
    * done first. That way, 'currentColor' and font
    * sizes in em can be looked up properly */
   gtk_css_style_property_register        ("color",
-                                          GTK_TYPE_SYMBOLIC_COLOR,
-                                          GDK_TYPE_RGBA,
                                           GDK_TYPE_RGBA,
                                           GTK_STYLE_PROPERTY_INHERIT,
                                           color_parse,
@@ -1239,8 +1234,6 @@ _gtk_css_style_property_init_properties (void)
                                             gtk_symbolic_color_new_rgba (1, 1, 1, 1)));
   gtk_css_style_property_register        ("font-size",
                                           G_TYPE_DOUBLE,
-                                          G_TYPE_DOUBLE,
-                                          G_TYPE_DOUBLE,
                                           GTK_STYLE_PROPERTY_INHERIT,
                                           font_size_parse,
                                           NULL,
@@ -1251,8 +1244,6 @@ _gtk_css_style_property_init_properties (void)
   /* properties that aren't referenced when computing values
    * start here */
   gtk_css_style_property_register        ("background-color",
-                                          GTK_TYPE_SYMBOLIC_COLOR,
-                                          GDK_TYPE_RGBA,
                                           GDK_TYPE_RGBA,
                                           0,
                                           color_parse,
@@ -1264,8 +1255,6 @@ _gtk_css_style_property_init_properties (void)
 
   gtk_css_style_property_register        ("font-family",
                                           G_TYPE_STRV,
-                                          G_TYPE_STRV,
-                                          G_TYPE_STRV,
                                           GTK_STYLE_PROPERTY_INHERIT,
                                           font_family_parse,
                                           font_family_value_print,
@@ -1274,8 +1263,6 @@ _gtk_css_style_property_init_properties (void)
                                           _gtk_css_value_new_take_strv (g_strdupv (default_font_family)));
   gtk_css_style_property_register        ("font-style",
                                           PANGO_TYPE_STYLE,
-                                          PANGO_TYPE_STYLE,
-                                          PANGO_TYPE_STYLE,
                                           GTK_STYLE_PROPERTY_INHERIT,
                                           parse_pango_style,
                                           NULL,
@@ -1285,8 +1272,6 @@ _gtk_css_style_property_init_properties (void)
                                                                         PANGO_STYLE_NORMAL));
   gtk_css_style_property_register        ("font-variant",
                                           PANGO_TYPE_VARIANT,
-                                          PANGO_TYPE_VARIANT,
-                                          PANGO_TYPE_VARIANT,
                                           GTK_STYLE_PROPERTY_INHERIT,
                                           parse_pango_variant,
                                           NULL,
@@ -1297,8 +1282,6 @@ _gtk_css_style_property_init_properties (void)
   /* xxx: need to parse this properly, ie parse the numbers */
   gtk_css_style_property_register        ("font-weight",
                                           PANGO_TYPE_WEIGHT,
-                                          PANGO_TYPE_WEIGHT,
-                                          PANGO_TYPE_WEIGHT,
                                           GTK_STYLE_PROPERTY_INHERIT,
                                           parse_pango_weight,
                                           NULL,
@@ -1309,8 +1292,6 @@ _gtk_css_style_property_init_properties (void)
 
   gtk_css_style_property_register        ("text-shadow",
                                           GTK_TYPE_SHADOW,
-                                          GTK_TYPE_SHADOW,
-                                          GTK_TYPE_SHADOW,
                                           GTK_STYLE_PROPERTY_INHERIT,
                                           shadow_value_parse,
                                           shadow_value_print,
@@ -1320,8 +1301,6 @@ _gtk_css_style_property_init_properties (void)
 
   gtk_css_style_property_register        ("icon-shadow",
                                           GTK_TYPE_SHADOW,
-                                          GTK_TYPE_SHADOW,
-                                          GTK_TYPE_SHADOW,
                                           GTK_STYLE_PROPERTY_INHERIT,
                                           shadow_value_parse,
                                           shadow_value_print,
@@ -1331,8 +1310,6 @@ _gtk_css_style_property_init_properties (void)
 
   gtk_css_style_property_register        ("box-shadow",
                                           GTK_TYPE_SHADOW,
-                                          GTK_TYPE_SHADOW,
-                                          GTK_TYPE_SHADOW,
                                           0,
                                           shadow_value_parse,
                                           shadow_value_print,
@@ -1342,8 +1319,6 @@ _gtk_css_style_property_init_properties (void)
 
   _gtk_css_number_init (&number, 0, GTK_CSS_PX);
   gtk_css_style_property_register        ("margin-top",
-                                          GTK_TYPE_CSS_NUMBER,
-                                          GTK_TYPE_CSS_NUMBER,
                                           G_TYPE_INT,
                                           0,
                                           parse_margin,
@@ -1352,8 +1327,6 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_value_new_from_number (&number));
   gtk_css_style_property_register        ("margin-left",
-                                          GTK_TYPE_CSS_NUMBER,
-                                          GTK_TYPE_CSS_NUMBER,
                                           G_TYPE_INT,
                                           0,
                                           parse_margin,
@@ -1362,8 +1335,6 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_value_new_from_number (&number));
   gtk_css_style_property_register        ("margin-bottom",
-                                          GTK_TYPE_CSS_NUMBER,
-                                          GTK_TYPE_CSS_NUMBER,
                                           G_TYPE_INT,
                                           0,
                                           parse_margin,
@@ -1372,8 +1343,6 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_value_new_from_number (&number));
   gtk_css_style_property_register        ("margin-right",
-                                          GTK_TYPE_CSS_NUMBER,
-                                          GTK_TYPE_CSS_NUMBER,
                                           G_TYPE_INT,
                                           0,
                                           parse_margin,
@@ -1382,8 +1351,6 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_value_new_from_number (&number));
   gtk_css_style_property_register        ("padding-top",
-                                          GTK_TYPE_CSS_NUMBER,
-                                          GTK_TYPE_CSS_NUMBER,
                                           G_TYPE_INT,
                                           0,
                                           parse_padding,
@@ -1392,8 +1359,6 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_value_new_from_number (&number));
   gtk_css_style_property_register        ("padding-left",
-                                          GTK_TYPE_CSS_NUMBER,
-                                          GTK_TYPE_CSS_NUMBER,
                                           G_TYPE_INT,
                                           0,
                                           parse_padding,
@@ -1402,8 +1367,6 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_value_new_from_number (&number));
   gtk_css_style_property_register        ("padding-bottom",
-                                          GTK_TYPE_CSS_NUMBER,
-                                          GTK_TYPE_CSS_NUMBER,
                                           G_TYPE_INT,
                                           0,
                                           parse_padding,
@@ -1412,8 +1375,6 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_value_new_from_number (&number));
   gtk_css_style_property_register        ("padding-right",
-                                          GTK_TYPE_CSS_NUMBER,
-                                          GTK_TYPE_CSS_NUMBER,
                                           G_TYPE_INT,
                                           0,
                                           parse_padding,
@@ -1426,8 +1387,6 @@ _gtk_css_style_property_init_properties (void)
    */
   gtk_css_style_property_register        ("border-top-style",
                                           GTK_TYPE_BORDER_STYLE,
-                                          GTK_TYPE_BORDER_STYLE,
-                                          GTK_TYPE_BORDER_STYLE,
                                           0,
                                           parse_border_style,
                                           NULL,
@@ -1435,8 +1394,6 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_value_new_from_border_style (GTK_BORDER_STYLE_NONE));
   gtk_css_style_property_register        ("border-top-width",
-                                          GTK_TYPE_CSS_NUMBER,
-                                          G_TYPE_INT,
                                           G_TYPE_INT,
                                           0,
                                           parse_border_width,
@@ -1446,8 +1403,6 @@ _gtk_css_style_property_init_properties (void)
                                           _gtk_css_value_new_from_number (&number));
   gtk_css_style_property_register        ("border-left-style",
                                           GTK_TYPE_BORDER_STYLE,
-                                          GTK_TYPE_BORDER_STYLE,
-                                          GTK_TYPE_BORDER_STYLE,
                                           0,
                                           parse_border_style,
                                           NULL,
@@ -1455,8 +1410,6 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_value_new_from_border_style (GTK_BORDER_STYLE_NONE));
   gtk_css_style_property_register        ("border-left-width",
-                                          GTK_TYPE_CSS_NUMBER,
-                                          G_TYPE_INT,
                                           G_TYPE_INT,
                                           0,
                                           parse_border_width,
@@ -1466,8 +1419,6 @@ _gtk_css_style_property_init_properties (void)
                                           _gtk_css_value_new_from_number (&number));
   gtk_css_style_property_register        ("border-bottom-style",
                                           GTK_TYPE_BORDER_STYLE,
-                                          GTK_TYPE_BORDER_STYLE,
-                                          GTK_TYPE_BORDER_STYLE,
                                           0,
                                           parse_border_style,
                                           NULL,
@@ -1475,8 +1426,6 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_value_new_from_border_style (GTK_BORDER_STYLE_NONE));
   gtk_css_style_property_register        ("border-bottom-width",
-                                          GTK_TYPE_CSS_NUMBER,
-                                          G_TYPE_INT,
                                           G_TYPE_INT,
                                           0,
                                           parse_border_width,
@@ -1486,8 +1435,6 @@ _gtk_css_style_property_init_properties (void)
                                           _gtk_css_value_new_from_number (&number));
   gtk_css_style_property_register        ("border-right-style",
                                           GTK_TYPE_BORDER_STYLE,
-                                          GTK_TYPE_BORDER_STYLE,
-                                          GTK_TYPE_BORDER_STYLE,
                                           0,
                                           parse_border_style,
                                           NULL,
@@ -1495,8 +1442,6 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_value_new_from_border_style (GTK_BORDER_STYLE_NONE));
   gtk_css_style_property_register        ("border-right-width",
-                                          GTK_TYPE_CSS_NUMBER,
-                                          G_TYPE_INT,
                                           G_TYPE_INT,
                                           0,
                                           parse_border_width,
@@ -1507,8 +1452,6 @@ _gtk_css_style_property_init_properties (void)
 
   gtk_css_style_property_register        ("border-top-left-radius",
                                           GTK_TYPE_CSS_BORDER_CORNER_RADIUS,
-                                          GTK_TYPE_CSS_BORDER_CORNER_RADIUS,
-                                          GTK_TYPE_CSS_BORDER_CORNER_RADIUS,
                                           0,
                                           border_corner_radius_value_parse,
                                           border_corner_radius_value_print,
@@ -1517,8 +1460,6 @@ _gtk_css_style_property_init_properties (void)
                                           _gtk_css_value_new_from_border_corner_radius (&no_corner_radius));
   gtk_css_style_property_register        ("border-top-right-radius",
                                           GTK_TYPE_CSS_BORDER_CORNER_RADIUS,
-                                          GTK_TYPE_CSS_BORDER_CORNER_RADIUS,
-                                          GTK_TYPE_CSS_BORDER_CORNER_RADIUS,
                                           0,
                                           border_corner_radius_value_parse,
                                           border_corner_radius_value_print,
@@ -1527,8 +1468,6 @@ _gtk_css_style_property_init_properties (void)
                                           _gtk_css_value_new_from_border_corner_radius (&no_corner_radius));
   gtk_css_style_property_register        ("border-bottom-right-radius",
                                           GTK_TYPE_CSS_BORDER_CORNER_RADIUS,
-                                          GTK_TYPE_CSS_BORDER_CORNER_RADIUS,
-                                          GTK_TYPE_CSS_BORDER_CORNER_RADIUS,
                                           0,
                                           border_corner_radius_value_parse,
                                           border_corner_radius_value_print,
@@ -1537,8 +1476,6 @@ _gtk_css_style_property_init_properties (void)
                                           _gtk_css_value_new_from_border_corner_radius (&no_corner_radius));
   gtk_css_style_property_register        ("border-bottom-left-radius",
                                           GTK_TYPE_CSS_BORDER_CORNER_RADIUS,
-                                          GTK_TYPE_CSS_BORDER_CORNER_RADIUS,
-                                          GTK_TYPE_CSS_BORDER_CORNER_RADIUS,
                                           0,
                                           border_corner_radius_value_parse,
                                           border_corner_radius_value_print,
@@ -1548,8 +1485,6 @@ _gtk_css_style_property_init_properties (void)
 
   gtk_css_style_property_register        ("outline-style",
                                           GTK_TYPE_BORDER_STYLE,
-                                          GTK_TYPE_BORDER_STYLE,
-                                          GTK_TYPE_BORDER_STYLE,
                                           0,
                                           parse_border_style,
                                           NULL,
@@ -1557,8 +1492,6 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_value_new_from_border_style (GTK_BORDER_STYLE_NONE));
   gtk_css_style_property_register        ("outline-width",
-                                          GTK_TYPE_CSS_NUMBER,
-                                          G_TYPE_INT,
                                           G_TYPE_INT,
                                           0,
                                           parse_border_width,
@@ -1568,8 +1501,6 @@ _gtk_css_style_property_init_properties (void)
                                           _gtk_css_value_new_from_number (&number));
   gtk_css_style_property_register        ("outline-offset",
                                           G_TYPE_INT,
-                                          G_TYPE_INT,
-                                          G_TYPE_INT,
                                           0,
                                           outline_parse,
                                           NULL,
@@ -1579,8 +1510,6 @@ _gtk_css_style_property_init_properties (void)
 
   gtk_css_style_property_register        ("background-clip",
                                           GTK_TYPE_CSS_AREA,
-                                          GTK_TYPE_CSS_AREA,
-                                          GTK_TYPE_CSS_AREA,
                                           0,
                                           parse_css_area,
                                           NULL,
@@ -1589,8 +1518,6 @@ _gtk_css_style_property_init_properties (void)
                                           _gtk_css_value_new_from_enum (GTK_TYPE_CSS_AREA, GTK_CSS_AREA_BORDER_BOX));
   gtk_css_style_property_register        ("background-origin",
                                           GTK_TYPE_CSS_AREA,
-                                          GTK_TYPE_CSS_AREA,
-                                          GTK_TYPE_CSS_AREA,
                                           0,
                                           parse_css_area,
                                           NULL,
@@ -1598,8 +1525,6 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_value_new_from_enum (GTK_TYPE_CSS_AREA, GTK_CSS_AREA_PADDING_BOX));
   gtk_css_style_property_register        ("background-size",
-                                          GTK_TYPE_CSS_BACKGROUND_SIZE,
-                                          GTK_TYPE_CSS_BACKGROUND_SIZE,
                                           G_TYPE_NONE,
                                           0,
                                           background_size_parse,
@@ -1608,8 +1533,6 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_value_new_from_background_size (&default_background_size));
   gtk_css_style_property_register        ("background-position",
-                                          GTK_TYPE_CSS_BACKGROUND_POSITION,
-                                          GTK_TYPE_CSS_BACKGROUND_POSITION,
                                           G_TYPE_NONE,
                                           0,
                                           background_position_parse,
@@ -1619,8 +1542,6 @@ _gtk_css_style_property_init_properties (void)
                                           _gtk_css_value_new_from_background_position (&default_background_position));
 
   gtk_css_style_property_register        ("border-top-color",
-                                          GTK_TYPE_SYMBOLIC_COLOR,
-                                          GDK_TYPE_RGBA,
                                           GDK_TYPE_RGBA,
                                           0,
                                           color_parse,
@@ -1631,8 +1552,6 @@ _gtk_css_style_property_init_properties (void)
                                             gtk_symbolic_color_ref (
                                               _gtk_symbolic_color_get_current_color ())));
   gtk_css_style_property_register        ("border-right-color",
-                                          GTK_TYPE_SYMBOLIC_COLOR,
-                                          GDK_TYPE_RGBA,
                                           GDK_TYPE_RGBA,
                                           0,
                                           color_parse,
@@ -1643,8 +1562,6 @@ _gtk_css_style_property_init_properties (void)
                                             gtk_symbolic_color_ref (
                                               _gtk_symbolic_color_get_current_color ())));
   gtk_css_style_property_register        ("border-bottom-color",
-                                          GTK_TYPE_SYMBOLIC_COLOR,
-                                          GDK_TYPE_RGBA,
                                           GDK_TYPE_RGBA,
                                           0,
                                           color_parse,
@@ -1655,8 +1572,6 @@ _gtk_css_style_property_init_properties (void)
                                             gtk_symbolic_color_ref (
                                               _gtk_symbolic_color_get_current_color ())));
   gtk_css_style_property_register        ("border-left-color",
-                                          GTK_TYPE_SYMBOLIC_COLOR,
-                                          GDK_TYPE_RGBA,
                                           GDK_TYPE_RGBA,
                                           0,
                                           color_parse,
@@ -1667,8 +1582,6 @@ _gtk_css_style_property_init_properties (void)
                                             gtk_symbolic_color_ref (
                                               _gtk_symbolic_color_get_current_color ())));
   gtk_css_style_property_register        ("outline-color",
-                                          GTK_TYPE_SYMBOLIC_COLOR,
-                                          GDK_TYPE_RGBA,
                                           GDK_TYPE_RGBA,
                                           0,
                                           color_parse,
@@ -1681,8 +1594,6 @@ _gtk_css_style_property_init_properties (void)
 
   gtk_css_style_property_register        ("background-repeat",
                                           GTK_TYPE_CSS_BACKGROUND_REPEAT,
-                                          GTK_TYPE_CSS_BACKGROUND_REPEAT,
-                                          GTK_TYPE_CSS_BACKGROUND_REPEAT,
                                           0,
                                           background_repeat_value_parse,
                                           background_repeat_value_print,
@@ -1692,8 +1603,6 @@ _gtk_css_style_property_init_properties (void)
                                                                         GTK_CSS_BACKGROUND_REPEAT | 
                                                                         (GTK_CSS_BACKGROUND_REPEAT << GTK_CSS_BACKGROUND_REPEAT_SHIFT)));
   gtk_css_style_property_register        ("background-image",
-                                          GTK_TYPE_CSS_IMAGE,
-                                          GTK_TYPE_CSS_IMAGE,
                                           CAIRO_GOBJECT_TYPE_PATTERN,
                                           0,
                                           css_image_value_parse,
@@ -1703,8 +1612,6 @@ _gtk_css_style_property_init_properties (void)
                                           _gtk_css_value_new_take_image (NULL));
 
   gtk_css_style_property_register        ("border-image-source",
-                                          GTK_TYPE_CSS_IMAGE,
-                                          GTK_TYPE_CSS_IMAGE,
                                           CAIRO_GOBJECT_TYPE_PATTERN,
                                           0,
                                           css_image_value_parse,
@@ -1714,8 +1621,6 @@ _gtk_css_style_property_init_properties (void)
                                           _gtk_css_value_new_take_image (NULL));
   gtk_css_style_property_register        ("border-image-repeat",
                                           GTK_TYPE_CSS_BORDER_IMAGE_REPEAT,
-                                          GTK_TYPE_CSS_BORDER_IMAGE_REPEAT,
-                                          GTK_TYPE_CSS_BORDER_IMAGE_REPEAT,
                                           0,
                                           border_image_repeat_parse,
                                           NULL,
@@ -1726,8 +1631,6 @@ _gtk_css_style_property_init_properties (void)
   /* XXX: The initial value is wrong, it should be 100% */
   gtk_css_style_property_register        ("border-image-slice",
                                           GTK_TYPE_BORDER,
-                                          GTK_TYPE_BORDER,
-                                          GTK_TYPE_BORDER,
                                           0,
                                           border_image_slice_parse,
                                           NULL,
@@ -1736,8 +1639,6 @@ _gtk_css_style_property_init_properties (void)
                                           _gtk_css_value_new_from_boxed (GTK_TYPE_BORDER, &border_of_ones));
   gtk_css_style_property_register        ("border-image-width",
                                           GTK_TYPE_BORDER,
-                                          GTK_TYPE_BORDER,
-                                          GTK_TYPE_BORDER,
                                           0,
                                           border_image_width_parse,
                                           NULL,
@@ -1746,8 +1647,6 @@ _gtk_css_style_property_init_properties (void)
                                           _gtk_css_value_new_from_boxed (GTK_TYPE_BORDER, NULL));
   gtk_css_style_property_register        ("engine",
                                           GTK_TYPE_THEMING_ENGINE,
-                                          GTK_TYPE_THEMING_ENGINE,
-                                          GTK_TYPE_THEMING_ENGINE,
                                           0,
                                           engine_parse,
                                           NULL,
@@ -1756,8 +1655,6 @@ _gtk_css_style_property_init_properties (void)
                                           _gtk_css_value_new_from_theming_engine (gtk_theming_engine_load (NULL)));
   gtk_css_style_property_register        ("transition",
                                           GTK_TYPE_ANIMATION_DESCRIPTION,
-                                          GTK_TYPE_ANIMATION_DESCRIPTION,
-                                          GTK_TYPE_ANIMATION_DESCRIPTION,
                                           0,
                                           transition_parse,
                                           NULL,
@@ -1768,8 +1665,6 @@ _gtk_css_style_property_init_properties (void)
   /* Private property holding the binding sets */
   gtk_css_style_property_register        ("gtk-key-bindings",
                                           G_TYPE_PTR_ARRAY,
-                                          G_TYPE_PTR_ARRAY,
-                                          G_TYPE_PTR_ARRAY,
                                           0,
                                           bindings_value_parse,
                                           bindings_value_print,
diff --git a/gtk/gtkcssstylepropertyprivate.h b/gtk/gtkcssstylepropertyprivate.h
index 43b0576..beb21e9 100644
--- a/gtk/gtkcssstylepropertyprivate.h
+++ b/gtk/gtkcssstylepropertyprivate.h
@@ -50,7 +50,6 @@ struct _GtkCssStyleProperty
 {
   GtkStyleProperty parent;
 
-  GType computed_type;
   GtkCssValue *initial_value;
   guint id;
   guint inherit :1;
@@ -79,8 +78,6 @@ gboolean                _gtk_css_style_property_is_inherit      (GtkCssStyleProp
 guint                   _gtk_css_style_property_get_id          (GtkCssStyleProperty    *property);
 GtkCssValue  *          _gtk_css_style_property_get_initial_value
                                                                 (GtkCssStyleProperty    *property);
-GType                   _gtk_css_style_property_get_computed_type (GtkCssStyleProperty *property);
-GType                   _gtk_css_style_property_get_specified_type (GtkCssStyleProperty *property);
 
 GtkCssValue *           _gtk_css_style_property_compute_value   (GtkCssStyleProperty    *property,
                                                                  GtkStyleContext        *context,
diff --git a/gtk/gtkstyleproperties.c b/gtk/gtkstyleproperties.c
index 52187ef..61f358c 100644
--- a/gtk/gtkstyleproperties.c
+++ b/gtk/gtkstyleproperties.c
@@ -441,8 +441,6 @@ _gtk_style_properties_set_property_by_property (GtkStyleProperties  *props,
   PropertyData *prop;
   ValueData *val;
 
-  g_return_if_fail (_gtk_css_value_holds (value, _gtk_css_style_property_get_computed_type (style_prop)));
-
   priv = props->priv;
   prop = g_hash_table_lookup (priv->properties, style_prop);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]