diff options
author | Benjamin Otte <otte@redhat.com> | 2012-07-16 14:48:43 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-08-28 15:42:23 +0200 |
commit | 0e2f35ed882ab11d010866d32f2f65232145b8d0 (patch) | |
tree | f8e1af229adca8cdcce0b08808c3f6571615dd22 /gtk/gtkcssbgsizevalue.c | |
parent | 9e7e65ca6e01246cf9eea156f0153014b58e4d36 (diff) | |
download | gtk+-0e2f35ed882ab11d010866d32f2f65232145b8d0.tar.gz |
css: Introduce dependencies for value computations
When values are computed, they might depend on various other values and
we need to track this so we can update the values when those other
values change. This is the first step in making that happen.
This patch does not do any dependency tracking at all, instead it uses
GTK_CSS_DEPENDS_ON_EVERYTHING as a sort of FIXME.
Diffstat (limited to 'gtk/gtkcssbgsizevalue.c')
-rw-r--r-- | gtk/gtkcssbgsizevalue.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gtk/gtkcssbgsizevalue.c b/gtk/gtkcssbgsizevalue.c index 38f605496e..2bff385b9f 100644 --- a/gtk/gtkcssbgsizevalue.c +++ b/gtk/gtkcssbgsizevalue.c @@ -41,15 +41,18 @@ gtk_css_value_bg_size_free (GtkCssValue *value) } GtkCssValue * -gtk_css_value_bg_size_compute (GtkCssValue *value, - guint property_id, - GtkStyleContext *context) +gtk_css_value_bg_size_compute (GtkCssValue *value, + guint property_id, + GtkStyleContext *context, + GtkCssDependencies *dependencies) { if (value->x == NULL && value->y == NULL) return _gtk_css_value_ref (value); - return _gtk_css_bg_size_value_new (value->x ? _gtk_css_value_compute (value->x, property_id, context) : NULL, - value->y ? _gtk_css_value_compute (value->y, property_id, context) : NULL); + *dependencies = GTK_CSS_DEPENDS_ON_EVERYTHING; + + 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); } static gboolean |