[gtk+/wip/css-position: 5/5] cssmatcher: Make nth-child(odd) work on first line



commit c60a7f1ad129a6d7fc8243ad2e81d58084d399a8
Author: Benjamin Otte <otte redhat com>
Date:   Mon Jul 6 04:35:59 2015 +0200

    cssmatcher: Make nth-child(odd) work on first line
    
    .. instead of only on 3rd, 5th, 7th, ...

 gtk/gtkcssmatcher.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcssmatcher.c b/gtk/gtkcssmatcher.c
index a152327..59d6135 100644
--- a/gtk/gtkcssmatcher.c
+++ b/gtk/gtkcssmatcher.c
@@ -208,7 +208,7 @@ gtk_css_matcher_widget_path_has_position (const GtkCssMatcher *matcher,
   if (x % a)
     return FALSE;
 
-  return x / a > 0;
+  return x / a >= 0;
 }
 
 static const GtkCssMatcherClass GTK_CSS_MATCHER_WIDGET_PATH = {
@@ -381,7 +381,7 @@ gtk_css_matcher_node_nth_child (GtkCssNode *node,
   if (x % a)
     return FALSE;
 
-  return x / a > 0;
+  return x / a >= 0;
 }
 
 static gboolean


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