[gtk+/wip/cssstyle: 7/27] stylecontext: don't unset the current style info when clearing cache
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/cssstyle: 7/27] stylecontext: don't unset the current style info when clearing cache
- Date: Wed, 24 Dec 2014 02:19:57 +0000 (UTC)
commit efbc650b93c4d7d97acfb0fc6bb41b4e921855d2
Author: Benjamin Otte <otte redhat com>
Date: Mon Oct 27 04:22:49 2014 +0100
stylecontext: don't unset the current style info when clearing cache
Instead, do it manually.
gtk/gtkstylecontext.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index b765290..eeabc5e 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -2618,8 +2618,6 @@ gtk_style_context_clear_cache (GtkStyleContext *context)
priv = context->priv;
- style_info_set_values (priv->info, NULL);
-
for (l = priv->saved_nodes; l; l = l->next)
{
style_info_set_values (l->data, NULL);
@@ -2773,6 +2771,8 @@ _gtk_style_context_validate (GtkStyleContext *context,
if (!priv->invalid && change == 0 && _gtk_bitmask_is_empty (parent_changes))
return;
+ g_assert (!gtk_style_context_is_saved (context));
+
priv->pending_changes = 0;
gtk_style_context_set_invalid (context, FALSE);
@@ -2795,9 +2795,9 @@ _gtk_style_context_validate (GtkStyleContext *context,
else
{
gtk_style_context_update_cache (context, parent_changes);
- style_info_set_values (info, NULL);
}
+ style_info_set_values (info, NULL);
values = style_values_lookup (context);
if (values != current)
@@ -2904,6 +2904,8 @@ gtk_style_context_invalidate (GtkStyleContext *context)
gtk_style_context_clear_cache (context);
+ style_info_set_values (context->priv->info, NULL);
+
changes = _gtk_bitmask_new ();
changes = _gtk_bitmask_invert_range (changes,
0,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]