X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkcssinheritvalue.c;h=e2c3f163300b2a19c889ae52057d815936ff2e1b;hb=ea043cab5718304d9b6170afa2d3f959fc99c718;hp=6faeef3c84a0867e835885c4e78309aaa65ac3db;hpb=9e7e65ca6e01246cf9eea156f0153014b58e4d36;p=~andy%2Fgtk diff --git a/gtk/gtkcssinheritvalue.c b/gtk/gtkcssinheritvalue.c index 6faeef3c8..e2c3f1633 100644 --- a/gtk/gtkcssinheritvalue.c +++ b/gtk/gtkcssinheritvalue.c @@ -19,7 +19,7 @@ #include "gtkcssinheritvalueprivate.h" -#include "gtkcssstylepropertyprivate.h" +#include "gtkcssinitialvalueprivate.h" #include "gtkstylecontextprivate.h" struct _GtkCssValue { @@ -34,18 +34,27 @@ gtk_css_value_inherit_free (GtkCssValue *value) } static GtkCssValue * -gtk_css_value_inherit_compute (GtkCssValue *value, - guint property_id, - GtkStyleContext *context) +gtk_css_value_inherit_compute (GtkCssValue *value, + guint property_id, + GtkStyleProviderPrivate *provider, + GtkCssComputedValues *values, + GtkCssComputedValues *parent_values, + GtkCssDependencies *dependencies) { - GtkStyleContext *parent = gtk_style_context_get_parent (context); - - if (parent) - return _gtk_css_value_ref (_gtk_style_context_peek_property (parent, property_id)); + if (parent_values) + { + *dependencies = GTK_CSS_EQUALS_PARENT; + return _gtk_css_value_ref (_gtk_css_computed_values_get_value (parent_values, property_id)); + } else - return _gtk_css_value_compute (_gtk_css_style_property_get_initial_value (_gtk_css_style_property_lookup_by_id (property_id)), - property_id, - context); + { + return _gtk_css_value_compute (_gtk_css_initial_value_get (), + property_id, + provider, + values, + parent_values, + dependencies); + } } static gboolean @@ -58,6 +67,7 @@ gtk_css_value_inherit_equal (const GtkCssValue *value1, static GtkCssValue * gtk_css_value_inherit_transition (GtkCssValue *start, GtkCssValue *end, + guint property_id, double progress) { return NULL;