From ffe50c3b674fe23596fd0af855ee8c1a678c3283 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 27 Mar 2012 01:43:12 +0200 Subject: cssvalue: Add _gtk_css_value_equal() For now, we return FALSE for all default css values, so this is not very useful. I also think of this as an optimization equal, not a guaranteed equal, because we don't even have a notion of what "equal" means. For example, for background-repeat, "repeat, repeat" and "repeat" are functionally equivalent. But the cssvalue has no idea that it's used for background-repeat. As a more complicated example, "repeat, no-repeat" and "repeat" are equal to what one sees as long as there's only one image listed background-image-source. But once you start transition'ing to an image with 2 sources, it's different... --- gtk/gtkcssinitialvalue.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gtk/gtkcssinitialvalue.c') diff --git a/gtk/gtkcssinitialvalue.c b/gtk/gtkcssinitialvalue.c index 32fb1c99fe..73fd38b3ae 100644 --- a/gtk/gtkcssinitialvalue.c +++ b/gtk/gtkcssinitialvalue.c @@ -30,6 +30,13 @@ gtk_css_value_initial_free (GtkCssValue *value) g_assert_not_reached (); } +static gboolean +gtk_css_value_initial_equal (const GtkCssValue *value1, + const GtkCssValue *value2) +{ + return TRUE; +} + static void gtk_css_value_initial_print (const GtkCssValue *value, GString *string) @@ -39,6 +46,7 @@ gtk_css_value_initial_print (const GtkCssValue *value, static const GtkCssValueClass GTK_CSS_VALUE_INITIAL = { gtk_css_value_initial_free, + gtk_css_value_initial_equal, gtk_css_value_initial_print }; -- cgit v1.2.1