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



commit d5ab0492b72daf26b6047ba702dc39dfab25ac09
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]