g_slice_free (GtkCssValue, value);
}
-GtkCssValue *
+static GtkCssValue *
gtk_css_value_bg_size_compute (GtkCssValue *value,
guint property_id,
GtkStyleContext *context,
GtkCssDependencies *dependencies)
{
+ GtkCssValue *x, *y;
+ GtkCssDependencies x_deps, y_deps;
+
if (value->x == NULL && value->y == NULL)
return _gtk_css_value_ref (value);
- *dependencies = GTK_CSS_DEPENDS_ON_EVERYTHING;
+ x_deps = y_deps = 0;
+ x = y = NULL;
+
+ if (value->x)
+ x = _gtk_css_value_compute (value->x, property_id, context, &x_deps);
+
+ if (value->y)
+ y = _gtk_css_value_compute (value->y, property_id, context, &y_deps);
+
+ *dependencies = _gtk_css_dependencies_union (x_deps, y_deps);
- return _gtk_css_bg_size_value_new (value->x ? _gtk_css_value_compute (value->x, property_id, context, NULL) : NULL,
- value->y ? _gtk_css_value_compute (value->y, property_id, context, NULL) : NULL);
+ return _gtk_css_bg_size_value_new (value->x ? x : NULL,
+ value->y ? y : NULL);
}
static gboolean
static GtkCssValue *
gtk_css_value_bg_size_transition (GtkCssValue *start,
GtkCssValue *end,
+ guint property_id,
double progress)
{
GtkCssValue *x, *y;
if (start->x)
{
- x = _gtk_css_value_transition (start->x, end->x, progress);
+ x = _gtk_css_value_transition (start->x, end->x, property_id, progress);
if (x == NULL)
return NULL;
}
if (start->y)
{
- y = _gtk_css_value_transition (start->y, end->y, progress);
+ y = _gtk_css_value_transition (start->y, end->y, property_id, progress);
if (y == NULL)
{
_gtk_css_value_unref (x);