stylecontext: Call get_style(), not create_style()

We want to ensure that the style is created properly.

This also allows making the create_Style() function private.
This commit is contained in:
Benjamin Otte 2015-02-23 03:06:02 +01:00
parent 092ff983f7
commit 776d99ac51
3 changed files with 3 additions and 5 deletions

View File

@ -177,7 +177,7 @@ store_in_global_parent_cache (GtkCssNode *node,
g_object_ref (style));
}
GtkCssStyle *
static GtkCssStyle *
gtk_css_node_create_style (GtkCssNode *cssnode)
{
const GtkCssNodeDeclaration *decl;

View File

@ -131,10 +131,8 @@ GList * gtk_css_node_list_regions (GtkCssNode *
const GtkCssNodeDeclaration *
gtk_css_node_get_declaration (GtkCssNode *cssnode);
GtkCssStyle * gtk_css_node_get_style (GtkCssNode *cssnode);
GtkCssStyle * gtk_css_node_create_style (GtkCssNode *cssnode);
void gtk_css_node_invalidate_style_provider
(GtkCssNode *cssnode);

View File

@ -525,7 +525,7 @@ gtk_style_context_lookup_style_for_state (GtkStyleContext *context,
node = gtk_css_transient_node_new (context->priv->cssnode);
gtk_css_node_set_parent (node, gtk_css_node_get_parent (context->priv->cssnode));
gtk_css_node_set_state (node, state);
values = gtk_css_node_create_style (node);
values = g_object_ref (gtk_css_node_get_style (node));
gtk_css_node_set_parent (node, NULL);
g_object_unref (node);