static gboolean gtk_css_style_needs_recreation (GtkCssStyle *style, GtkCssChange change) { /* Try to avoid invalidating if we can */ if (change & GTK_CSS_RADICAL_CHANGE) return TRUE; if (GTK_IS_CSS_ANIMATED_STYLE (style)) style = GTK_CSS_ANIMATED_STYLE (style)->style; if (gtk_css_static_style_get_change (GTK_CSS_STATIC_STYLE (style)) & change) return TRUE; else return FALSE; }
static gboolean may_be_stored_in_parent_cache (GtkCssStyle *style) { GtkCssChange change; change = gtk_css_static_style_get_change (GTK_CSS_STATIC_STYLE (style)); /* The cache is shared between all children of the parent, so if a * style depends on a sibling it is not independant of the child. */ if (change & GTK_CSS_CHANGE_ANY_SIBLING) return FALSE; /* Again, the cache is shared between all children of the parent. * If the position is relevant, no child has the same style. */ if (change & (GTK_CSS_CHANGE_NTH_CHILD | GTK_CSS_CHANGE_NTH_LAST_CHILD)) return FALSE; return TRUE; }