diff options
author | Benjamin Otte <otte@redhat.com> | 2014-12-13 02:07:34 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2015-01-07 14:26:47 +0100 |
commit | 85dd685b3f56519ae1972aab2dd9a2b4db5f939f (patch) | |
tree | 2aa76088c7464986c3fe3e4d5aa5e4b8f49adcd3 /gtk/gtkstylecontext.c | |
parent | 77b876fad3a04c6ba8b71b3ff62df1ac9681b633 (diff) | |
download | gtk+-85dd685b3f56519ae1972aab2dd9a2b4db5f939f.tar.gz |
stylecontext: Only look up stuff in the cache that can be in the cache
Only saved styles are stored in the cache so we should look only those
up there.
Diffstat (limited to 'gtk/gtkstylecontext.c')
-rw-r--r-- | gtk/gtkstylecontext.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index c27ea3daa7..57e0852ecf 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -729,16 +729,15 @@ style_values_lookup (GtkStyleContext *context) g_assert (priv->widget != NULL || priv->widget_path != NULL); - values = g_hash_table_lookup (priv->style_values, info->decl); - if (values) - { - style_info_set_values (info, values); - return values; - } - - if (gtk_style_context_is_saved (context)) { + values = g_hash_table_lookup (priv->style_values, info->decl); + if (values) + { + style_info_set_values (info, values); + return values; + } + values = gtk_css_static_style_new (); g_hash_table_insert (priv->style_values, gtk_css_node_declaration_ref (info->decl), |