[gtk] css: Go back to clearing out selectors
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] css: Go back to clearing out selectors
- Date: Sun, 19 Jan 2020 04:06:53 +0000 (UTC)
commit 55cfeccfd251417e74fe56a5c99b5aa3c3217bd0
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jan 18 17:55:58 2020 -0500
css: Go back to clearing out selectors
Now that we use the selector tree for change computation
again, we don't need the ruleset selectors anymore.
Bring back the code that cleans them out.
gtk/gtkcssprovider.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index ee5085dd3f..5201e00c0a 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -984,6 +984,18 @@ gtk_css_provider_postprocess (GtkCssProvider *css_provider)
priv->tree = _gtk_css_selector_tree_builder_build (builder);
_gtk_css_selector_tree_builder_free (builder);
+
+#ifndef VERIFY_TREE
+ for (i = 0; i < priv->rulesets->len; i++)
+ {
+ GtkCssRuleset *ruleset;
+
+ ruleset = &g_array_index (priv->rulesets, GtkCssRuleset, i);
+
+ _gtk_css_selector_free (ruleset->selector);
+ ruleset->selector = NULL;
+ }
+#endif
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]