css: Improve spec compliance of the radial gradient parser

The spec says:
"If <shape> is omitted, the ending shape defaults to a circle if the <size>
is a single <length>, and to an ellipse otherwise."

Make it so.
This commit is contained in:
Matthias Clasen 2016-11-07 15:40:21 -05:00
parent fa7d77d407
commit 2a5a94b260

View File

@ -323,10 +323,10 @@ gtk_css_image_radial_parse (GtkCssImage *image,
if (!has_shape)
{
if (radial->sizes[0] && radial->sizes[1])
radial->circle = FALSE;
else
if (radial->sizes[0] && !radial->sizes[1])
radial->circle = TRUE;
else
radial->circle = FALSE;
}
if (has_shape && radial->circle)