diff options
author | Benjamin Otte <otte@redhat.com> | 2016-02-12 04:40:35 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-02-13 04:49:07 +0100 |
commit | e2d966eda52ed8833ebdafdc7d6d43284a503453 (patch) | |
tree | 4aa0b17ebc0bb016d20f7273898a33e3c46c2ec2 /gtk/gtkcssshorthandpropertyimpl.c | |
parent | 7b301fcece6a9f2a18afc2e5e2169da9b6545bbf (diff) | |
download | gtk+-e2d966eda52ed8833ebdafdc7d6d43284a503453.tar.gz |
cssnumbervalue: Remove gtk_css_number_value_get_unit()
This is in preparation for calc(), as calc(50% - 5px) is valid CSS
but has 2 units. Instead, add a function to query a value's dimension
(so we can differentiate lengths from numbers) and add a function to
query if the value contains percentages.
Diffstat (limited to 'gtk/gtkcssshorthandpropertyimpl.c')
-rw-r--r-- | gtk/gtkcssshorthandpropertyimpl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkcssshorthandpropertyimpl.c b/gtk/gtkcssshorthandpropertyimpl.c index 4e5495fca9..f10a180d3a 100644 --- a/gtk/gtkcssshorthandpropertyimpl.c +++ b/gtk/gtkcssshorthandpropertyimpl.c @@ -736,7 +736,7 @@ parse_one_animation (GtkCssShorthandProperty *shorthand, if (value == NULL) return FALSE; - if (_gtk_css_number_value_get_unit (value) == GTK_CSS_NUMBER) + if (gtk_css_number_value_get_dimension (value) == GTK_CSS_DIMENSION_NUMBER) values[1] = value; else if (values[2] == NULL) values[2] = value; |