cssnode: Automatically recreate style on get_style() call

When the style is invalid, redo it.

Make this a vfunc, so the widget nodes can opt out.
This commit is contained in:
Benjamin Otte
2015-02-04 04:43:55 +01:00
parent 71813671ef
commit 219e52f7e1
6 changed files with 44 additions and 36 deletions

View File

@ -24,13 +24,10 @@
G_DEFINE_TYPE (GtkCssPathNode, gtk_css_path_node, GTK_TYPE_CSS_NODE)
static void
gtk_css_path_node_invalidate (GtkCssNode *node,
GtkCssChange change)
gtk_css_path_node_invalidate (GtkCssNode *node)
{
GtkCssPathNode *path_node = GTK_CSS_PATH_NODE (node);
gtk_css_node_set_style (node, NULL);
if (path_node->context)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;