forked from AuroraMiddleware/gtk
Fix parsing of some css properties
Our property parser stops at the first match when looking for enums, so we need to order our values so that we don't end up with prefixes of longer names being found first. I noticed this when the parser tried to interpret background-blend-mode: color-burn; as "color, with junk at the end". It also affects animation-direction, which is also fixed here.
This commit is contained in:
parent
34986231f4
commit
3c4be3c912
@ -137,9 +137,9 @@ static const GtkCssValueClass GTK_CSS_VALUE_BLEND_MODE = {
|
||||
};
|
||||
|
||||
static GtkCssValue blend_mode_values[] = {
|
||||
{ >K_CSS_VALUE_BLEND_MODE, 1, GTK_CSS_BLEND_MODE_COLOR, "color" },
|
||||
{ >K_CSS_VALUE_BLEND_MODE, 1, GTK_CSS_BLEND_MODE_COLOR_BURN, "color-burn" },
|
||||
{ >K_CSS_VALUE_BLEND_MODE, 1, GTK_CSS_BLEND_MODE_COLOR_DODGE, "color-dodge" },
|
||||
{ >K_CSS_VALUE_BLEND_MODE, 1, GTK_CSS_BLEND_MODE_COLOR, "color" },
|
||||
{ >K_CSS_VALUE_BLEND_MODE, 1, GTK_CSS_BLEND_MODE_DARKEN, "darken" },
|
||||
{ >K_CSS_VALUE_BLEND_MODE, 1, GTK_CSS_BLEND_MODE_DIFFERENCE, "difference" },
|
||||
{ >K_CSS_VALUE_BLEND_MODE, 1, GTK_CSS_BLEND_MODE_EXCLUSION, "exclusion" },
|
||||
@ -777,8 +777,8 @@ static const GtkCssValueClass GTK_CSS_VALUE_DIRECTION = {
|
||||
static GtkCssValue direction_values[] = {
|
||||
{ >K_CSS_VALUE_DIRECTION, 1, GTK_CSS_DIRECTION_NORMAL, "normal" },
|
||||
{ >K_CSS_VALUE_DIRECTION, 1, GTK_CSS_DIRECTION_REVERSE, "reverse" },
|
||||
{ >K_CSS_VALUE_DIRECTION, 1, GTK_CSS_DIRECTION_ALTERNATE, "alternate" },
|
||||
{ >K_CSS_VALUE_DIRECTION, 1, GTK_CSS_DIRECTION_ALTERNATE_REVERSE, "alternate-reverse" }
|
||||
{ >K_CSS_VALUE_DIRECTION, 1, GTK_CSS_DIRECTION_ALTERNATE_REVERSE, "alternate-reverse" },
|
||||
{ >K_CSS_VALUE_DIRECTION, 1, GTK_CSS_DIRECTION_ALTERNATE, "alternate" }
|
||||
};
|
||||
|
||||
GtkCssValue *
|
||||
|
Loading…
Reference in New Issue
Block a user