[gtk+/gtk-style-context: 166/533] GtkCssProvider: Immediately bail out if GType couldn't be resolved.



commit 1a46fa06dccfa8f12dd944fe68a44f49781fd5fb
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Aug 4 11:42:08 2010 +0200

    GtkCssProvider: Immediately bail out if GType couldn't be resolved.

 gtk/gtkcssprovider.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 8deae7e..692de78 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -444,14 +444,16 @@ compare_selector (GtkWidgetPath *path,
       match = compare_selector_element (path, i, elem, &elem_score);
       i++;
 
-      if (!match && elem->combinator == COMBINATOR_DESCENDANT)
+      if (!match &&
+          elem->elem_type != SELECTOR_TYPE_NAME &&
+          elem->combinator == COMBINATOR_DESCENDANT)
         {
           /* With descendant combinators there may
            * be intermediate chidren in the hierarchy
            */
           match = TRUE;
         }
-      else
+      else if (match)
         elements = elements->next;
 
       if (match)



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