mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 06:21:14 +00:00
cssnumbervalue: Move early-out code to GtkCssValue
These checks make sense for all css values.
This commit is contained in:
parent
c9e972eecb
commit
e448fc41f3
@ -115,12 +115,6 @@ gtk_css_number_value_transition (GtkCssValue *start,
|
|||||||
{
|
{
|
||||||
GtkCssValue *result, *mul_start, *mul_end;
|
GtkCssValue *result, *mul_start, *mul_end;
|
||||||
|
|
||||||
if (progress == 0)
|
|
||||||
return _gtk_css_value_ref (start);
|
|
||||||
|
|
||||||
if (progress == 1)
|
|
||||||
return _gtk_css_value_ref (end);
|
|
||||||
|
|
||||||
if (start == end)
|
if (start == end)
|
||||||
return _gtk_css_value_ref (start);
|
return _gtk_css_value_ref (start);
|
||||||
|
|
||||||
|
@ -266,6 +266,9 @@ _gtk_css_value_transition (GtkCssValue *start,
|
|||||||
if (progress == 1)
|
if (progress == 1)
|
||||||
return _gtk_css_value_ref (end);
|
return _gtk_css_value_ref (end);
|
||||||
|
|
||||||
|
if (start == end)
|
||||||
|
return _gtk_css_value_ref (start);
|
||||||
|
|
||||||
#ifdef CSS_VALUE_ACCOUNTING
|
#ifdef CSS_VALUE_ACCOUNTING
|
||||||
get_accounting_data (start->class->type_name)->transitioned++;
|
get_accounting_data (start->class->type_name)->transitioned++;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user