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:
@ -107,7 +107,7 @@ gtk_css_path_node_get_style_provider (GtkCssNode *node)
|
||||
GtkCssPathNode *path_node = GTK_CSS_PATH_NODE (node);
|
||||
|
||||
if (path_node->context == NULL)
|
||||
return GTK_CSS_NODE_CLASS (gtk_css_path_node_parent_class)->get_style_provider (node);
|
||||
return NULL;
|
||||
|
||||
return gtk_style_context_get_style_provider (path_node->context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user