diff options
author | Benjamin Otte <otte@redhat.com> | 2013-03-28 23:13:43 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2013-03-28 23:18:59 +0100 |
commit | cbee3901486781370f50ee02f49bdbd463f3eaa3 (patch) | |
tree | 1fa0753468338560bed086dcfd77b69535c22ca8 /gtk/gtkstylecontext.c | |
parent | c25d8e3aea900f8ae2abd2907a5b8a2e89e7ee9e (diff) | |
download | gtk+-cbee3901486781370f50ee02f49bdbd463f3eaa3.tar.gz |
cssvalue: At cycle detection to color resolving
The following CSS would infloop:
@define-color self @self
as it would infinitely lookup the color named "self" and try to resolve
it. This patch adds detection of such cycles to the resolve function by
keeping a list of currently resolving colors in the cycle_list variable.
Diffstat (limited to 'gtk/gtkstylecontext.c')
-rw-r--r-- | gtk/gtkstylecontext.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index f2c79c8d2e..0a0f4b1fce 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -2827,7 +2827,8 @@ _gtk_style_context_resolve_color (GtkStyleContext *context, GTK_STYLE_PROVIDER_PRIVATE (context->priv->cascade), _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_COLOR), GTK_CSS_DEPENDS_ON_COLOR, - dependencies); + dependencies, + NULL); if (val == NULL) return FALSE; |