Commit da25771e authored by Benjamin Otte's avatar Benjamin Otte

cssvalue: Remove GtkCssDependencies

They are not used anymore.
parent e95985da
...@@ -305,18 +305,16 @@ gtk_gradient_resolve (GtkGradient *gradient, ...@@ -305,18 +305,16 @@ gtk_gradient_resolve (GtkGradient *gradient,
cairo_pattern_t * cairo_pattern_t *
_gtk_gradient_resolve_full (GtkGradient *gradient, _gtk_gradient_resolve_full (GtkGradient *gradient,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *values, GtkCssStyle *style,
GtkCssStyle *parent_values, GtkCssStyle *parent_style)
GtkCssDependencies *dependencies)
{ {
cairo_pattern_t *pattern; cairo_pattern_t *pattern;
guint i; guint i;
g_return_val_if_fail (gradient != NULL, NULL); g_return_val_if_fail (gradient != NULL, NULL);
g_return_val_if_fail (GTK_IS_STYLE_PROVIDER (provider), NULL); g_return_val_if_fail (GTK_IS_STYLE_PROVIDER (provider), NULL);
g_return_val_if_fail (GTK_IS_CSS_STYLE (values), NULL); g_return_val_if_fail (GTK_IS_CSS_STYLE (style), NULL);
g_return_val_if_fail (parent_values == NULL || GTK_IS_CSS_STYLE (parent_values), NULL); g_return_val_if_fail (parent_style == NULL || GTK_IS_CSS_STYLE (parent_style), NULL);
g_return_val_if_fail (*dependencies == 0, NULL);
if (gradient->radius0 == 0 && gradient->radius1 == 0) if (gradient->radius0 == 0 && gradient->radius1 == 0)
pattern = cairo_pattern_create_linear (gradient->x0, gradient->y0, pattern = cairo_pattern_create_linear (gradient->x0, gradient->y0,
...@@ -332,21 +330,17 @@ _gtk_gradient_resolve_full (GtkGradient *gradient, ...@@ -332,21 +330,17 @@ _gtk_gradient_resolve_full (GtkGradient *gradient,
ColorStop *stop; ColorStop *stop;
GtkCssValue *val; GtkCssValue *val;
GdkRGBA rgba; GdkRGBA rgba;
GtkCssDependencies stop_deps;
stop = &g_array_index (gradient->stops, ColorStop, i); stop = &g_array_index (gradient->stops, ColorStop, i);
/* if color resolving fails, assume transparency */ /* if color resolving fails, assume transparency */
val = _gtk_css_color_value_resolve (_gtk_symbolic_color_get_css_value (stop->color), val = _gtk_css_color_value_resolve (_gtk_symbolic_color_get_css_value (stop->color),
provider, provider,
gtk_css_style_get_value (values, GTK_CSS_PROPERTY_COLOR), gtk_css_style_get_value (style, GTK_CSS_PROPERTY_COLOR),
GTK_CSS_DEPENDS_ON_COLOR,
&stop_deps,
NULL); NULL);
if (val) if (val)
{ {
rgba = *_gtk_css_rgba_value_get_rgba (val); rgba = *_gtk_css_rgba_value_get_rgba (val);
*dependencies = _gtk_css_dependencies_union (*dependencies, stop_deps);
_gtk_css_value_unref (val); _gtk_css_value_unref (val);
} }
else else
......
...@@ -25,9 +25,8 @@ G_BEGIN_DECLS ...@@ -25,9 +25,8 @@ G_BEGIN_DECLS
cairo_pattern_t * _gtk_gradient_resolve_full (GtkGradient *gradient, cairo_pattern_t * _gtk_gradient_resolve_full (GtkGradient *gradient,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *values, GtkCssStyle *style,
GtkCssStyle *parent_values, GtkCssStyle *parent_style);
GtkCssDependencies *dependencies);
GtkGradient * _gtk_gradient_transition (GtkGradient *start, GtkGradient * _gtk_gradient_transition (GtkGradient *start,
GtkGradient *end, GtkGradient *end,
......
...@@ -306,8 +306,6 @@ gtk_symbolic_color_resolve (GtkSymbolicColor *color, ...@@ -306,8 +306,6 @@ gtk_symbolic_color_resolve (GtkSymbolicColor *color,
v = _gtk_css_color_value_resolve (color->value, v = _gtk_css_color_value_resolve (color->value,
GTK_STYLE_PROVIDER_PRIVATE (props), GTK_STYLE_PROVIDER_PRIVATE (props),
current, current,
0,
NULL,
NULL); NULL);
_gtk_css_value_unref (current); _gtk_css_value_unref (current);
if (v == NULL) if (v == NULL)
......
...@@ -47,20 +47,16 @@ gtk_css_value_array_compute (GtkCssValue *value, ...@@ -47,20 +47,16 @@ gtk_css_value_array_compute (GtkCssValue *value,
guint property_id, guint property_id,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *style, GtkCssStyle *style,
GtkCssStyle *parent_style, GtkCssStyle *parent_style)
GtkCssDependencies *dependencies)
{ {
GtkCssValue *result; GtkCssValue *result;
GtkCssValue *i_value; GtkCssValue *i_value;
guint i, j; guint i, j;
GtkCssDependencies child_deps;
result = NULL; result = NULL;
for (i = 0; i < value->n_values; i++) for (i = 0; i < value->n_values; i++)
{ {
i_value = _gtk_css_value_compute (value->values[i], property_id, provider, style, parent_style, &child_deps); i_value = _gtk_css_value_compute (value->values[i], property_id, provider, style, parent_style);
*dependencies = _gtk_css_dependencies_union (*dependencies, child_deps);
if (result == NULL && if (result == NULL &&
i_value != value->values[i]) i_value != value->values[i])
......
...@@ -45,25 +45,20 @@ gtk_css_value_bg_size_compute (GtkCssValue *value, ...@@ -45,25 +45,20 @@ gtk_css_value_bg_size_compute (GtkCssValue *value,
guint property_id, guint property_id,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *style, GtkCssStyle *style,
GtkCssStyle *parent_style, GtkCssStyle *parent_style)
GtkCssDependencies *dependencies)
{ {
GtkCssValue *x, *y; GtkCssValue *x, *y;
GtkCssDependencies x_deps, y_deps;
if (value->x == NULL && value->y == NULL) if (value->x == NULL && value->y == NULL)
return _gtk_css_value_ref (value); return _gtk_css_value_ref (value);
x_deps = y_deps = 0;
x = y = NULL; x = y = NULL;
if (value->x) if (value->x)
x = _gtk_css_value_compute (value->x, property_id, provider, style, parent_style, &x_deps); x = _gtk_css_value_compute (value->x, property_id, provider, style, parent_style);
if (value->y) if (value->y)
y = _gtk_css_value_compute (value->y, property_id, provider, style, parent_style, &y_deps); y = _gtk_css_value_compute (value->y, property_id, provider, style, parent_style);
*dependencies = _gtk_css_dependencies_union (x_deps, y_deps);
return _gtk_css_bg_size_value_new (value->x ? x : NULL, return _gtk_css_bg_size_value_new (value->x ? x : NULL,
value->y ? y : NULL); value->y ? y : NULL);
......
...@@ -46,11 +46,9 @@ gtk_css_value_border_compute (GtkCssValue *value, ...@@ -46,11 +46,9 @@ gtk_css_value_border_compute (GtkCssValue *value,
guint property_id, guint property_id,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *style, GtkCssStyle *style,
GtkCssStyle *parent_style, GtkCssStyle *parent_style)
GtkCssDependencies *dependencies)
{ {
GtkCssValue *computed; GtkCssValue *computed;
GtkCssDependencies child_deps;
gboolean changed = FALSE; gboolean changed = FALSE;
guint i; guint i;
...@@ -61,8 +59,7 @@ gtk_css_value_border_compute (GtkCssValue *value, ...@@ -61,8 +59,7 @@ gtk_css_value_border_compute (GtkCssValue *value,
{ {
if (value->values[i]) if (value->values[i])
{ {
computed->values[i] = _gtk_css_value_compute (value->values[i], property_id, provider, style, parent_style, &child_deps); computed->values[i] = _gtk_css_value_compute (value->values[i], property_id, provider, style, parent_style);
*dependencies = _gtk_css_dependencies_union (*dependencies, child_deps);
changed |= (computed->values[i] != value->values[i]); changed |= (computed->values[i] != value->values[i]);
} }
} }
......
...@@ -124,8 +124,7 @@ gtk_css_value_color_get_fallback (guint property_id, ...@@ -124,8 +124,7 @@ gtk_css_value_color_get_fallback (guint property_id,
property_id, property_id,
provider, provider,
style, style,
parent_style, parent_style);
NULL);
default: default:
if (property_id < GTK_CSS_PROPERTY_N_PROPERTIES) if (property_id < GTK_CSS_PROPERTY_N_PROPERTIES)
g_warning ("No fallback color defined for property '%s'", g_warning ("No fallback color defined for property '%s'",
...@@ -138,20 +137,13 @@ GtkCssValue * ...@@ -138,20 +137,13 @@ GtkCssValue *
_gtk_css_color_value_resolve (GtkCssValue *color, _gtk_css_color_value_resolve (GtkCssValue *color,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssValue *current, GtkCssValue *current,
GtkCssDependencies current_deps,
GtkCssDependencies *dependencies,
GSList *cycle_list) GSList *cycle_list)
{ {
GtkCssDependencies unused;
GtkCssValue *value; GtkCssValue *value;
g_return_val_if_fail (color != NULL, NULL); g_return_val_if_fail (color != NULL, NULL);
g_return_val_if_fail (provider == NULL || GTK_IS_STYLE_PROVIDER_PRIVATE (provider), NULL); g_return_val_if_fail (provider == NULL || GTK_IS_STYLE_PROVIDER_PRIVATE (provider), NULL);
if (dependencies == NULL)
dependencies = &unused;
*dependencies = 0;
switch (color->type) switch (color->type)
{ {
case COLOR_TYPE_LITERAL: case COLOR_TYPE_LITERAL:
...@@ -170,7 +162,7 @@ _gtk_css_color_value_resolve (GtkCssValue *color, ...@@ -170,7 +162,7 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
if (named == NULL) if (named == NULL)
return NULL; return NULL;
value = _gtk_css_color_value_resolve (named, provider, current, current_deps, dependencies, &cycle); value = _gtk_css_color_value_resolve (named, provider, current, &cycle);
if (value == NULL) if (value == NULL)
return NULL; return NULL;
} }
...@@ -182,12 +174,10 @@ _gtk_css_color_value_resolve (GtkCssValue *color, ...@@ -182,12 +174,10 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
GtkHSLA hsla; GtkHSLA hsla;
GdkRGBA shade; GdkRGBA shade;
val = _gtk_css_color_value_resolve (color->sym_col.shade.color, provider, current, current_deps, dependencies, cycle_list); val = _gtk_css_color_value_resolve (color->sym_col.shade.color, provider, current, cycle_list);
if (val == NULL) if (val == NULL)
return NULL; return NULL;
*dependencies = _gtk_css_dependencies_union (*dependencies, 0);
_gtk_hsla_init_from_rgba (&hsla, _gtk_css_rgba_value_get_rgba (val)); _gtk_hsla_init_from_rgba (&hsla, _gtk_css_rgba_value_get_rgba (val));
_gtk_hsla_shade (&hsla, &hsla, color->sym_col.shade.factor); _gtk_hsla_shade (&hsla, &hsla, color->sym_col.shade.factor);
...@@ -204,11 +194,10 @@ _gtk_css_color_value_resolve (GtkCssValue *color, ...@@ -204,11 +194,10 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
GtkCssValue *val; GtkCssValue *val;
GdkRGBA alpha; GdkRGBA alpha;
val = _gtk_css_color_value_resolve (color->sym_col.alpha.color, provider, current, current_deps, dependencies, cycle_list); val = _gtk_css_color_value_resolve (color->sym_col.alpha.color, provider, current, cycle_list);
if (val == NULL) if (val == NULL)
return NULL; return NULL;
*dependencies = _gtk_css_dependencies_union (*dependencies, 0);
alpha = *_gtk_css_rgba_value_get_rgba (val); alpha = *_gtk_css_rgba_value_get_rgba (val);
alpha.alpha = CLAMP (alpha.alpha * color->sym_col.alpha.factor, 0, 1); alpha.alpha = CLAMP (alpha.alpha * color->sym_col.alpha.factor, 0, 1);
...@@ -222,21 +211,19 @@ _gtk_css_color_value_resolve (GtkCssValue *color, ...@@ -222,21 +211,19 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
{ {
GtkCssValue *val; GtkCssValue *val;
GdkRGBA color1, color2, res; GdkRGBA color1, color2, res;
GtkCssDependencies dep1, dep2;
val = _gtk_css_color_value_resolve (color->sym_col.mix.color1, provider, current, current_deps, &dep1, cycle_list); val = _gtk_css_color_value_resolve (color->sym_col.mix.color1, provider, current, cycle_list);
if (val == NULL) if (val == NULL)
return NULL; return NULL;
color1 = *_gtk_css_rgba_value_get_rgba (val); color1 = *_gtk_css_rgba_value_get_rgba (val);
_gtk_css_value_unref (val); _gtk_css_value_unref (val);
val = _gtk_css_color_value_resolve (color->sym_col.mix.color2, provider, current, current_deps, &dep2, cycle_list); val = _gtk_css_color_value_resolve (color->sym_col.mix.color2, provider, current, cycle_list);
if (val == NULL) if (val == NULL)
return NULL; return NULL;
color2 = *_gtk_css_rgba_value_get_rgba (val); color2 = *_gtk_css_rgba_value_get_rgba (val);
_gtk_css_value_unref (val); _gtk_css_value_unref (val);
*dependencies = _gtk_css_dependencies_union (dep1, dep2);
res.red = CLAMP (color1.red + ((color2.red - color1.red) * color->sym_col.mix.factor), 0, 1); res.red = CLAMP (color1.red + ((color2.red - color1.red) * color->sym_col.mix.factor), 0, 1);
res.green = CLAMP (color1.green + ((color2.green - color1.green) * color->sym_col.mix.factor), 0, 1); res.green = CLAMP (color1.green + ((color2.green - color1.green) * color->sym_col.mix.factor), 0, 1);
res.blue = CLAMP (color1.blue + ((color2.blue - color1.blue) * color->sym_col.mix.factor), 0, 1); res.blue = CLAMP (color1.blue + ((color2.blue - color1.blue) * color->sym_col.mix.factor), 0, 1);
...@@ -262,7 +249,6 @@ _gtk_css_color_value_resolve (GtkCssValue *color, ...@@ -262,7 +249,6 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
case COLOR_TYPE_CURRENT_COLOR: case COLOR_TYPE_CURRENT_COLOR:
if (current) if (current)
{ {
*dependencies = current_deps;
return _gtk_css_value_ref (current); return _gtk_css_value_ref (current);
} }
else else
...@@ -270,8 +256,6 @@ _gtk_css_color_value_resolve (GtkCssValue *color, ...@@ -270,8 +256,6 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
return _gtk_css_color_value_resolve (_gtk_css_style_property_get_initial_value (_gtk_css_style_property_lookup_by_id (GTK_CSS_PROPERTY_COLOR)), return _gtk_css_color_value_resolve (_gtk_css_style_property_get_initial_value (_gtk_css_style_property_lookup_by_id (GTK_CSS_PROPERTY_COLOR)),
provider, provider,
NULL, NULL,
0,
dependencies,
cycle_list); cycle_list);
} }
break; break;
...@@ -301,11 +285,9 @@ gtk_css_value_color_compute (GtkCssValue *value, ...@@ -301,11 +285,9 @@ gtk_css_value_color_compute (GtkCssValue *value,
guint property_id, guint property_id,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *style, GtkCssStyle *style,
GtkCssStyle *parent_style, GtkCssStyle *parent_style)
GtkCssDependencies *dependencies)
{ {
GtkCssValue *resolved, *current; GtkCssValue *resolved, *current;
GtkCssDependencies current_deps;
/* The computed value of the ‘currentColor’ keyword is the computed /* The computed value of the ‘currentColor’ keyword is the computed
* value of the ‘color’ property. If the ‘currentColor’ keyword is * value of the ‘color’ property. If the ‘currentColor’ keyword is
...@@ -314,27 +296,18 @@ gtk_css_value_color_compute (GtkCssValue *value, ...@@ -314,27 +296,18 @@ gtk_css_value_color_compute (GtkCssValue *value,
if (property_id == GTK_CSS_PROPERTY_COLOR) if (property_id == GTK_CSS_PROPERTY_COLOR)
{ {
if (parent_style) if (parent_style)
{ current = gtk_css_style_get_value (parent_style, GTK_CSS_PROPERTY_COLOR);
current = gtk_css_style_get_value (parent_style, GTK_CSS_PROPERTY_COLOR);
current_deps = GTK_CSS_EQUALS_PARENT;
}
else else
{ current = NULL;
current = NULL;
current_deps = 0;
}
} }
else else
{ {
current = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_COLOR); current = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_COLOR);
current_deps = GTK_CSS_DEPENDS_ON_COLOR;
} }
resolved = _gtk_css_color_value_resolve (value, resolved = _gtk_css_color_value_resolve (value,
provider, provider,
current, current,
current_deps,
dependencies,
NULL); NULL);
if (resolved == NULL) if (resolved == NULL)
......
...@@ -46,8 +46,6 @@ GtkCssValue * _gtk_css_color_value_parse (GtkCssParser *parser) ...@@ -46,8 +46,6 @@ GtkCssValue * _gtk_css_color_value_parse (GtkCssParser *parser)
GtkCssValue * _gtk_css_color_value_resolve (GtkCssValue *color, GtkCssValue * _gtk_css_color_value_resolve (GtkCssValue *color,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssValue *current, GtkCssValue *current,
GtkCssDependencies current_deps,
GtkCssDependencies *dependencies,
GSList *cycle_list); GSList *cycle_list);
......
...@@ -41,15 +41,12 @@ gtk_css_value_corner_compute (GtkCssValue *corner, ...@@ -41,15 +41,12 @@ gtk_css_value_corner_compute (GtkCssValue *corner,
guint property_id, guint property_id,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *style, GtkCssStyle *style,
GtkCssStyle *parent_style, GtkCssStyle *parent_style)
GtkCssDependencies *dependencies)
{ {
GtkCssValue *x, *y; GtkCssValue *x, *y;
GtkCssDependencies x_deps, y_deps;
x = _gtk_css_value_compute (corner->x, property_id, provider, style, parent_style, &x_deps); x = _gtk_css_value_compute (corner->x, property_id, provider, style, parent_style);
y = _gtk_css_value_compute (corner->y, property_id, provider, style, parent_style, &y_deps); y = _gtk_css_value_compute (corner->y, property_id, provider, style, parent_style);
*dependencies = _gtk_css_dependencies_union (x_deps, y_deps);
if (x == corner->x && y == corner->y) if (x == corner->x && y == corner->y)
{ {
_gtk_css_value_unref (x); _gtk_css_value_unref (x);
......
...@@ -54,8 +54,7 @@ gtk_css_value_ease_compute (GtkCssValue *value, ...@@ -54,8 +54,7 @@ gtk_css_value_ease_compute (GtkCssValue *value,
guint property_id, guint property_id,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *style, GtkCssStyle *style,
GtkCssStyle *parent_style, GtkCssStyle *parent_style)
GtkCssDependencies *dependencies)
{ {
return _gtk_css_value_ref (value); return _gtk_css_value_ref (value);
} }
......
...@@ -40,8 +40,7 @@ gtk_css_value_engine_compute (GtkCssValue *value, ...@@ -40,8 +40,7 @@ gtk_css_value_engine_compute (GtkCssValue *value,
guint property_id, guint property_id,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *style, GtkCssStyle *style,
GtkCssStyle *parent_style, GtkCssStyle *parent_style)
GtkCssDependencies *dependencies)
{ {
return _gtk_css_value_ref (value); return _gtk_css_value_ref (value);
} }
......
...@@ -42,8 +42,7 @@ gtk_css_value_enum_compute (GtkCssValue *value, ...@@ -42,8 +42,7 @@ gtk_css_value_enum_compute (GtkCssValue *value,
guint property_id, guint property_id,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *style, GtkCssStyle *style,
GtkCssStyle *parent_style, GtkCssStyle *parent_style)
GtkCssDependencies *dependencies)
{ {
return _gtk_css_value_ref (value); return _gtk_css_value_ref (value);
} }
...@@ -165,8 +164,7 @@ gtk_css_value_font_size_compute (GtkCssValue *value, ...@@ -165,8 +164,7 @@ gtk_css_value_font_size_compute (GtkCssValue *value,
guint property_id, guint property_id,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *style, GtkCssStyle *style,
GtkCssStyle *parent_style, GtkCssStyle *parent_style)
GtkCssDependencies *dependencies)
{ {
double font_size; double font_size;
...@@ -197,7 +195,6 @@ gtk_css_value_font_size_compute (GtkCssValue *value, ...@@ -197,7 +195,6 @@ gtk_css_value_font_size_compute (GtkCssValue *value,
font_size = _gtk_css_font_size_get_default (provider) * 2; font_size = _gtk_css_font_size_get_default (provider) * 2;
break; break;
case GTK_CSS_FONT_SIZE_SMALLER: case GTK_CSS_FONT_SIZE_SMALLER:
*dependencies = GTK_CSS_DEPENDS_ON_PARENT;
if (parent_style) if (parent_style)
font_size = _gtk_css_number_value_get (gtk_css_style_get_value (parent_style, GTK_CSS_PROPERTY_FONT_SIZE), 100); font_size = _gtk_css_number_value_get (gtk_css_style_get_value (parent_style, GTK_CSS_PROPERTY_FONT_SIZE), 100);
else else
...@@ -206,7 +203,6 @@ gtk_css_value_font_size_compute (GtkCssValue *value, ...@@ -206,7 +203,6 @@ gtk_css_value_font_size_compute (GtkCssValue *value,
font_size /= 1.2; font_size /= 1.2;
break; break;
case GTK_CSS_FONT_SIZE_LARGER: case GTK_CSS_FONT_SIZE_LARGER:
*dependencies = GTK_CSS_DEPENDS_ON_PARENT;
if (parent_style) if (parent_style)
font_size = _gtk_css_number_value_get (gtk_css_style_get_value (parent_style, GTK_CSS_PROPERTY_FONT_SIZE), 100); font_size = _gtk_css_number_value_get (gtk_css_style_get_value (parent_style, GTK_CSS_PROPERTY_FONT_SIZE), 100);
else else
...@@ -376,8 +372,7 @@ gtk_css_value_font_weight_compute (GtkCssValue *value, ...@@ -376,8 +372,7 @@ gtk_css_value_font_weight_compute (GtkCssValue *value,
guint property_id, guint property_id,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *style, GtkCssStyle *style,
GtkCssStyle *parent_style, GtkCssStyle *parent_style)
GtkCssDependencies *dependencies)
{ {
PangoWeight new_weight; PangoWeight new_weight;
int parent_value; int parent_value;
...@@ -385,8 +380,6 @@ gtk_css_value_font_weight_compute (GtkCssValue *value, ...@@ -385,8 +380,6 @@ gtk_css_value_font_weight_compute (GtkCssValue *value,
if (value->value >= 0) if (value->value >= 0)
return _gtk_css_value_ref (value); return _gtk_css_value_ref (value);
*dependencies = GTK_CSS_DEPENDS_ON_PARENT;
if (parent_style) if (parent_style)
parent_value = gtk_css_style_get_value (parent_style, property_id)->value; parent_value = gtk_css_style_get_value (parent_style, property_id)->value;
else else
......
...@@ -74,8 +74,7 @@ gtk_css_value_icon_theme_compute (GtkCssValue *icon_theme, ...@@ -74,8 +74,7 @@ gtk_css_value_icon_theme_compute (GtkCssValue *icon_theme,
guint property_id, guint property_id,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *style, GtkCssStyle *style,
GtkCssStyle *parent_style, GtkCssStyle *parent_style)
GtkCssDependencies *dependencies)
{ {
GtkCssValue *result; GtkCssValue *result;
GtkIconTheme *icontheme; GtkIconTheme *icontheme;
......
...@@ -65,8 +65,7 @@ gtk_css_image_real_compute (GtkCssImage *image, ...@@ -65,8 +65,7 @@ gtk_css_image_real_compute (GtkCssImage *image,
guint property_id, guint property_id,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *style, GtkCssStyle *style,
GtkCssStyle *parent_style, GtkCssStyle *parent_style)
GtkCssDependencies *dependencies)
{ {
return g_object_ref (image); return g_object_ref (image);
} }
...@@ -149,23 +148,17 @@ _gtk_css_image_compute (GtkCssImage *image, ...@@ -149,23 +148,17 @@ _gtk_css_image_compute (GtkCssImage *image,
guint property_id, guint property_id,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *style, GtkCssStyle *style,
GtkCssStyle *parent_style, GtkCssStyle *parent_style)
GtkCssDependencies *dependencies)
{ {
GtkCssDependencies unused;
GtkCssImageClass *klass; GtkCssImageClass *klass;
g_return_val_if_fail (GTK_IS_CSS_IMAGE (image), NULL); g_return_val_if_fail (GTK_IS_CSS_IMAGE (image), NULL);
g_return_val_if_fail (GTK_IS_CSS_STYLE (style), NULL); g_return_val_if_fail (GTK_IS_CSS_STYLE (style), NULL);
g_return_val_if_fail (parent_style == NULL || GTK_IS_CSS_STYLE (parent_style), NULL); g_return_val_if_fail (parent_style == NULL || GTK_IS_CSS_STYLE (parent_style), NULL);
if (dependencies == NULL)
dependencies = &unused;
*dependencies = 0;
klass = GTK_CSS_IMAGE_GET_CLASS (image); klass = GTK_CSS_IMAGE_GET_CLASS (image);
return klass->compute (image, property_id, provider, style, parent_style, dependencies); return klass->compute (image, property_id, provider, style, parent_style);
} }
GtkCssImage * GtkCssImage *
......
...@@ -806,8 +806,7 @@ gtk_css_image_builtin_compute (GtkCssImage *image, ...@@ -806,8 +806,7 @@ gtk_css_image_builtin_compute (GtkCssImage *image,
guint property_id, guint property_id,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *style, GtkCssStyle *style,
GtkCssStyle *parent_style, GtkCssStyle *parent_style)
GtkCssDependencies *dependencies)
{ {
GtkCssImageBuiltin *result; GtkCssImageBuiltin *result;
GtkBorderStyle border_style; GtkBorderStyle border_style;
...@@ -832,9 +831,6 @@ gtk_css_image_builtin_compute (GtkCssImage *image, ...@@ -832,9 +831,6 @@ gtk_css_image_builtin_compute (GtkCssImage *image,
result->bg_color = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BACKGROUND_COLOR)); result->bg_color = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BACKGROUND_COLOR));
result->border_color = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_TOP_COLOR)); result->border_color = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_TOP_COLOR));
/* XXX: We also depend on other values, but I guess we cannot express that */
*dependencies = GTK_CSS_DEPENDS_ON_COLOR;
return GTK_CSS_IMAGE (result); return GTK_CSS_IMAGE (result);
} }
......
...@@ -35,8 +35,7 @@ gtk_css_image_gradient_compute (GtkCssImage *image, ...@@ -35,8 +35,7 @@ gtk_css_image_gradient_compute (GtkCssImage *image,
guint property_id, guint property_id,
GtkStyleProviderPrivate *provider, GtkStyleProviderPrivate *provider,
GtkCssStyle *style, GtkCssStyle *style,
GtkCssStyle *parent_style, GtkCssStyle *parent_style)
GtkCssDependencies *dependencies)
{ {
GtkCssImageGradient *gradient = GTK_CSS_IMAGE_GRADIENT (image); GtkCssImageGradient *gradient = GTK_CSS_IMAGE_GRADIENT (image);
GtkCssImageGradient *copy; GtkCssImageGradient *copy;
...@@ -46,7 +45,7 @@ gtk_css_image_gradient_compute (GtkCssImage *image, ...@@ -46,7 +45,7 @@ gtk_css_image_gradient_compute (GtkCssImage *image,
copy = g_object_new (GTK_TYPE_CSS_IMAGE_GRADIENT, NULL); copy = g_object_new (GTK_TYPE_CSS_IMAGE_GRADIENT, NULL);
copy->gradient = gtk_gradient_ref (gradient->gradient); copy->gradient = gtk_gradient_ref (gradient->gradient);
copy->pattern = _gtk_gradient_resolve_full (copy->gradient, provider, style, parent_style, dependencies); copy->pattern = _gtk_gradient_resolve_full (copy->gradient, provider, style, parent_style);
return GTK_CSS_IMAGE (copy); return GTK_CSS_IMAGE (copy);
} }
......
...@@ -129,8 +129,7 @@ gtk_css_image_icon_theme_compute (GtkCssImage *image, ...@@ -129,8 +129,7 @@ gtk_css_image_icon_theme_compute (GtkCssImage *image,
guint property_id, guint property_id,