Commit d03caa46 authored by Carlos Garnacho's avatar Carlos Garnacho
Browse files

GtkCssProvider: Run through the widget path in the correct order.

Comparing a selector with a widget path was being done backwards since
the change to use GtkContainer::get_path_for_child().
parent 35a41bd8
......@@ -848,12 +848,11 @@ compare_selector (GtkWidgetPath *path,
GSList *elements = selector->elements;
gboolean match = TRUE;
guint64 score = 0;
guint len;
guint i = 0;
gint i;
len = gtk_widget_path_length (path);
i = gtk_widget_path_length (path) - 1;
while (elements && match && i < len)
while (elements && match && i >= 0)
{
SelectorElement *elem;
guint8 elem_score;
......@@ -874,7 +873,7 @@ compare_selector (GtkWidgetPath *path,
if (!match ||
(elem->elem_type == SELECTOR_GTYPE ||
elem->elem_type == SELECTOR_GLOB))
i++;
i--;
if (!match &&
elem->elem_type != SELECTOR_TYPE_NAME &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment