#include "gtkcssinheritvalueprivate.h"
+#include "gtkcssinitialvalueprivate.h"
+#include "gtkstylecontextprivate.h"
+
struct _GtkCssValue {
GTK_CSS_VALUE_BASE
};
}
static GtkCssValue *
-gtk_css_value_inherit_compute (GtkCssValue *value,
- GtkStyleContext *context)
+gtk_css_value_inherit_compute (GtkCssValue *value,
+ guint property_id,
+ GtkStyleProviderPrivate *provider,
+ GtkCssComputedValues *values,
+ GtkCssComputedValues *parent_values,
+ GtkCssDependencies *dependencies)
{
- /* This value should be caught further up */
- g_return_val_if_reached (_gtk_css_value_ref (value));
+ 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_initial_value_get (),
+ property_id,
+ provider,
+ values,
+ parent_values,
+ dependencies);
+ }
}
static gboolean
static GtkCssValue *
gtk_css_value_inherit_transition (GtkCssValue *start,
GtkCssValue *end,
+ guint property_id,
double progress)
{
return NULL;
{
return _gtk_css_value_ref (&inherit);
}
-
-gboolean
-_gtk_css_value_is_inherit (const GtkCssValue *value)
-{
- g_return_val_if_fail (value != NULL, FALSE);
-
- return value == &inherit;
-}