diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index 76b893745c..16337b59b9 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -2755,28 +2755,11 @@ static GtkWidgetPath * gtk_container_real_get_path_for_child (GtkContainer *container, GtkWidget *child) { - GtkStyleContext *context; GtkWidgetPath *path; - GList *classes; - GtkWidget *widget = (GtkWidget *)container; + GtkWidget *widget = GTK_WIDGET (container); - context = _gtk_widget_get_style_context (widget); path = _gtk_widget_create_path (widget); - /* Copy any permanent classes to the path */ - classes = gtk_style_context_list_classes (context); - - while (classes) - { - GList *cur; - - cur = classes; - classes = classes->next; - - gtk_widget_path_iter_add_class (path, -1, cur->data); - g_list_free_1 (cur); - } - gtk_widget_path_append_for_widget (path, child); return path;