Merge branch 'wip/alice/css' into 'main'

CSS fixes and more tests

See merge request GNOME/gtk!7345
This commit is contained in:
Matthias Clasen 2024-06-05 20:54:12 +00:00
commit 7291a21a85
27 changed files with 365 additions and 30 deletions

View File

@ -225,6 +225,60 @@ gtk_css_color_space_get_coord_name (GtkCssColorSpace color_space,
}
}
void
gtk_css_color_space_get_coord_range (GtkCssColorSpace color_space,
gboolean legacy_rgb_scale,
guint coord,
float *lower,
float *upper)
{
if (coord == 3)
{
*lower = 0;
*upper = 1;
return;
}
switch (color_space)
{
case GTK_CSS_COLOR_SPACE_SRGB:
*lower = 0;
*upper = legacy_rgb_scale ? 255 : 1;
return;
case GTK_CSS_COLOR_SPACE_SRGB_LINEAR:
*lower = 0;
*upper = 1;
return;
case GTK_CSS_COLOR_SPACE_HSL:
case GTK_CSS_COLOR_SPACE_HWB:
switch (coord)
{
case 0: *lower = *upper = NAN; return;
case 1:
case 2: *lower = 0; *upper = 100; return;
default: g_assert_not_reached ();
}
case GTK_CSS_COLOR_SPACE_OKLAB:
switch (coord)
{
case 0: *lower = 0; *upper = 1; return;
case 1:
case 2: *lower = -0.4; *upper = 0.4; return;
default: g_assert_not_reached ();
}
case GTK_CSS_COLOR_SPACE_OKLCH:
switch (coord)
{
case 0: *lower = 0; *upper = 1; return;
case 1: *lower = 0; *upper = 0.4; return;
case 2: *lower = *upper = NAN; return;
default: g_assert_not_reached ();
}
default:
g_assert_not_reached ();
}
}
static gboolean
color_space_is_polar (GtkCssColorSpace color_space)
{

View File

@ -114,6 +114,12 @@ void gtk_css_color_interpolate (const GtkCssColor *from,
const char * gtk_css_color_space_get_coord_name (GtkCssColorSpace color_space,
guint coord);
void gtk_css_color_space_get_coord_range (GtkCssColorSpace color_space,
gboolean legacy_rgb_scale,
guint coord,
float *lower,
float *upper);
gboolean gtk_css_color_interpolation_method_parse (GtkCssParser *parser,
GtkCssColorSpace *in,
GtkCssHueInterpolation *interp);

View File

@ -593,6 +593,49 @@ apply_color_mix (GtkCssColorSpace in,
missing);
}
static GtkCssValue *
resolve_relative (GtkCssValue *values[4],
GtkCssColorSpace color_space,
gboolean legacy_rgb_scale)
{
float v[4];
gboolean m[4];
for (guint i = 0; i < 4; i++)
{
if (values[i])
{
float lower, upper;
gtk_css_color_space_get_coord_range (color_space, legacy_rgb_scale,
i, &lower, &upper);
m[i] = FALSE;
v[i] = gtk_css_number_value_get_canonical (values[i], upper - lower);
if (gtk_css_number_value_has_percent (values[i]))
v[i] += lower;
}
else
{
m[i] = TRUE;
v[i] = 0;
}
}
if (color_space == GTK_CSS_COLOR_SPACE_SRGB &&
legacy_rgb_scale)
{
v[0] /= 255.;
v[1] /= 255.;
v[2] /= 255.;
}
v[3] = CLAMP (v[3], 0, 1); /* clamp alpha */
return gtk_css_color_value_new_color (color_space, FALSE, v, m);
}
static GtkCssValue *
gtk_css_color_value_do_resolve (GtkCssValue *color,
guint property_id,
@ -613,40 +656,24 @@ gtk_css_color_value_do_resolve (GtkCssValue *color,
case COLOR_TYPE_RELATIVE:
{
float v[4];
gboolean m[4];
GtkCssValue *vals[4];
for (guint i = 0; i < 4; i++)
{
if (color->relative.values[i])
{
GtkCssValue *val;
m[i] = FALSE;
val = gtk_css_value_compute (color->relative.values[i], property_id, context);
v[i] = gtk_css_number_value_get_canonical (val, 1);
gtk_css_value_unref (val);
}
vals[i] = gtk_css_value_compute (color->relative.values[i], property_id, context);
else
vals[i] = NULL;
}
value = resolve_relative (vals, color->relative.color_space, color->relative.legacy_srgb);
for (guint i = 0; i < 4; i++)
{
m[i] = TRUE;
v[i] = 0;
if (vals[i])
gtk_css_value_unref (vals[i]);
}
}
if (color->relative.color_space == GTK_CSS_COLOR_SPACE_SRGB &&
color->relative.legacy_srgb)
{
v[0] /= 255.;
v[1] /= 255.;
v[2] /= 255.;
}
v[3] = CLAMP (v[3], 0, 1); /* clamp alpha */
value = gtk_css_color_value_new_color (color->relative.color_space, FALSE, v, m);
}
break;
case COLOR_TYPE_NAME:
@ -852,6 +879,25 @@ gtk_css_color_value_new_relative (GtkCssValue *origin,
GtkCssValue *values[4])
{
GtkCssValue *value;
gboolean computed = TRUE;
if (!gtk_css_value_is_computed (origin))
computed = FALSE;
if (!computed)
{
for (guint i = 0; i < 4; i++)
{
if (values[i] && !gtk_css_value_is_computed (values[i]))
{
computed = FALSE;
break;
}
}
}
if (computed)
return resolve_relative (values, color_space, legacy_srgb);
value = gtk_css_value_alloc (&GTK_CSS_VALUE_COLOR,
sizeof (GtkCssValue) + sizeof (GtkCssValue *) * 3);
@ -1432,7 +1478,11 @@ parse_ok_ab_value (GtkCssParser *parser,
if (data->values[idx] == NULL)
return FALSE;
data->v[idx] = gtk_css_number_value_get_canonical (data->values[idx], 0.4);
data->v[idx] = gtk_css_number_value_get_canonical (data->values[idx], 0.8);
/* gtk_css_number_value_get_canonical() doesn't let us specify what 0% is */
if (gtk_css_number_value_has_percent (data->values[idx]))
data->v[idx] -= 0.4;
}
return TRUE;
@ -1639,6 +1689,7 @@ parse_color_function (GtkCssParser *self,
{
data->ctx.color = gtk_css_color_value_parse (self);
data->syntax = COLOR_SYNTAX_MODERN;
data->serialize_as_rgb = FALSE;
}
arg = 0;

View File

@ -1,3 +1,4 @@
at-invalid-12.css:1:21-25: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-invalid-12.css:1:25-29: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-invalid-12.css:1:31-36: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-invalid-12.css:1:38-44: error: GTK_CSS_PARSER_ERROR_SYNTAX

View File

@ -1,2 +1,3 @@
at-invalid-13.css:1:21-25: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-invalid-13.css:1:25-30: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-invalid-13.css:1:32-35: error: GTK_CSS_PARSER_ERROR_SYNTAX

View File

@ -1 +1,2 @@
at-invalid-14.css:1:21-25: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-invalid-14.css:1:25-28: error: GTK_CSS_PARSER_ERROR_SYNTAX

View File

@ -1,3 +1,4 @@
at-invalid-15.css:1:21-25: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-invalid-15.css:1:25-30: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-invalid-15.css:1:32-36: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-invalid-15.css:1:36-37: error: GTK_CSS_PARSER_ERROR_SYNTAX

View File

@ -1,2 +1,3 @@
at-invalid-16.css:1:21-25: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-invalid-16.css:1:25-30: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-invalid-16.css:1:30-31: error: GTK_CSS_PARSER_ERROR_SYNTAX

View File

@ -1 +1,2 @@
at-invalid-17.css:1:21-25: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-invalid-17.css:1:25-26: error: GTK_CSS_PARSER_ERROR_SYNTAX

View File

@ -0,0 +1 @@
at-valid-10.css:1:21-29: error: GTK_CSS_PARSER_WARNING_DEPRECATED

View File

@ -1 +1,2 @@
at-valid-11.css:1:21-28: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-valid-11.css:1:29-34: error: GTK_CSS_PARSER_WARNING_DEPRECATED

View File

@ -1 +1,2 @@
at-valid-12.css:1:21-27: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-valid-12.css:1:27-32: error: GTK_CSS_PARSER_WARNING_DEPRECATED

View File

@ -1 +1,2 @@
at-valid-13.css:1:21-27: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-valid-13.css:1:27-32: error: GTK_CSS_PARSER_WARNING_DEPRECATED

View File

@ -1,2 +1,3 @@
at-valid-14.css:1:21-25: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-valid-14.css:1:25-30: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-valid-14.css:1:32-36: error: GTK_CSS_PARSER_WARNING_DEPRECATED

View File

@ -1 +1,4 @@
at-valid-16.css:1:21-25: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-valid-16.css:1:25-31: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-valid-16.css:1:46-50: error: GTK_CSS_PARSER_WARNING_DEPRECATED
at-valid-16.css:1:69-74: error: GTK_CSS_PARSER_WARNING_DEPRECATED

View File

@ -1,94 +1,175 @@
background-shorthand.css:10:273-278: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:34:44-50: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:38:153-159: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:46:163-168: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:78:98-104: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:94:53-59: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:110:110-116: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:118:38-43: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:150:360-366: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:158:89-94: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:170:173-179: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:182:15-21: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:186:185-191: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:194:316-321: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:214:122-127: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:222:381-386: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:226:48-53: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:238:214-219: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:246:88-93: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:266:15-21: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:290:683-689: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:298:182-188: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:306:15-20: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:330:34-40: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:342:205-211: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:346:358-363: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:370:116-122: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:374:31-36: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:410:220-226: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:422:96-101: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:430:719-724: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:446:252-257: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:458:153-158: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:498:46-51: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:530:181-187: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:546:201-206: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:562:260-265: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:566:15-21: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:594:73-79: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:598:396-402: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:618:801-806: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:626:15-21: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:646:86-91: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:666:279-284: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:698:176-182: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:726:306-312: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:738:355-360: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:742:194-199: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:798:95-100: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:802:147-153: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:822:217-223: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:826:75-80: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:854:15-20: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:862:76-81: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:866:116-121: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:874:517-522: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:886:758-764: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:894:98-103: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:898:157-162: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:906:225-230: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:914:199-205: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:954:212-218: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:958:362-368: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:974:470-476: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:986:712-717: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:994:304-309: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1006:43-49: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1042:196-202: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1050:822-828: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1062:240-246: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1066:201-207: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1078:542-547: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1090:719-724: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1102:225-231: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1106:54-60: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1110:586-591: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1118:109-115: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1142:184-190: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1146:127-132: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1178:178-184: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1238:216-222: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1242:261-266: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1274:84-90: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1286:67-73: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1306:24-29: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1314:393-398: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1318:625-631: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1334:180-186: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1350:318-324: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1378:180-186: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1398:283-288: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1414:236-241: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1418:268-273: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1438:406-411: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1442:695-701: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1446:102-107: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1482:94-99: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1494:766-771: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1506:53-59: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1510:45-50: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1534:84-89: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1538:268-273: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1582:118-124: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1586:274-280: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1606:254-260: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1618:209-215: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1626:786-791: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1642:231-236: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1646:59-65: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1658:69-74: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1694:607-612: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1718:15-21: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1770:15-21: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1778:326-332: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1782:59-64: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1794:214-219: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1798:1081-1087: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1850:113-118: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1858:108-113: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1886:55-61: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1894:535-540: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1898:301-306: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1902:373-378: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1910:43-49: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1922:154-159: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1926:391-396: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1938:224-229: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1942:533-538: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1958:15-20: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1970:412-417: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1978:161-167: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:1994:202-207: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2014:314-320: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2030:303-309: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2050:600-606: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2082:32-38: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2102:15-21: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2110:547-552: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2138:356-361: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2146:288-294: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2162:189-195: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2174:204-209: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2198:505-511: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2218:122-128: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2226:15-21: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2266:59-64: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2270:324-330: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2278:305-310: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2286:71-76: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2290:106-111: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2294:52-58: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2334:133-138: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2366:112-118: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2374:489-494: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2378:1289-1295: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2386:197-202: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2414:15-20: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2418:15-21: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2454:173-178: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2470:527-532: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2478:31-37: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2506:49-54: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2514:156-162: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2522:181-186: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2538:15-21: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2550:65-71: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2562:369-374: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2586:583-588: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2598:574-579: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2602:247-252: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2622:109-114: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2638:138-144: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2646:34-39: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2662:63-68: error: GTK_CSS_PARSER_WARNING_DEPRECATED
background-shorthand.css:2674:24-29: error: GTK_CSS_PARSER_WARNING_DEPRECATED

View File

@ -1 +1,2 @@
border-crash-3.24.css:2:21-27: error: GTK_CSS_PARSER_WARNING_DEPRECATED
border-crash-3.24.css:3:3-10: error: GTK_CSS_PARSER_ERROR_SYNTAX

View File

@ -123,3 +123,11 @@ ad {
ae {
color: hwb(200 10 90 / 0.5);
}
af {
color: oklab(0% 0% 0% / 0%);
}
ag {
color: oklab(100% 100% 100% / 100%);
}

View File

@ -1 +1,6 @@
color.css:52:10-18: error: GTK_CSS_PARSER_WARNING_DEPRECATED
color.css:56:10-17: error: GTK_CSS_PARSER_WARNING_DEPRECATED
color.css:60:10-16: error: GTK_CSS_PARSER_WARNING_DEPRECATED
color.css:64:10-16: error: GTK_CSS_PARSER_WARNING_DEPRECATED
color.css:68:10-14: error: GTK_CSS_PARSER_WARNING_DEPRECATED
color.css:72:10-18: error: GTK_CSS_PARSER_WARNING_DEPRECATED

View File

@ -123,3 +123,11 @@ ad {
ae {
color: rgba(26,26,26,0.5);
}
af {
color: oklab(0 -0.4 -0.4 / 0);
}
ag {
color: oklab(1 0.4 0.4);
}

View File

@ -1,2 +1,6 @@
currentcolor-everywhere.css:8:10-16: error: GTK_CSS_PARSER_WARNING_DEPRECATED
currentcolor-everywhere.css:12:10-16: error: GTK_CSS_PARSER_WARNING_DEPRECATED
currentcolor-everywhere.css:16:10-14: error: GTK_CSS_PARSER_WARNING_DEPRECATED
currentcolor-everywhere.css:16:28-39: error: GTK_CSS_PARSER_WARNING_DEPRECATED
currentcolor-everywhere.css:20:10-14: error: GTK_CSS_PARSER_WARNING_DEPRECATED
currentcolor-everywhere.css:20:14-25: error: GTK_CSS_PARSER_WARNING_DEPRECATED

View File

@ -1 +1,2 @@
declarations-valid-09.css:1:35-41: error: GTK_CSS_PARSER_WARNING_DEPRECATED
declarations-valid-09.css:1:41-50: error: GTK_CSS_PARSER_WARNING_DEPRECATED

View File

@ -102,23 +102,30 @@ test_data = [
'at-valid-06.css',
'at-valid-06.ref.css',
'at-valid-07.css',
'at-valid-07.errors',
'at-valid-08.css',
'at-valid-08.ref.css',
'at-valid-09.css',
'at-valid-09.ref.css',
'at-valid-10.css',
'at-valid-10.errors',
'at-valid-10.ref.css',
'at-valid-11.css',
'at-valid-11.errors',
'at-valid-11.ref.css',
'at-valid-12.css',
'at-valid-12.errors',
'at-valid-12.ref.css',
'at-valid-13.css',
'at-valid-13.errors',
'at-valid-13.ref.css',
'at-valid-14.css',
'at-valid-14.errors',
'at-valid-14.ref.css',
'at-valid-15.css',
'at-valid-15.ref.css',
'at-valid-16.css',
'at-valid-16.errors',
'at-valid-16.ref.css',
'at-valid-17.css',
'at-valid-18.css',
@ -473,6 +480,9 @@ test_data = [
'radial-positions.errors',
'radial-positions.ref.css',
'radial.ref.css',
'relative-color.css',
'relative-color.errors',
'relative-color.ref.css',
'resource-url.css',
'resource-url.ref.css',
'rotate3d-crash.css',

View File

@ -19,6 +19,46 @@ e {
color: rgb(from darkgoldenrod r g 100 / 50%);
}
e {
f {
color: rgb(from rgba(30,40,50,60) r g 100 / alpha);
}
g {
color: rgb(from currentColor r g 100 / 50%);
}
h {
color: rgb(from white 100% 100% 100% / 100%);
}
i {
color: color(from white srgb 100% 100% 100% / 100%);
}
j {
color: color(from white srgb-linear 100% 100% 100% / 100%);
}
k {
color: hsl(from white 0 100% 100% / 100%);
}
l {
color: hwb(from white 0 100% 0% / 100%);
}
m {
color: hwb(from white 0 0% 100% / 100%);
}
n {
color: oklch(from white 100% 100% 0 / 100%);
}
o {
color: oklab(from white 100% 0% 0% / 100%);
}
p {
color: oklab(from white 100% 100% 100% / 100%);
}

View File

@ -12,9 +12,49 @@ c {
}
e {
color: color(from rgb(184,134,11) srgb 184 134 100 / 50%);
color: color(srgb 0.721569 0.52549 0.392157 / 0.5);
}
e {
color: rgb(30,40,100);
f {
color: color(srgb 0.117647 0.156863 0.392157);
}
g {
color: color(from currentcolor srgb r g 100 / 50%);
}
h {
color: color(srgb 1 1 1);
}
i {
color: color(srgb 1 1 1);
}
j {
color: color(srgb-linear 1 1 1);
}
k {
color: color(srgb 1 1 1);
}
l {
color: color(srgb 1 1 1);
}
m {
color: color(srgb 0 0 0);
}
n {
color: oklch(1 0.4 0);
}
o {
color: oklab(1 -0.4 -0.4);
}
p {
color: oklab(1 0.4 0.4);
}

View File

@ -1,12 +1,24 @@
shadow.css:78:24-30: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:78:30-39: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:146:46-52: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:146:52-61: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:154:29-35: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:154:35-44: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:174:36-42: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:174:42-51: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:190:30-36: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:190:36-45: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:238:21-27: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:238:27-36: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:314:35-41: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:314:41-50: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:318:15-21: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:318:21-30: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:334:21-27: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:334:27-36: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:354:30-36: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:354:36-45: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:358:35-41: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:358:41-50: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:382:24-30: error: GTK_CSS_PARSER_WARNING_DEPRECATED
shadow.css:382:30-39: error: GTK_CSS_PARSER_WARNING_DEPRECATED

View File

@ -107,7 +107,7 @@ typedef struct {
static ValueTransitionTest tests[] = {
{ GTK_CSS_PROPERTY_COLOR, "transparent", "rgb(255,0,0)", 0.25, "rgba(255,0,0,0.25)" },
{ GTK_CSS_PROPERTY_COLOR, "alpha(red, 0.2)", "alpha(rgb(255,0,0),0.8)", 0.5, "rgba(255,0,0,0.5)" },
{ GTK_CSS_PROPERTY_COLOR, "rgb(from red r g b / 0.2)", "rgb(from rgb(255,0,0) r g b / 0.8)", 0.5, "rgba(255,0,0,0.5)" },
{ GTK_CSS_PROPERTY_BOX_SHADOW, "none", "2px 2px 10px 4px rgb(200,200,200)", 0.5, "1px 1px 5px 2px rgba(200,200,200,0.5)" },
{ GTK_CSS_PROPERTY_BOX_SHADOW, "2px 2px 10px 4px rgb(200,200,200)", "none", 0.5, "1px 1px 5px 2px rgba(200,200,200,0.5)" },
{ GTK_CSS_PROPERTY_BOX_SHADOW, "2px 2px 10px 4px rgb(200,200,200), 0px 10px 8px 6px rgb(200,100,0)", "none", 0.5, "1px 1px 5px 2px rgba(200,200,200,0.5), 0px 5px 4px 3px rgba(200,100,0,0.5)" },