summaryrefslogtreecommitdiff
path: root/gtk/gtkcssinheritvalue.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-08-25 01:59:13 +0200
committerBenjamin Otte <otte@redhat.com>2012-08-28 15:42:24 +0200
commit012526241a1024256459c127065603a5fd11cfd3 (patch)
tree9050fe32f138ff58fff2e5acb6a355cc86e34236 /gtk/gtkcssinheritvalue.c
parent8ff08e7c5e7da785a37c56018b1ae4b57cb77e64 (diff)
downloadgtk+-012526241a1024256459c127065603a5fd11cfd3.tar.gz
cssvalue: First step of proper dependency tracking
Instead of using the EVERYTHING aka FIXME value for tdependencies, actually compute the dependencies in a bunch of simple cases.
Diffstat (limited to 'gtk/gtkcssinheritvalue.c')
-rw-r--r--gtk/gtkcssinheritvalue.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/gtk/gtkcssinheritvalue.c b/gtk/gtkcssinheritvalue.c
index 58964be240..d70200d038 100644
--- a/gtk/gtkcssinheritvalue.c
+++ b/gtk/gtkcssinheritvalue.c
@@ -41,15 +41,18 @@ gtk_css_value_inherit_compute (GtkCssValue *value,
{
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));
+ {
+ *dependencies = GTK_CSS_EQUALS_PARENT;
+ return _gtk_css_value_ref (_gtk_style_context_peek_property (parent, 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_style_property_get_initial_value (_gtk_css_style_property_lookup_by_id (property_id)),
+ property_id,
+ context,
+ dependencies);
+ }
}
static gboolean