mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
css: Fix animation-direction parsing
We were parsig "alternate-reverse" as "alternate" and then complaining about the "-reverse" junk at the end of the value.
This commit is contained in:
parent
cb1ac0c056
commit
b6aecca71c
@ -524,11 +524,14 @@ _gtk_css_direction_value_new (GtkCssDirection direction)
|
||||
GtkCssValue *
|
||||
_gtk_css_direction_value_try_parse (GtkCssParser *parser)
|
||||
{
|
||||
guint i;
|
||||
int i;
|
||||
|
||||
g_return_val_if_fail (parser != NULL, NULL);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (direction_values); i++)
|
||||
/* need to parse backwards here, otherwise "alternate" will also match "alternate-reverse".
|
||||
* Our parser rocks!
|
||||
*/
|
||||
for (i = G_N_ELEMENTS (direction_values) - 1; i >= 0; i--)
|
||||
{
|
||||
if (_gtk_css_parser_try (parser, direction_values[i].name, TRUE))
|
||||
return _gtk_css_value_ref (&direction_values[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user