summaryrefslogtreecommitdiff
path: root/src/parse/properties/border_color.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse/properties/border_color.c')
-rw-r--r--src/parse/properties/border_color.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/parse/properties/border_color.c b/src/parse/properties/border_color.c
index 28d30b7..60b401e 100644
--- a/src/parse/properties/border_color.c
+++ b/src/parse/properties/border_color.c
@@ -28,15 +28,16 @@
* If the input is invalid, then \a *ctx remains unchanged.
*/
css_error css__parse_border_color(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;
uint16_t side_val[4];
uint32_t side_color[4];
uint32_t side_count = 0;
+ enum flag_value flag_value;
css_error error;
/* Firstly, handle inherit */
@@ -44,20 +45,26 @@ css_error css__parse_border_color(css_language *c,
if (token == NULL)
return CSS_INVALID;
- if (is_css_inherit(c, token)) {
- error = css_stylesheet_style_inherit(result, CSS_PROP_BORDER_TOP_COLOR);
+ 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_BORDER_TOP_COLOR);
if (error != CSS_OK)
return error;
- error = css_stylesheet_style_inherit(result, CSS_PROP_BORDER_RIGHT_COLOR);
+ error = css_stylesheet_style_flag_value(result, flag_value,
+ CSS_PROP_BORDER_RIGHT_COLOR);
if (error != CSS_OK)
return error;
- error = css_stylesheet_style_inherit(result, CSS_PROP_BORDER_BOTTOM_COLOR);
+ error = css_stylesheet_style_flag_value(result, flag_value,
+ CSS_PROP_BORDER_BOTTOM_COLOR);
if (error != CSS_OK)
return error;
- error = css_stylesheet_style_inherit(result, CSS_PROP_BORDER_LEFT_COLOR);
+ error = css_stylesheet_style_flag_value(result, flag_value,
+ CSS_PROP_BORDER_LEFT_COLOR);
if (error == CSS_OK)
parserutils_vector_iterate(vector, ctx);