cssvalue: Remove GtkCssDependencies

They are not used anymore.
This commit is contained in:
Benjamin Otte 2015-02-14 02:27:39 +01:00
parent e95985da26
commit da25771e58
44 changed files with 109 additions and 296 deletions

View File

@ -305,18 +305,16 @@ gtk_gradient_resolve (GtkGradient *gradient,
cairo_pattern_t *
_gtk_gradient_resolve_full (GtkGradient *gradient,
GtkStyleProviderPrivate *provider,
GtkCssStyle *values,
GtkCssStyle *parent_values,
GtkCssDependencies *dependencies)
GtkCssStyle *style,
GtkCssStyle *parent_style)
{
cairo_pattern_t *pattern;
guint i;
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_CSS_STYLE (values), NULL);
g_return_val_if_fail (parent_values == NULL || GTK_IS_CSS_STYLE (parent_values), NULL);
g_return_val_if_fail (*dependencies == 0, 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);
if (gradient->radius0 == 0 && gradient->radius1 == 0)
pattern = cairo_pattern_create_linear (gradient->x0, gradient->y0,
@ -332,21 +330,17 @@ _gtk_gradient_resolve_full (GtkGradient *gradient,
ColorStop *stop;
GtkCssValue *val;
GdkRGBA rgba;
GtkCssDependencies stop_deps;
stop = &g_array_index (gradient->stops, ColorStop, i);
/* if color resolving fails, assume transparency */
val = _gtk_css_color_value_resolve (_gtk_symbolic_color_get_css_value (stop->color),
provider,
gtk_css_style_get_value (values, GTK_CSS_PROPERTY_COLOR),
GTK_CSS_DEPENDS_ON_COLOR,
&stop_deps,
gtk_css_style_get_value (style, GTK_CSS_PROPERTY_COLOR),
NULL);
if (val)
{
rgba = *_gtk_css_rgba_value_get_rgba (val);
*dependencies = _gtk_css_dependencies_union (*dependencies, stop_deps);
_gtk_css_value_unref (val);
}
else

View File

@ -25,9 +25,8 @@ G_BEGIN_DECLS
cairo_pattern_t * _gtk_gradient_resolve_full (GtkGradient *gradient,
GtkStyleProviderPrivate *provider,
GtkCssStyle *values,
GtkCssStyle *parent_values,
GtkCssDependencies *dependencies);
GtkCssStyle *style,
GtkCssStyle *parent_style);
GtkGradient * _gtk_gradient_transition (GtkGradient *start,
GtkGradient *end,

View File

@ -306,8 +306,6 @@ gtk_symbolic_color_resolve (GtkSymbolicColor *color,
v = _gtk_css_color_value_resolve (color->value,
GTK_STYLE_PROVIDER_PRIVATE (props),
current,
0,
NULL,
NULL);
_gtk_css_value_unref (current);
if (v == NULL)

View File

@ -47,20 +47,16 @@ gtk_css_value_array_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssValue *result;
GtkCssValue *i_value;
guint i, j;
GtkCssDependencies child_deps;
result = NULL;
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);
*dependencies = _gtk_css_dependencies_union (*dependencies, child_deps);
i_value = _gtk_css_value_compute (value->values[i], property_id, provider, style, parent_style);
if (result == NULL &&
i_value != value->values[i])

View File

@ -45,25 +45,20 @@ gtk_css_value_bg_size_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssValue *x, *y;
GtkCssDependencies x_deps, y_deps;
if (value->x == NULL && value->y == NULL)
return _gtk_css_value_ref (value);
x_deps = y_deps = 0;
x = y = NULL;
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)
y = _gtk_css_value_compute (value->y, property_id, provider, style, parent_style, &y_deps);
*dependencies = _gtk_css_dependencies_union (x_deps, y_deps);
y = _gtk_css_value_compute (value->y, property_id, provider, style, parent_style);
return _gtk_css_bg_size_value_new (value->x ? x : NULL,
value->y ? y : NULL);

View File

@ -46,11 +46,9 @@ gtk_css_value_border_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssValue *computed;
GtkCssDependencies child_deps;
gboolean changed = FALSE;
guint i;
@ -61,8 +59,7 @@ gtk_css_value_border_compute (GtkCssValue *value,
{
if (value->values[i])
{
computed->values[i] = _gtk_css_value_compute (value->values[i], property_id, provider, style, parent_style, &child_deps);
*dependencies = _gtk_css_dependencies_union (*dependencies, child_deps);
computed->values[i] = _gtk_css_value_compute (value->values[i], property_id, provider, style, parent_style);
changed |= (computed->values[i] != value->values[i]);
}
}

View File

@ -124,8 +124,7 @@ gtk_css_value_color_get_fallback (guint property_id,
property_id,
provider,
style,
parent_style,
NULL);
parent_style);
default:
if (property_id < GTK_CSS_PROPERTY_N_PROPERTIES)
g_warning ("No fallback color defined for property '%s'",
@ -138,20 +137,13 @@ GtkCssValue *
_gtk_css_color_value_resolve (GtkCssValue *color,
GtkStyleProviderPrivate *provider,
GtkCssValue *current,
GtkCssDependencies current_deps,
GtkCssDependencies *dependencies,
GSList *cycle_list)
{
GtkCssDependencies unused;
GtkCssValue *value;
g_return_val_if_fail (color != NULL, 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)
{
case COLOR_TYPE_LITERAL:
@ -170,7 +162,7 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
if (named == 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)
return NULL;
}
@ -182,12 +174,10 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
GtkHSLA hsla;
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)
return NULL;
*dependencies = _gtk_css_dependencies_union (*dependencies, 0);
_gtk_hsla_init_from_rgba (&hsla, _gtk_css_rgba_value_get_rgba (val));
_gtk_hsla_shade (&hsla, &hsla, color->sym_col.shade.factor);
@ -204,11 +194,10 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
GtkCssValue *val;
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)
return NULL;
*dependencies = _gtk_css_dependencies_union (*dependencies, 0);
alpha = *_gtk_css_rgba_value_get_rgba (val);
alpha.alpha = CLAMP (alpha.alpha * color->sym_col.alpha.factor, 0, 1);
@ -222,21 +211,19 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
{
GtkCssValue *val;
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)
return NULL;
color1 = *_gtk_css_rgba_value_get_rgba (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)
return NULL;
color2 = *_gtk_css_rgba_value_get_rgba (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.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);
@ -262,7 +249,6 @@ _gtk_css_color_value_resolve (GtkCssValue *color,
case COLOR_TYPE_CURRENT_COLOR:
if (current)
{
*dependencies = current_deps;
return _gtk_css_value_ref (current);
}
else
@ -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)),
provider,
NULL,
0,
dependencies,
cycle_list);
}
break;
@ -301,11 +285,9 @@ gtk_css_value_color_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssValue *resolved, *current;
GtkCssDependencies current_deps;
/* The computed value of the currentColor keyword is the computed
* value of the color property. If the currentColor keyword is
@ -314,27 +296,18 @@ gtk_css_value_color_compute (GtkCssValue *value,
if (property_id == GTK_CSS_PROPERTY_COLOR)
{
if (parent_style)
{
current = gtk_css_style_get_value (parent_style, GTK_CSS_PROPERTY_COLOR);
current_deps = GTK_CSS_EQUALS_PARENT;
}
else
{
current = NULL;
current_deps = 0;
}
}
else
{
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,
provider,
current,
current_deps,
dependencies,
NULL);
if (resolved == NULL)

View File

@ -46,8 +46,6 @@ GtkCssValue * _gtk_css_color_value_parse (GtkCssParser *parser)
GtkCssValue * _gtk_css_color_value_resolve (GtkCssValue *color,
GtkStyleProviderPrivate *provider,
GtkCssValue *current,
GtkCssDependencies current_deps,
GtkCssDependencies *dependencies,
GSList *cycle_list);

View File

@ -41,15 +41,12 @@ gtk_css_value_corner_compute (GtkCssValue *corner,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssValue *x, *y;
GtkCssDependencies x_deps, y_deps;
x = _gtk_css_value_compute (corner->x, property_id, provider, style, parent_style, &x_deps);
y = _gtk_css_value_compute (corner->y, property_id, provider, style, parent_style, &y_deps);
*dependencies = _gtk_css_dependencies_union (x_deps, y_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);
if (x == corner->x && y == corner->y)
{
_gtk_css_value_unref (x);

View File

@ -54,8 +54,7 @@ gtk_css_value_ease_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
return _gtk_css_value_ref (value);
}

View File

@ -40,8 +40,7 @@ gtk_css_value_engine_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
return _gtk_css_value_ref (value);
}

View File

@ -42,8 +42,7 @@ gtk_css_value_enum_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
return _gtk_css_value_ref (value);
}
@ -165,8 +164,7 @@ gtk_css_value_font_size_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
double font_size;
@ -197,7 +195,6 @@ gtk_css_value_font_size_compute (GtkCssValue *value,
font_size = _gtk_css_font_size_get_default (provider) * 2;
break;
case GTK_CSS_FONT_SIZE_SMALLER:
*dependencies = GTK_CSS_DEPENDS_ON_PARENT;
if (parent_style)
font_size = _gtk_css_number_value_get (gtk_css_style_get_value (parent_style, GTK_CSS_PROPERTY_FONT_SIZE), 100);
else
@ -206,7 +203,6 @@ gtk_css_value_font_size_compute (GtkCssValue *value,
font_size /= 1.2;
break;
case GTK_CSS_FONT_SIZE_LARGER:
*dependencies = GTK_CSS_DEPENDS_ON_PARENT;
if (parent_style)
font_size = _gtk_css_number_value_get (gtk_css_style_get_value (parent_style, GTK_CSS_PROPERTY_FONT_SIZE), 100);
else
@ -376,8 +372,7 @@ gtk_css_value_font_weight_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
PangoWeight new_weight;
int parent_value;
@ -385,8 +380,6 @@ gtk_css_value_font_weight_compute (GtkCssValue *value,
if (value->value >= 0)
return _gtk_css_value_ref (value);
*dependencies = GTK_CSS_DEPENDS_ON_PARENT;
if (parent_style)
parent_value = gtk_css_style_get_value (parent_style, property_id)->value;
else

View File

@ -74,8 +74,7 @@ gtk_css_value_icon_theme_compute (GtkCssValue *icon_theme,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssValue *result;
GtkIconTheme *icontheme;

View File

@ -65,8 +65,7 @@ gtk_css_image_real_compute (GtkCssImage *image,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
return g_object_ref (image);
}
@ -149,23 +148,17 @@ _gtk_css_image_compute (GtkCssImage *image,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssDependencies unused;
GtkCssImageClass *klass;
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 (parent_style == NULL || GTK_IS_CSS_STYLE (parent_style), NULL);
if (dependencies == NULL)
dependencies = &unused;
*dependencies = 0;
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 *

View File

@ -806,8 +806,7 @@ gtk_css_image_builtin_compute (GtkCssImage *image,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssImageBuiltin *result;
GtkBorderStyle border_style;
@ -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->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);
}

View File

@ -35,8 +35,7 @@ gtk_css_image_gradient_compute (GtkCssImage *image,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssImageGradient *gradient = GTK_CSS_IMAGE_GRADIENT (image);
GtkCssImageGradient *copy;
@ -46,7 +45,7 @@ gtk_css_image_gradient_compute (GtkCssImage *image,
copy = g_object_new (GTK_TYPE_CSS_IMAGE_GRADIENT, NULL);
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);
}

View File

@ -129,8 +129,7 @@ gtk_css_image_icon_theme_compute (GtkCssImage *image,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssImageIconTheme *icon_theme = GTK_CSS_IMAGE_ICON_THEME (image);
GtkCssImageIconTheme *copy;
@ -149,8 +148,6 @@ gtk_css_image_icon_theme_compute (GtkCssImage *image,
copy->scale = _gtk_style_provider_private_get_scale (provider);
copy->color = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_COLOR));
*dependencies = GTK_CSS_DEPENDS_ON_COLOR;
return GTK_CSS_IMAGE (copy);
}

View File

@ -432,8 +432,7 @@ gtk_css_image_linear_compute (GtkCssImage *image,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssImageLinear *linear = GTK_CSS_IMAGE_LINEAR (image);
GtkCssImageLinear *copy;
@ -442,24 +441,21 @@ gtk_css_image_linear_compute (GtkCssImage *image,
copy = g_object_new (GTK_TYPE_CSS_IMAGE_LINEAR, NULL);
copy->repeating = linear->repeating;
copy->angle = _gtk_css_value_compute (linear->angle, property_id, provider, style, parent_style, dependencies);
copy->angle = _gtk_css_value_compute (linear->angle, property_id, provider, style, parent_style);
g_array_set_size (copy->stops, linear->stops->len);
for (i = 0; i < linear->stops->len; i++)
{
GtkCssImageLinearColorStop *stop, *scopy;
GtkCssDependencies child_deps;
stop = &g_array_index (linear->stops, GtkCssImageLinearColorStop, i);
scopy = &g_array_index (copy->stops, GtkCssImageLinearColorStop, i);
scopy->color = _gtk_css_value_compute (stop->color, property_id, provider, style, parent_style, &child_deps);
*dependencies = _gtk_css_dependencies_union (*dependencies, child_deps);
scopy->color = _gtk_css_value_compute (stop->color, property_id, provider, style, parent_style);
if (stop->offset)
{
scopy->offset = _gtk_css_value_compute (stop->offset, property_id, provider, style, parent_style, &child_deps);
*dependencies = _gtk_css_dependencies_union (*dependencies, child_deps);
scopy->offset = _gtk_css_value_compute (stop->offset, property_id, provider, style, parent_style);
}
else
{

View File

@ -59,8 +59,7 @@ struct _GtkCssImageClass
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies);
GtkCssStyle *parent_style);
/* compare two images for equality */
gboolean (* equal) (GtkCssImage *image1,
GtkCssImage *image2);
@ -96,8 +95,7 @@ GtkCssImage * _gtk_css_image_compute (GtkCssImage *
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies);
GtkCssStyle *parent_style);
gboolean _gtk_css_image_equal (GtkCssImage *image1,
GtkCssImage *image2);
GtkCssImage * _gtk_css_image_transition (GtkCssImage *start,

View File

@ -97,8 +97,7 @@ gtk_css_image_scaled_compute (GtkCssImage *image,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssImageScaled *scaled = GTK_CSS_IMAGE_SCALED (image);
GtkCssImageScaled *copy;
@ -122,8 +121,7 @@ gtk_css_image_scaled_compute (GtkCssImage *image,
property_id,
provider,
style,
parent_style,
dependencies);
parent_style);
else
copy->images[i] = g_object_ref (scaled->images[i]);
}

View File

@ -124,8 +124,7 @@ gtk_css_image_url_compute (GtkCssImage *image,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssImageUrl *url = GTK_CSS_IMAGE_URL (image);

View File

@ -38,8 +38,7 @@ gtk_css_value_image_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssImage *image, *computed;
@ -48,7 +47,7 @@ gtk_css_value_image_compute (GtkCssValue *value,
if (image == NULL)
return _gtk_css_value_ref (value);
computed = _gtk_css_image_compute (image, property_id, provider, style, parent_style, dependencies);
computed = _gtk_css_image_compute (image, property_id, provider, style, parent_style);
if (computed == image)
{

View File

@ -38,12 +38,10 @@ gtk_css_value_inherit_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
if (parent_style)
{
*dependencies = GTK_CSS_EQUALS_PARENT;
return _gtk_css_value_ref (gtk_css_style_get_value (parent_style, property_id));
}
else
@ -52,8 +50,7 @@ gtk_css_value_inherit_compute (GtkCssValue *value,
property_id,
provider,
style,
parent_style,
dependencies);
parent_style);
}
}

View File

@ -42,8 +42,7 @@ gtk_css_value_initial_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkSettings *settings;
@ -94,8 +93,7 @@ gtk_css_value_initial_compute (GtkCssValue *value,
property_id,
provider,
style,
parent_style,
dependencies);
parent_style);
}
static gboolean

View File

@ -466,8 +466,7 @@ _gtk_css_keyframes_compute (GtkCssKeyframes *keyframes,
resolved->property_ids[p],
provider,
style,
parent_style,
NULL);
parent_style);
}
}

View File

@ -39,19 +39,16 @@ static double
get_base_font_size (guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
if (property_id == GTK_CSS_PROPERTY_FONT_SIZE)
{
*dependencies = GTK_CSS_DEPENDS_ON_PARENT;
if (parent_style)
return _gtk_css_number_value_get (gtk_css_style_get_value (parent_style, GTK_CSS_PROPERTY_FONT_SIZE), 100);
else
return _gtk_css_font_size_get_default (provider);
}
*dependencies = GTK_CSS_DEPENDS_ON_FONT_SIZE;
return _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_FONT_SIZE), 100);
}
@ -60,8 +57,7 @@ gtk_css_value_number_compute (GtkCssValue *number,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkBorderStyle border_style;
@ -106,7 +102,7 @@ gtk_css_value_number_compute (GtkCssValue *number,
/* percentages for font sizes are computed, other percentages aren't */
if (property_id == GTK_CSS_PROPERTY_FONT_SIZE)
return _gtk_css_number_value_new (number->value / 100.0 *
get_base_font_size (property_id, provider, style, parent_style, dependencies),
get_base_font_size (property_id, provider, style, parent_style),
GTK_CSS_PX);
case GTK_CSS_NUMBER:
case GTK_CSS_PX:
@ -134,13 +130,13 @@ gtk_css_value_number_compute (GtkCssValue *number,
break;
case GTK_CSS_EM:
return _gtk_css_number_value_new (number->value *
get_base_font_size (property_id, provider, style, parent_style, dependencies),
get_base_font_size (property_id, provider, style, parent_style),
GTK_CSS_PX);
break;
case GTK_CSS_EX:
/* for now we pretend ex is half of em */
return _gtk_css_number_value_new (number->value * 0.5 *
get_base_font_size (property_id, provider, style, parent_style, dependencies),
get_base_font_size (property_id, provider, style, parent_style),
GTK_CSS_PX);
case GTK_CSS_RAD:
return _gtk_css_number_value_new (number->value * 360.0 / (2 * G_PI),

View File

@ -41,15 +41,12 @@ gtk_css_value_position_compute (GtkCssValue *position,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssValue *x, *y;
GtkCssDependencies x_deps, y_deps;
x = _gtk_css_value_compute (position->x, property_id, provider, style, parent_style, &x_deps);
y = _gtk_css_value_compute (position->y, property_id, provider, style, parent_style, &y_deps);
*dependencies = _gtk_css_dependencies_union (x_deps, y_deps);
x = _gtk_css_value_compute (position->x, property_id, provider, style, parent_style);
y = _gtk_css_value_compute (position->y, property_id, provider, style, parent_style);
if (x == position->x && y == position->y)
{
_gtk_css_value_unref (x);

View File

@ -38,8 +38,7 @@ gtk_css_value_repeat_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
return _gtk_css_value_ref (value);
}

View File

@ -38,8 +38,7 @@ gtk_css_value_rgba_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
return _gtk_css_value_ref (value);
}

View File

@ -55,11 +55,9 @@ gtk_css_value_shadows_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssValue *result;
GtkCssDependencies child_deps;
guint i;
if (value->len == 0)
@ -68,8 +66,7 @@ gtk_css_value_shadows_compute (GtkCssValue *value,
result = gtk_css_shadows_value_new (value->values, value->len);
for (i = 0; i < value->len; i++)
{
result->values[i] = _gtk_css_value_compute (value->values[i], property_id, provider, style, parent_style, &child_deps);
*dependencies = _gtk_css_dependencies_union (*dependencies, child_deps);
result->values[i] = _gtk_css_value_compute (value->values[i], property_id, provider, style, parent_style);
}
return result;

View File

@ -67,31 +67,15 @@ gtk_css_value_shadow_compute (GtkCssValue *shadow,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssValue *hoffset, *voffset, *radius, *spread, *color;
GtkCssDependencies child_deps;
child_deps = 0;
hoffset = _gtk_css_value_compute (shadow->hoffset, property_id, provider, style, parent_style, &child_deps);
*dependencies = _gtk_css_dependencies_union (*dependencies, child_deps);
child_deps = 0;
voffset = _gtk_css_value_compute (shadow->voffset, property_id, provider, style, parent_style, &child_deps);
*dependencies = _gtk_css_dependencies_union (*dependencies, child_deps);
child_deps = 0;
radius = _gtk_css_value_compute (shadow->radius, property_id, provider, style, parent_style, &child_deps);
*dependencies = _gtk_css_dependencies_union (*dependencies, child_deps);
child_deps = 0;
spread = _gtk_css_value_compute (shadow->spread, property_id, provider, style, parent_style, &child_deps),
*dependencies = _gtk_css_dependencies_union (*dependencies, child_deps);
child_deps = 0;
color = _gtk_css_value_compute (shadow->color, property_id, provider, style, parent_style, &child_deps);
*dependencies = _gtk_css_dependencies_union (*dependencies, child_deps);
hoffset = _gtk_css_value_compute (shadow->hoffset, property_id, provider, style, parent_style);
voffset = _gtk_css_value_compute (shadow->voffset, property_id, provider, style, parent_style);
radius = _gtk_css_value_compute (shadow->radius, property_id, provider, style, parent_style);
spread = _gtk_css_value_compute (shadow->spread, property_id, provider, style, parent_style),
color = _gtk_css_value_compute (shadow->color, property_id, provider, style, parent_style);
return gtk_css_shadow_value_new (hoffset, voffset, radius, spread, shadow->inset, color);
}

View File

@ -203,7 +203,6 @@ gtk_css_static_style_compute_value (GtkCssStaticStyle *style,
GtkCssValue *specified,
GtkCssSection *section)
{
GtkCssDependencies dependencies;
GtkCssValue *value;
gtk_internal_return_if_fail (GTK_IS_CSS_STATIC_STYLE (style));
@ -227,7 +226,7 @@ gtk_css_static_style_compute_value (GtkCssStaticStyle *style,
else
_gtk_css_value_ref (specified);
value = _gtk_css_value_compute (specified, id, provider, GTK_CSS_STYLE (style), parent_style, &dependencies);
value = _gtk_css_value_compute (specified, id, provider, GTK_CSS_STYLE (style), parent_style);
gtk_css_static_style_set_value (style, id, value, section);

View File

@ -38,8 +38,7 @@ gtk_css_value_string_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
return _gtk_css_value_ref (value);
}

View File

@ -58,8 +58,7 @@ typedef void (* GtkStylePrintFunc) (const GValue
typedef GtkCssValue * (* GtkStyleComputeFunc) (GtkStyleProviderPrivate *provider,
GtkCssStyle *values,
GtkCssStyle *parent_values,
GtkCssValue *specified,
GtkCssDependencies *dependencies);
GtkCssValue *specified);
static void
register_conversion_function (GType type,
@ -185,8 +184,7 @@ static GtkCssValue *
rgba_value_compute (GtkStyleProviderPrivate *provider,
GtkCssStyle *values,
GtkCssStyle *parent_values,
GtkCssValue *specified,
GtkCssDependencies *dependencies)
GtkCssValue *specified)
{
GdkRGBA white = { 1, 1, 1, 1 };
const GValue *value;
@ -205,8 +203,6 @@ rgba_value_compute (GtkStyleProviderPrivate *provider,
val = _gtk_css_color_value_resolve (_gtk_symbolic_color_get_css_value (symbolic),
provider,
gtk_css_style_get_value (values, GTK_CSS_PROPERTY_COLOR),
GTK_CSS_DEPENDS_ON_COLOR,
dependencies,
NULL);
if (val != NULL)
{
@ -284,8 +280,7 @@ static GtkCssValue *
color_value_compute (GtkStyleProviderPrivate *provider,
GtkCssStyle *values,
GtkCssStyle *parent_values,
GtkCssValue *specified,
GtkCssDependencies *dependencies)
GtkCssValue *specified)
{
GdkColor color = { 0, 65535, 65535, 65535 };
const GValue *value;
@ -302,8 +297,6 @@ color_value_compute (GtkStyleProviderPrivate *provider,
val = _gtk_css_color_value_resolve (_gtk_symbolic_color_get_css_value (g_value_get_boxed (value)),
provider,
gtk_css_style_get_value (values, GTK_CSS_PROPERTY_COLOR),
GTK_CSS_DEPENDS_ON_COLOR,
dependencies,
NULL);
if (val != NULL)
{
@ -849,8 +842,7 @@ static GtkCssValue *
pattern_value_compute (GtkStyleProviderPrivate *provider,
GtkCssStyle *values,
GtkCssStyle *parent_values,
GtkCssValue *specified,
GtkCssDependencies *dependencies)
GtkCssValue *specified)
{
const GValue *value = _gtk_css_typed_value_get (specified);
@ -861,7 +853,7 @@ pattern_value_compute (GtkStyleProviderPrivate *provider,
GValue new_value = G_VALUE_INIT;
cairo_pattern_t *gradient;
gradient = _gtk_gradient_resolve_full (g_value_get_boxed (value), provider, values, parent_values, dependencies);
gradient = _gtk_gradient_resolve_full (g_value_get_boxed (value), provider, values, parent_values);
g_value_init (&new_value, CAIRO_GOBJECT_TYPE_PATTERN);
g_value_take_boxed (&new_value, gradient);
@ -1142,8 +1134,6 @@ _gtk_css_style_funcs_print_value (const GValue *value,
* @parent_values: Values to look up inherited values from
* @target_type: Type the resulting value should have
* @specified: the value to use for the computation
* @dependencies: (out): Value initialized with 0 to take the dependencies
* of the returned value
*
* Converts the @specified value into the @computed value using the
* information in @context. The values must have matching types, ie
@ -1157,15 +1147,13 @@ _gtk_css_style_funcs_compute_value (GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GType target_type,
GtkCssValue *specified,
GtkCssDependencies *dependencies)
GtkCssValue *specified)
{
GtkStyleComputeFunc func;
g_return_val_if_fail (GTK_IS_STYLE_PROVIDER (provider), 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 (*dependencies == 0, NULL);
gtk_css_style_funcs_init ();
@ -1176,7 +1164,7 @@ _gtk_css_style_funcs_compute_value (GtkStyleProviderPrivate *provider,
GSIZE_TO_POINTER (g_type_fundamental (target_type)));
if (func)
return func (provider, style, parent_style, specified, dependencies);
return func (provider, style, parent_style, specified);
else
return _gtk_css_value_ref (specified);
}

View File

@ -32,8 +32,7 @@ GtkCssValue * _gtk_css_style_funcs_compute_value (GtkStyleProviderPriv
GtkCssStyle *style,
GtkCssStyle *parent_style,
GType target_type,
GtkCssValue *specified,
GtkCssDependencies *dependencies);
GtkCssValue *specified);
G_END_DECLS

View File

@ -232,11 +232,8 @@ gtk_css_transform_compute (GtkCssTransform *dest,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssDependencies x_deps, y_deps;
dest->type = src->type;
switch (src->type)
@ -244,34 +241,28 @@ gtk_css_transform_compute (GtkCssTransform *dest,
case GTK_CSS_TRANSFORM_MATRIX:
return TRUE;
case GTK_CSS_TRANSFORM_TRANSLATE:
x_deps = y_deps = 0;
dest->translate.x = _gtk_css_value_compute (src->translate.x, property_id, provider, style, parent_style, &x_deps);
dest->translate.y = _gtk_css_value_compute (src->translate.y, property_id, provider, style, parent_style, &y_deps);
*dependencies = _gtk_css_dependencies_union (x_deps, y_deps);
dest->translate.x = _gtk_css_value_compute (src->translate.x, property_id, provider, style, parent_style);
dest->translate.y = _gtk_css_value_compute (src->translate.y, property_id, provider, style, parent_style);
return dest->translate.x == src->translate.x
&& dest->translate.y == src->translate.y;
case GTK_CSS_TRANSFORM_ROTATE:
dest->rotate.rotate = _gtk_css_value_compute (src->rotate.rotate, property_id, provider, style, parent_style, dependencies);
dest->rotate.rotate = _gtk_css_value_compute (src->rotate.rotate, property_id, provider, style, parent_style);
return dest->rotate.rotate == src->rotate.rotate;
case GTK_CSS_TRANSFORM_SCALE:
x_deps = y_deps = 0;
dest->scale.x = _gtk_css_value_compute (src->scale.x, property_id, provider, style, parent_style, &x_deps);
dest->scale.y = _gtk_css_value_compute (src->scale.y, property_id, provider, style, parent_style, &y_deps);
*dependencies = _gtk_css_dependencies_union (x_deps, y_deps);
dest->scale.x = _gtk_css_value_compute (src->scale.x, property_id, provider, style, parent_style);
dest->scale.y = _gtk_css_value_compute (src->scale.y, property_id, provider, style, parent_style);
return dest->scale.x == src->scale.x
&& dest->scale.y == src->scale.y;
case GTK_CSS_TRANSFORM_SKEW:
x_deps = y_deps = 0;
dest->skew.x = _gtk_css_value_compute (src->skew.x, property_id, provider, style, parent_style, &x_deps);
dest->skew.y = _gtk_css_value_compute (src->skew.y, property_id, provider, style, parent_style, &y_deps);
*dependencies = _gtk_css_dependencies_union (x_deps, y_deps);
dest->skew.x = _gtk_css_value_compute (src->skew.x, property_id, provider, style, parent_style);
dest->skew.y = _gtk_css_value_compute (src->skew.y, property_id, provider, style, parent_style);
return dest->skew.x == src->skew.x
&& dest->skew.y == src->skew.y;
case GTK_CSS_TRANSFORM_SKEW_X:
dest->skew_x.skew = _gtk_css_value_compute (src->skew_x.skew, property_id, provider, style, parent_style, dependencies);
dest->skew_x.skew = _gtk_css_value_compute (src->skew_x.skew, property_id, provider, style, parent_style);
return dest->skew_x.skew == src->skew_x.skew;
case GTK_CSS_TRANSFORM_SKEW_Y:
dest->skew_y.skew = _gtk_css_value_compute (src->skew_y.skew, property_id, provider, style, parent_style, dependencies);
dest->skew_y.skew = _gtk_css_value_compute (src->skew_y.skew, property_id, provider, style, parent_style);
return dest->skew_y.skew == src->skew_y.skew;
case GTK_CSS_TRANSFORM_NONE:
default:
@ -285,10 +276,8 @@ gtk_css_value_transform_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssDependencies transform_deps;
GtkCssValue *result;
gboolean changes;
guint i;
@ -307,9 +296,7 @@ gtk_css_value_transform_compute (GtkCssValue *value,
property_id,
provider,
style,
parent_style,
&transform_deps);
*dependencies = _gtk_css_dependencies_union (*dependencies, transform_deps);
parent_style);
}
if (!changes)

View File

@ -39,12 +39,11 @@ gtk_css_value_typed_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssCustomProperty *custom = GTK_CSS_CUSTOM_PROPERTY (_gtk_css_style_property_lookup_by_id (property_id));
return _gtk_css_style_funcs_compute_value (provider, style, parent_style, custom->pspec->value_type, value, dependencies);
return _gtk_css_style_funcs_compute_value (provider, style, parent_style, custom->pspec->value_type, value);
}
static gboolean

View File

@ -82,11 +82,3 @@ _gtk_css_change_for_child (GtkCssChange match)
return gtk_css_change_translate (match, table, G_N_ELEMENTS (table));
}
GtkCssDependencies
_gtk_css_dependencies_union (GtkCssDependencies first,
GtkCssDependencies second)
{
return (first & ~GTK_CSS_EQUALS_PARENT) | ((first & GTK_CSS_EQUALS_PARENT) ? GTK_CSS_DEPENDS_ON_PARENT : 0)
| (second & ~GTK_CSS_EQUALS_PARENT) | ((second & GTK_CSS_EQUALS_PARENT) ? GTK_CSS_DEPENDS_ON_PARENT : 0);
}

View File

@ -65,13 +65,6 @@ typedef enum { /*< skip >*/
GTK_CSS_CHANGE_PARENT_POSITION | GTK_CSS_CHANGE_PARENT_SIBLING_POSITION | \
GTK_CSS_CHANGE_PARENT_STATE | GTK_CSS_CHANGE_PARENT_SIBLING_STATE)
typedef enum /*< skip >*/ {
GTK_CSS_DEPENDS_ON_PARENT = (1 << 0),
GTK_CSS_EQUALS_PARENT = (1 << 1),
GTK_CSS_DEPENDS_ON_COLOR = (1 << 2),
GTK_CSS_DEPENDS_ON_FONT_SIZE = (1 << 3)
} GtkCssDependencies;
/*
* GtkCssAffects:
* @GTK_CSS_AFFECTS_FOREGROUND: The foreground rendering is affected.
@ -281,8 +274,6 @@ typedef enum /*< skip >*/ {
GtkCssChange _gtk_css_change_for_sibling (GtkCssChange match);
GtkCssChange _gtk_css_change_for_child (GtkCssChange match);
GtkCssDependencies _gtk_css_dependencies_union (GtkCssDependencies first,
GtkCssDependencies second);
/* for lack of better place to put it */
/* mirror what cairo does */

View File

@ -39,8 +39,7 @@ gtk_css_value_unset_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssStyleProperty *property;
GtkCssValue *unset_value;
@ -56,8 +55,7 @@ gtk_css_value_unset_compute (GtkCssValue *value,
property_id,
provider,
style,
parent_style,
dependencies);
parent_style);
}
static gboolean

View File

@ -72,9 +72,6 @@ _gtk_css_value_unref (GtkCssValue *value)
* @provider: Style provider for looking up extra information
* @values: values to compute for
* @parent_values: parent values to use for inherited values
* @dependencies: (out) (allow-none): Set to the dependencies of the
* computed values that indicate when this value needs to be
* recomputed and how.
*
* Converts the specified @value into the computed value for the CSS
* property given by @property_id using the information in @context.
@ -88,21 +85,15 @@ _gtk_css_value_compute (GtkCssValue *value,
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies)
GtkCssStyle *parent_style)
{
GtkCssDependencies fallback;
gtk_internal_return_val_if_fail (value != NULL, NULL);
gtk_internal_return_val_if_fail (GTK_IS_STYLE_PROVIDER_PRIVATE (provider), NULL);
gtk_internal_return_val_if_fail (GTK_IS_CSS_STYLE (style), NULL);
gtk_internal_return_val_if_fail (parent_style == NULL || GTK_IS_CSS_STYLE (parent_style), NULL);
if (dependencies == NULL)
dependencies = &fallback;
*dependencies = 0;
return value->class->compute (value, property_id, provider, style, parent_style, dependencies);
return value->class->compute (value, property_id, provider, style, parent_style);
}
gboolean

View File

@ -44,8 +44,7 @@ struct _GtkCssValueClass {
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies);
GtkCssStyle *parent_style);
gboolean (* equal) (const GtkCssValue *value1,
const GtkCssValue *value2);
GtkCssValue * (* transition) (GtkCssValue *start,
@ -69,8 +68,7 @@ GtkCssValue *_gtk_css_value_compute (GtkCssValue
guint property_id,
GtkStyleProviderPrivate *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssDependencies *dependencies);
GtkCssStyle *parent_style);
gboolean _gtk_css_value_equal (const GtkCssValue *value1,
const GtkCssValue *value2);
gboolean _gtk_css_value_equal0 (const GtkCssValue *value1,

View File

@ -1649,7 +1649,7 @@ _gtk_style_context_peek_style_property (GtkStyleContext *context,
else
g_value_init (&pcache->value, GDK_TYPE_COLOR);
if (_gtk_style_context_resolve_color (context, _gtk_symbolic_color_get_css_value (color), &rgba, NULL))
if (_gtk_style_context_resolve_color (context, _gtk_symbolic_color_get_css_value (color), &rgba))
{
if (G_PARAM_SPEC_VALUE_TYPE (pspec) == GDK_TYPE_RGBA)
g_value_set_boxed (&pcache->value, &rgba);
@ -2172,8 +2172,7 @@ gtk_style_context_get_junction_sides (GtkStyleContext *context)
gboolean
_gtk_style_context_resolve_color (GtkStyleContext *context,
GtkCssValue *color,
GdkRGBA *result,
GtkCssDependencies *dependencies)
GdkRGBA *result)
{
GtkCssValue *val;
@ -2184,8 +2183,6 @@ _gtk_style_context_resolve_color (GtkStyleContext *context,
val = _gtk_css_color_value_resolve (color,
GTK_STYLE_PROVIDER_PRIVATE (context->priv->cascade),
_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_COLOR),
GTK_CSS_DEPENDS_ON_COLOR,
dependencies,
NULL);
if (val == NULL)
return FALSE;
@ -2220,7 +2217,7 @@ gtk_style_context_lookup_color (GtkStyleContext *context,
if (value == NULL)
return FALSE;
return _gtk_style_context_resolve_color (context, value, color, NULL);
return _gtk_style_context_resolve_color (context, value, color);
}
/**
@ -3250,7 +3247,6 @@ gtk_gradient_resolve_for_context (GtkGradient *gradient,
GtkStyleContext *context)
{
GtkStyleContextPrivate *priv = context->priv;
GtkCssDependencies ignored = 0;
g_return_val_if_fail (gradient != NULL, NULL);
g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL);
@ -3258,7 +3254,6 @@ gtk_gradient_resolve_for_context (GtkGradient *gradient,
return _gtk_gradient_resolve_full (gradient,
GTK_STYLE_PROVIDER_PRIVATE (priv->cascade),
gtk_style_context_lookup_style (context),
priv->parent ? gtk_style_context_lookup_style (priv->parent) : NULL,
&ignored);
priv->parent ? gtk_style_context_lookup_style (priv->parent) : NULL);
}

View File

@ -53,8 +53,7 @@ gboolean _gtk_style_context_check_region_name (const gchar *s
gboolean _gtk_style_context_resolve_color (GtkStyleContext *context,
GtkCssValue *color,
GdkRGBA *result,
GtkCssDependencies *dependencies);
GdkRGBA *result);
void _gtk_style_context_get_cursor_color (GtkStyleContext *context,
GdkRGBA *primary_color,
GdkRGBA *secondary_color);