[gtk+] css: Improve spec compliance of the radial gradient parser



commit 2a5a94b2606ffae08fce634e61c533830f54c3ec
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Nov 7 15:40:21 2016 -0500

    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.

 gtk/gtkcssimageradial.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcssimageradial.c b/gtk/gtkcssimageradial.c
index 1d4b99b..e22d9b8 100644
--- a/gtk/gtkcssimageradial.c
+++ b/gtk/gtkcssimageradial.c
@@ -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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]