g_slice_free (GtkCssValue, value);
}
+static GtkCssValue *
+gtk_css_value_corner_compute (GtkCssValue *corner,
+ guint property_id,
+ GtkStyleProviderPrivate *provider,
+ GtkCssComputedValues *values,
+ GtkCssComputedValues *parent_values,
+ GtkCssDependencies *dependencies)
+{
+ GtkCssValue *x, *y;
+ GtkCssDependencies x_deps, y_deps;
+
+ x = _gtk_css_value_compute (corner->x, property_id, provider, values, parent_values, &x_deps);
+ y = _gtk_css_value_compute (corner->y, property_id, provider, values, parent_values, &y_deps);
+ *dependencies = _gtk_css_dependencies_union (x_deps, y_deps);
+ if (x == corner->x && y == corner->y)
+ {
+ _gtk_css_value_unref (x);
+ _gtk_css_value_unref (y);
+ return _gtk_css_value_ref (corner);
+ }
+
+ return _gtk_css_corner_value_new (x, y);
+}
+
static gboolean
gtk_css_value_corner_equal (const GtkCssValue *corner1,
const GtkCssValue *corner2)
static GtkCssValue *
gtk_css_value_corner_transition (GtkCssValue *start,
- GtkCssValue *end,
- double progress)
+ GtkCssValue *end,
+ guint property_id,
+ double progress)
{
GtkCssValue *x, *y;
- 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;
- 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);
static const GtkCssValueClass GTK_CSS_VALUE_CORNER = {
gtk_css_value_corner_free,
+ gtk_css_value_corner_compute,
gtk_css_value_corner_equal,
gtk_css_value_corner_transition,
gtk_css_value_corner_print
return _gtk_css_number_value_get (corner->y, one_hundred_percent);
}
-GtkCssValue *
-_gtk_css_corner_value_compute (GtkCssValue *corner,
- GtkStyleContext *context)
-{
- GtkCssValue *x, *y;
-
- g_return_val_if_fail (corner->class == >K_CSS_VALUE_CORNER, NULL);
-
- x = _gtk_css_number_value_compute (corner->x, context);
- y = _gtk_css_number_value_compute (corner->y, context);
- if (x == corner->x && y == corner->y)
- {
- _gtk_css_value_unref (x);
- _gtk_css_value_unref (y);
- return _gtk_css_value_ref (corner);
- }
-
- return _gtk_css_corner_value_new (x, y);
-}
-