diff options
author | Benjamin Otte <otte@redhat.com> | 2012-07-12 03:43:15 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-08-28 15:40:56 +0200 |
commit | 9b4ed662181cabde506248cf8b344420a0300a3e (patch) | |
tree | 50063700a3f95fa1af072c20202c0387ffff4040 /gtk/gtkcssbgsizevalue.c | |
parent | 9b953829fbf1332d00c2ca8a99c7da5e4bda8c64 (diff) | |
download | gtk+-9b4ed662181cabde506248cf8b344420a0300a3e.tar.gz |
css: Pass property_id to compute function
This is a reorganization of how value computing should be done.
Previously the GtkCssStyleProperty.compute vfunc was supposed to take
care of special cases when it needed those for computation. However,
this proved to be very complicated in cases where values were nested and
only the last value (of a common type) needed to be special cased.
A common example for this was the fallback handling for unresolvable
colors.
Now, we pass the property's ID along with all compute functions so we
can do the special casing where it's necessary.
Note that no actual changes happen in this commit. This will happen in
follow-ups.
Diffstat (limited to 'gtk/gtkcssbgsizevalue.c')
-rw-r--r-- | gtk/gtkcssbgsizevalue.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtkcssbgsizevalue.c b/gtk/gtkcssbgsizevalue.c index 2ba0eb110a..38f605496e 100644 --- a/gtk/gtkcssbgsizevalue.c +++ b/gtk/gtkcssbgsizevalue.c @@ -42,13 +42,14 @@ gtk_css_value_bg_size_free (GtkCssValue *value) GtkCssValue * gtk_css_value_bg_size_compute (GtkCssValue *value, + guint property_id, GtkStyleContext *context) { 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, context) : NULL, - value->y ? _gtk_css_value_compute (value->y, context) : NULL); + 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); } static gboolean |