cssnode: Clear widget path more aggressively

When recomputing CSS, we need a correct widget path in the fallback mode
where we're still using widget paths.
So we need to invalidate it everytime it actually changes, and not just
when emitting the style-updated signal.

Fixes css-match-regions reftest.
This commit is contained in:
Benjamin Otte
2015-03-24 04:14:28 +01:00
parent 59579576c6
commit fdc620cd56
3 changed files with 9 additions and 1 deletions

View File

@ -16400,14 +16400,18 @@ gtk_widget_get_path (GtkWidget *widget)
}
void
_gtk_widget_style_context_invalidated (GtkWidget *widget)
gtk_widget_clear_path (GtkWidget *widget)
{
if (widget->priv->path)
{
gtk_widget_path_free (widget->priv->path);
widget->priv->path = NULL;
}
}
void
_gtk_widget_style_context_invalidated (GtkWidget *widget)
{
if (gtk_widget_get_realized (widget))
g_signal_emit (widget, widget_signals[STYLE_UPDATED], 0);
else