Commit 4b2cdb37 authored by Benjamin Otte's avatar Benjamin Otte

cssnode: Remove timestamp from gtk_css_node_validate()

GtkCssNode knows its own timestamp.
parent dbe5058b
......@@ -1847,8 +1847,7 @@ gtk_container_idle_sizer (GdkFrameClock *clock,
if (container->priv->restyle_pending)
{
container->priv->restyle_pending = FALSE;
gtk_css_node_validate (gtk_widget_get_css_node (GTK_WIDGET (container)),
gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock (GTK_WIDGET (container))));
gtk_css_node_validate (gtk_widget_get_css_node (GTK_WIDGET (container)));
}
/* we may be invoked with a container_resize_queue of NULL, because
......
......@@ -824,8 +824,8 @@ gtk_css_node_invalidate (GtkCssNode *cssnode,
}
void
gtk_css_node_validate (GtkCssNode *cssnode,
gint64 timestamp)
gtk_css_node_validate_internal (GtkCssNode *cssnode,
gint64 timestamp)
{
GtkCssNode *child;
GtkCssStyle *new_style;
......@@ -873,10 +873,20 @@ gtk_css_node_validate (GtkCssNode *cssnode,
child = gtk_css_node_get_next_sibling (child))
{
if (child->visible)
gtk_css_node_validate (child, timestamp);
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);
}
gboolean
gtk_css_node_init_matcher (GtkCssNode *cssnode,
GtkCssMatcher *matcher)
......
......@@ -148,8 +148,7 @@ void gtk_css_node_invalidate_frame_clock
gboolean just_timestamp);
void gtk_css_node_invalidate (GtkCssNode *cssnode,
GtkCssChange change);
void gtk_css_node_validate (GtkCssNode *cssnode,
gint64 timestamp);
void gtk_css_node_validate (GtkCssNode *cssnode);
void gtk_css_node_set_invalid (GtkCssNode *node,
gboolean invalid);
......
......@@ -5847,8 +5847,7 @@ gtk_window_show (GtkWidget *widget)
need_resize = _gtk_widget_get_alloc_needed (widget) || !gtk_widget_get_realized (widget);
gtk_css_node_validate (gtk_widget_get_css_node (widget),
g_get_monotonic_time ());
gtk_css_node_validate (gtk_widget_get_css_node (widget));
if (need_resize)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment