forked from AuroraMiddleware/gtk
css: Remove gtk_css_ruleset_matches
This is only not needed anymore, and only the VERIFY_TREE code should access ->selector.
This commit is contained in:
parent
fd4712590a
commit
c10a0962cf
@ -1273,13 +1273,6 @@ gtk_css_ruleset_add (GtkCssRuleset *ruleset,
|
|||||||
ruleset->styles[i].section = NULL;
|
ruleset->styles[i].section = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
gtk_css_ruleset_matches (GtkCssRuleset *ruleset,
|
|
||||||
const GtkCssMatcher *matcher)
|
|
||||||
{
|
|
||||||
return _gtk_css_selector_matches (ruleset->selector, matcher);
|
|
||||||
}
|
|
||||||
|
|
||||||
static GtkCssChange
|
static GtkCssChange
|
||||||
gtk_css_ruleset_get_change (GtkCssRuleset *ruleset)
|
gtk_css_ruleset_get_change (GtkCssRuleset *ruleset)
|
||||||
{
|
{
|
||||||
@ -1419,6 +1412,7 @@ verify_tree_match_results (GtkCssProvider *provider,
|
|||||||
#ifdef VERIFY_TREE
|
#ifdef VERIFY_TREE
|
||||||
GtkCssProviderPrivate *priv = provider->priv;
|
GtkCssProviderPrivate *priv = provider->priv;
|
||||||
GtkCssRuleset *ruleset;
|
GtkCssRuleset *ruleset;
|
||||||
|
gboolean should_match;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
for (i = 0; i < priv->rulesets->len; i++)
|
for (i = 0; i < priv->rulesets->len; i++)
|
||||||
@ -1435,12 +1429,12 @@ verify_tree_match_results (GtkCssProvider *provider,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
should_match = _gtk_css_selector_matches (ruleset->selector, matcher);
|
||||||
if (found != !!gtk_css_ruleset_matches (ruleset, matcher))
|
if (found != !!should_match)
|
||||||
{
|
{
|
||||||
g_error ("expected rule '%s' to %s, but it %s\n",
|
g_error ("expected rule '%s' to %s, but it %s\n",
|
||||||
_gtk_css_selector_to_string (ruleset->selector),
|
_gtk_css_selector_to_string (ruleset->selector),
|
||||||
gtk_css_ruleset_matches (ruleset, matcher) ? "match" : "not match",
|
should_match ? "match" : "not match",
|
||||||
found ? "matched" : "didn't match");
|
found ? "matched" : "didn't match");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user