summaryrefslogtreecommitdiff
path: root/gtk/gtkcssshorthandpropertyimpl.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-02-12 06:45:06 +0100
committerBenjamin Otte <otte@redhat.com>2016-02-13 04:49:08 +0100
commita52ecd2be61ee46b41267614484ed0401ac5cbc1 (patch)
tree09634a668945b829ac8c8a440102991191d7f4c0 /gtk/gtkcssshorthandpropertyimpl.c
parentb246d55472cdf7f8589a8cd8627e9dc4aead2fdd (diff)
downloadgtk+-a52ecd2be61ee46b41267614484ed0401ac5cbc1.tar.gz
css: Add gtk_css_number_value_can_parse()
Use it instead of _gtk_css_parser_has_number(). We need that once we introduce calc() support.
Diffstat (limited to 'gtk/gtkcssshorthandpropertyimpl.c')
-rw-r--r--gtk/gtkcssshorthandpropertyimpl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gtk/gtkcssshorthandpropertyimpl.c b/gtk/gtkcssshorthandpropertyimpl.c
index f10a180d3a..27ff25b9a4 100644
--- a/gtk/gtkcssshorthandpropertyimpl.c
+++ b/gtk/gtkcssshorthandpropertyimpl.c
@@ -68,7 +68,7 @@ parse_four_numbers (GtkCssShorthandProperty *shorthand,
for (i = 0; i < 4; i++)
{
- if (!_gtk_css_parser_has_number (parser))
+ if (!gtk_css_number_value_can_parse (parser))
break;
values[i] = _gtk_css_number_value_parse (parser, flags);
@@ -138,7 +138,7 @@ parse_border_radius (GtkCssShorthandProperty *shorthand,
for (i = 0; i < 4; i++)
{
- if (!_gtk_css_parser_has_number (parser))
+ if (!gtk_css_number_value_can_parse (parser))
break;
x[i] = _gtk_css_number_value_parse (parser,
GTK_CSS_POSITIVE_ONLY
@@ -165,7 +165,7 @@ parse_border_radius (GtkCssShorthandProperty *shorthand,
{
for (i = 0; i < 4; i++)
{
- if (!_gtk_css_parser_has_number (parser))
+ if (!gtk_css_number_value_can_parse (parser))
break;
y[i] = _gtk_css_number_value_parse (parser,
GTK_CSS_POSITIVE_ONLY
@@ -335,7 +335,7 @@ parse_border_side (GtkCssShorthandProperty *shorthand,
do
{
if (values[0] == NULL &&
- _gtk_css_parser_has_number (parser))
+ gtk_css_number_value_can_parse (parser))
{
values[0] = _gtk_css_number_value_parse (parser,
GTK_CSS_POSITIVE_ONLY
@@ -377,7 +377,7 @@ parse_border (GtkCssShorthandProperty *shorthand,
do
{
if (values[0] == NULL &&
- _gtk_css_parser_has_number (parser))
+ gtk_css_number_value_can_parse (parser))
{
values[0] = _gtk_css_number_value_parse (parser,
GTK_CSS_POSITIVE_ONLY
@@ -620,7 +620,7 @@ parse_one_transition (GtkCssShorthandProperty *shorthand,
{
/* the image part */
if (values[2] == NULL &&
- _gtk_css_parser_has_number (parser) && !_gtk_css_parser_begins_with (parser, '-'))
+ gtk_css_number_value_can_parse (parser) && !_gtk_css_parser_begins_with (parser, '-'))
{
GtkCssValue *number = _gtk_css_number_value_parse (parser, GTK_CSS_PARSE_TIME);
@@ -725,7 +725,7 @@ parse_one_animation (GtkCssShorthandProperty *shorthand,
values[1] = _gtk_css_number_value_new (HUGE_VAL, GTK_CSS_NUMBER);
}
else if ((values[1] == NULL || values[3] == NULL) &&
- _gtk_css_parser_has_number (parser))
+ gtk_css_number_value_can_parse (parser))
{
GtkCssValue *value;