Commit 775e277a authored by Benjamin Otte's avatar Benjamin Otte
Browse files

widget: Add classes to widget path even if no style context exists yet

This removes leftover code from when classes where added to the style
Now that they get added directly to css nodes, the classes can exist
without a style context.
parent 0d407bcd
...@@ -16361,6 +16361,8 @@ gint ...@@ -16361,6 +16361,8 @@ gint
gtk_widget_path_append_for_widget (GtkWidgetPath *path, gtk_widget_path_append_for_widget (GtkWidgetPath *path,
GtkWidget *widget) GtkWidget *widget)
{ {
const GQuark *classes;
guint n_classes, i;
gint pos; gint pos;
g_return_val_if_fail (path != NULL, 0); g_return_val_if_fail (path != NULL, 0);
...@@ -16374,19 +16376,10 @@ gtk_widget_path_append_for_widget (GtkWidgetPath *path, ...@@ -16374,19 +16376,10 @@ gtk_widget_path_append_for_widget (GtkWidgetPath *path,
gtk_widget_path_iter_set_state (path, pos, widget->priv->state_flags); gtk_widget_path_iter_set_state (path, pos, widget->priv->state_flags);
if (widget->priv->context) classes = gtk_css_node_list_classes (widget->priv->cssnode, &n_classes);
const GQuark *classes;
guint n_classes, i;
/* Also add any persistent classes in for (i = n_classes; i-- > 0;)
* the style context the widget path gtk_widget_path_iter_add_qclass (path, pos, classes[i]);
classes = gtk_css_node_list_classes (widget->priv->cssnode, &n_classes);
for (i = n_classes; i-- > 0;)
gtk_widget_path_iter_add_qclass (path, pos, classes[i]);
return pos; return pos;
} }
Supports Markdown
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