diff options
Diffstat (limited to 'gtk/gtkcssprovider.c')
-rw-r--r-- | gtk/gtkcssprovider.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index 510a502ea9..ae9fd672ad 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -389,8 +389,8 @@ gtk_css_provider_init (GtkCssProvider *css_provider) static void verify_tree_match_results (GtkCssProvider *provider, - const GtkCssMatcher *matcher, - GPtrArray *tree_rules) + GtkCssNode *node, + GPtrArray *tree_rules) { #ifdef VERIFY_TREE GtkCssProviderPrivate *priv = gtk_css_provider_get_instance_private (provider); @@ -412,7 +412,7 @@ verify_tree_match_results (GtkCssProvider *provider, break; } } - should_match = _gtk_css_selector_matches (ruleset->selector, matcher); + should_match = _gtk_css_selector_matches (ruleset->selector, node); if (found != !!should_match) { g_error ("expected rule '%s' to %s, but it %s", @@ -453,7 +453,6 @@ gtk_css_style_provider_lookup (GtkStyleProvider *provider, GtkCssProvider *css_provider = GTK_CSS_PROVIDER (provider); GtkCssProviderPrivate *priv = gtk_css_provider_get_instance_private (css_provider); GtkCssRuleset *ruleset; - GtkCssMatcher matcher; guint j; int i; GPtrArray *tree_rules; @@ -461,12 +460,10 @@ gtk_css_style_provider_lookup (GtkStyleProvider *provider, if (_gtk_css_selector_tree_is_empty (priv->tree)) return; - _gtk_css_matcher_node_init (&matcher, node); - - tree_rules = _gtk_css_selector_tree_match_all (priv->tree, &matcher); + tree_rules = _gtk_css_selector_tree_match_all (priv->tree, node); if (tree_rules) { - verify_tree_match_results (css_provider, &matcher, tree_rules); + verify_tree_match_results (css_provider, node, tree_rules); for (i = tree_rules->len - 1; i >= 0; i--) { @@ -497,7 +494,7 @@ gtk_css_style_provider_lookup (GtkStyleProvider *provider, } if (change) - *change = _gtk_css_selector_tree_get_change_all (priv->tree, &matcher); + *change = _gtk_css_selector_tree_get_change_all (priv->tree, node); } static void |