void gtk_css_node_validate_internal (GtkCssNode *cssnode, gint64 timestamp) { GtkCssNode *child; if (!cssnode->invalid) return; gtk_css_node_ensure_style (cssnode, timestamp); /* need to set to FALSE then to TRUE here to make it chain up */ gtk_css_node_set_invalid (cssnode, FALSE); if (!gtk_css_style_is_static (cssnode->style)) gtk_css_node_set_invalid (cssnode, TRUE); GTK_CSS_NODE_GET_CLASS (cssnode)->validate (cssnode); for (child = gtk_css_node_get_first_child (cssnode); child; child = gtk_css_node_get_next_sibling (child)) { if (child->visible) gtk_css_node_validate_internal (child, timestamp); } }
void gtk_css_node_validate (GtkCssNode *cssnode) { gint64 timestamp; timestamp = gtk_css_node_get_timestamp (cssnode); gtk_css_node_validate_internal (cssnode, timestamp); }
void gtk_css_node_validate_internal (GtkCssNode *cssnode, gint64 timestamp) { GtkCssNode *child; /* If you run your application with * GTK_DEBUG=no-css-cache * every invalidation will purge the cache and completely query * everything anew form the cache. This is slow (in particular * when animating), but useful for figuring out bugs. * * We achieve that by pretending that everything that could have * changed has and so we of course totally need to redo everything. * * Note that this also completely revalidates child widgets all * the time. */ #ifdef G_ENABLE_DEBUG if (GTK_DEBUG_CHECK (NO_CSS_CACHE)) cssnode->pending_changes |= GTK_CSS_CHANGE_ANY; #endif if (!cssnode->invalid) return; gtk_css_node_ensure_style (cssnode, timestamp); /* need to set to FALSE then to TRUE here to make it chain up */ gtk_css_node_set_invalid (cssnode, FALSE); if (!gtk_css_style_is_static (cssnode->style)) gtk_css_node_set_invalid (cssnode, TRUE); GTK_CSS_NODE_GET_CLASS (cssnode)->validate (cssnode); for (child = gtk_css_node_get_first_child (cssnode); child; child = gtk_css_node_get_next_sibling (child)) { if (child->visible) gtk_css_node_validate_internal (child, timestamp); } }