]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkcssinheritvalue.c
filechooserbutton: Emit 'selection-changed' when changing the selection programmatically
[~andy/gtk] / gtk / gtkcssinheritvalue.c
index 585a9760e5190232d98751488fef12bf2bffbb99..e2c3f163300b2a19c889ae52057d815936ff2e1b 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "gtkcssinheritvalueprivate.h"
 
-#include "gtkcssstylepropertyprivate.h"
+#include "gtkcssinitialvalueprivate.h"
 #include "gtkstylecontextprivate.h"
 
 struct _GtkCssValue {
@@ -34,23 +34,25 @@ gtk_css_value_inherit_free (GtkCssValue *value)
 }
 
 static GtkCssValue *
-gtk_css_value_inherit_compute (GtkCssValue        *value,
-                               guint               property_id,
-                               GtkStyleContext    *context,
-                               GtkCssDependencies *dependencies)
+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)
+  if (parent_values)
     {
       *dependencies = GTK_CSS_EQUALS_PARENT;
-      return _gtk_css_value_ref (_gtk_style_context_peek_property (parent, property_id));
+      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)),
+      return _gtk_css_value_compute (_gtk_css_initial_value_get (),
                                      property_id,
-                                     context,
+                                     provider,
+                                     values,
+                                     parent_values,
                                      dependencies);
     }
 }