cssnode: Change get_style_provider() vfunc

Instead of always returning a provider, allow the vfunc to return NULL
to mane "use same provider as parent". This allows a bunch of
optimizations.
This commit is contained in:
Benjamin Otte
2015-02-17 15:18:32 +01:00
parent c0f6e746a0
commit 16b8972bee
4 changed files with 23 additions and 8 deletions

View File

@ -262,7 +262,7 @@ gtk_css_widget_node_get_style_provider (GtkCssNode *node)
GtkCssWidgetNode *widget_node = GTK_CSS_WIDGET_NODE (node);
if (widget_node->widget == NULL)
return GTK_CSS_NODE_CLASS (gtk_css_widget_node_parent_class)->get_style_provider (node);
return NULL;
return gtk_style_context_get_style_provider (gtk_widget_get_style_context (widget_node->widget));
}