diff options
Diffstat (limited to 'src/parse/properties/clip.c')
-rw-r--r-- | src/parse/properties/clip.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/parse/properties/clip.c b/src/parse/properties/clip.c index 7862d4a..4bf653d 100644 --- a/src/parse/properties/clip.c +++ b/src/parse/properties/clip.c @@ -28,15 +28,16 @@ * If the input is invalid, then \a *ctx remains unchanged. */ css_error css__parse_clip(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; css_error error; const css_token *token; int num_lengths = 0; css_fixed length[4] = { 0 }; uint32_t unit[4] = { 0 }; + enum flag_value flag_value; bool match; /* FUNCTION(rect) [ [ IDENT(auto) | length ] CHAR(,)? ]{3} @@ -48,14 +49,12 @@ css_error css__parse_clip(css_language *c, return CSS_INVALID; } - if ((token->type == CSS_TOKEN_IDENT) && - (lwc_string_caseless_isequal( - token->idata, c->strings[INHERIT], - &match) == lwc_error_ok && match)) { - error = css__stylesheet_style_appendOPV(result, - CSS_PROP_CLIP, - FLAG_INHERIT, - 0); + 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_CLIP); + } else if ((token->type == CSS_TOKEN_IDENT) && (lwc_string_caseless_isequal( token->idata, c->strings[AUTO], |