Commit a3ba7f0a authored by Benjamin Otte's avatar Benjamin Otte

css: Don't start transitions when the value didn't change

This stops us from starting a lot of useless transitions. And it's even
conformant with the CSS spec!
parent 11b3efbd
......@@ -294,6 +294,10 @@ gtk_css_animated_style_create_css_transitions (GSList *animations,
}
}
if (_gtk_css_value_equal (gtk_css_style_get_value (source, i),
gtk_css_style_get_value (base_style, i)))
continue;
animation = _gtk_css_transition_new (i,
gtk_css_style_get_value (source, i),
_gtk_css_array_value_get_nth (timing_functions, i),
......
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