diff options
Diffstat (limited to 'src/parse/properties/flex_flow.c')
-rw-r--r-- | src/parse/properties/flex_flow.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/parse/properties/flex_flow.c b/src/parse/properties/flex_flow.c index e2d0e0c..a5e2926 100644 --- a/src/parse/properties/flex_flow.c +++ b/src/parse/properties/flex_flow.c @@ -29,10 +29,10 @@ */ css_error css__parse_flex_flow(css_language *c, - const parserutils_vector *vector, int *ctx, + const parserutils_vector *vector, int32_t *ctx, css_style *result) { - int orig_ctx = *ctx; + int32_t orig_ctx = *ctx; int prev_ctx; const css_token *token; css_error error; @@ -40,26 +40,28 @@ css_error css__parse_flex_flow(css_language *c, bool wrap = true; css_style *direction_style; css_style *wrap_style; + enum flag_value flag_value; /* Firstly, handle inherit */ token = parserutils_vector_peek(vector, *ctx); if (token == NULL) return CSS_INVALID; - - if (is_css_inherit(c, token)) { - error = css_stylesheet_style_inherit(result, + + flag_value = get_css_flag_value(c, token); + + if (flag_value != FLAG_VALUE__NONE) { + error = css_stylesheet_style_flag_value(result, flag_value, CSS_PROP_FLEX_DIRECTION); - if (error != CSS_OK) + if (error != CSS_OK) return error; - error = css_stylesheet_style_inherit(result, + error = css_stylesheet_style_flag_value(result, flag_value, CSS_PROP_FLEX_WRAP); - - if (error == CSS_OK) + if (error == CSS_OK) parserutils_vector_iterate(vector, ctx); return error; - } + } /* allocate styles */ error = css__stylesheet_style_create(c->sheet, &direction_style); |