]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkcssinheritvalue.c
Rename property to be more neutral
[~andy/gtk] / gtk / gtkcssinheritvalue.c
index 58964be2409f6f8f45e6748524753de67d52a0a6..e2c3f163300b2a19c889ae52057d815936ff2e1b 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "gtkcssinheritvalueprivate.h"
 
-#include "gtkcssstylepropertyprivate.h"
+#include "gtkcssinitialvalueprivate.h"
 #include "gtkstylecontextprivate.h"
 
 struct _GtkCssValue {
@@ -34,22 +34,27 @@ 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);
-
-  *dependencies = GTK_CSS_DEPENDS_ON_EVERYTHING;
-
-  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,
-                                   NULL);
+    {
+      return _gtk_css_value_compute (_gtk_css_initial_value_get (),
+                                     property_id,
+                                     provider,
+                                     values,
+                                     parent_values,
+                                     dependencies);
+    }
 }
 
 static gboolean
@@ -62,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;