From d79a44c1afaea14cd8442df61631154fe0bdd441 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 24 Jan 2015 20:57:17 +0100 Subject: stylecontext: Get rid of create_query_path() Move that functionality into GtkCssNode. --- gtk/gtkcsspathnode.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'gtk/gtkcsspathnode.c') diff --git a/gtk/gtkcsspathnode.c b/gtk/gtkcsspathnode.c index 85358b4666..39a2f073a1 100644 --- a/gtk/gtkcsspathnode.c +++ b/gtk/gtkcsspathnode.c @@ -26,11 +26,23 @@ static GtkWidgetPath * gtk_css_path_node_real_create_widget_path (GtkCssNode *node) { GtkCssPathNode *path_node = GTK_CSS_PATH_NODE (node); + GtkWidgetPath *path; + guint length; if (path_node->path == NULL) - return gtk_widget_path_new (); - - return gtk_widget_path_copy (path_node->path); + path = gtk_widget_path_new (); + else + path = gtk_widget_path_copy (path_node->path); + + length = gtk_widget_path_length (path); + if (length > 0) + { + gtk_css_node_declaration_add_to_widget_path (gtk_css_node_get_declaration (node), + path, + length - 1); + } + + return path; } static const GtkWidgetPath * -- cgit v1.2.1