forked from AuroraMiddleware/gtk
cssselector: Support :not() for position pseudoclasses
This is simple now that the latest commit used the macro and autogenerates the SelectorClass to use.
This commit is contained in:
parent
88f28aee4f
commit
8b3f25ab96
@ -1536,14 +1536,6 @@ parse_selector_pseudo_class_nth_child (GtkCssParser *parser,
|
||||
{
|
||||
int a, b;
|
||||
|
||||
if (negate)
|
||||
{
|
||||
_gtk_css_parser_error (parser, "position pseudoclases not yet supported for :not()");
|
||||
if (selector)
|
||||
_gtk_css_selector_free (selector);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!_gtk_css_parser_try (parser, "(", TRUE))
|
||||
{
|
||||
_gtk_css_parser_error (parser, "Missing opening bracket for pseudo-class");
|
||||
@ -1648,7 +1640,8 @@ parse_selector_pseudo_class_nth_child (GtkCssParser *parser,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
selector = gtk_css_selector_new (>K_CSS_SELECTOR_PSEUDOCLASS_POSITION,
|
||||
selector = gtk_css_selector_new (negate ? >K_CSS_SELECTOR_NOT_PSEUDOCLASS_POSITION
|
||||
: >K_CSS_SELECTOR_PSEUDOCLASS_POSITION,
|
||||
selector);
|
||||
selector->position.type = type;
|
||||
selector->position.a = a;
|
||||
@ -1731,16 +1724,10 @@ parse_selector_pseudo_class (GtkCssParser *parser,
|
||||
selector);
|
||||
selector->state.state = pseudo_classes[i].state_flag;
|
||||
}
|
||||
else if (negate)
|
||||
{
|
||||
_gtk_css_parser_error (parser, "position pseudoclases not yet supported for :not()");
|
||||
if (selector)
|
||||
_gtk_css_selector_free (selector);
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
selector = gtk_css_selector_new (>K_CSS_SELECTOR_PSEUDOCLASS_POSITION,
|
||||
selector = gtk_css_selector_new (negate ? >K_CSS_SELECTOR_NOT_PSEUDOCLASS_POSITION
|
||||
: >K_CSS_SELECTOR_PSEUDOCLASS_POSITION,
|
||||
selector);
|
||||
selector->position.type = pseudo_classes[i].position_type;
|
||||
selector->position.a = pseudo_classes[i].position_a;
|
||||
|
Loading…
Reference in New Issue
Block a user