summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkcssbgsizevalue.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk/gtkcssbgsizevalue.c b/gtk/gtkcssbgsizevalue.c
index b5da0677d0..3e25ded758 100644
--- a/gtk/gtkcssbgsizevalue.c
+++ b/gtk/gtkcssbgsizevalue.c
@@ -60,6 +60,16 @@ gtk_css_value_bg_size_compute (GtkCssValue *value,
if (value->y)
y = _gtk_css_value_compute (value->y, property_id, provider, style, parent_style);
+ if (x == value->x && y == value->y)
+ {
+ if (x)
+ _gtk_css_value_unref (x);
+ if (y)
+ _gtk_css_value_unref (y);
+
+ return _gtk_css_value_ref (value);
+ }
+
return _gtk_css_bg_size_value_new (value->x ? x : NULL,
value->y ? y : NULL);
}