diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2022-08-13 16:23:56 +0100 |
---|---|---|
committer | Michael Drake <mdrake.unique@gmail.com> | 2022-08-29 13:49:20 +0100 |
commit | 2504bb6f6414ae36c036a84d21f7821178dc58ee (patch) | |
tree | 8c6573ae9fe6ebd8af7ff8eead85c387557a5c3b /src/parse/properties/font.c | |
parent | 0997e85ec5f14bd0d6959b9201fcd3845b224747 (diff) | |
download | libcss-2504bb6f6414ae36c036a84d21f7821178dc58ee.tar.gz libcss-2504bb6f6414ae36c036a84d21f7821178dc58ee.tar.bz2 |
Parse: Nongenerated properties: Explicit defaults
Diffstat (limited to 'src/parse/properties/font.c')
-rw-r--r-- | src/parse/properties/font.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/parse/properties/font.c b/src/parse/properties/font.c index 5010242..7ce9701 100644 --- a/src/parse/properties/font.c +++ b/src/parse/properties/font.c @@ -243,6 +243,7 @@ css_error css__parse_font(css_language *c, css_style *size_style; css_style *line_height_style; css_style *family_style; + enum flag_value flag_value; int svw; /* Firstly, handle inherit */ @@ -250,28 +251,36 @@ css_error css__parse_font(css_language *c, if (token == NULL) return CSS_INVALID; - if (is_css_inherit(c, token)) { - error = css_stylesheet_style_inherit(result, CSS_PROP_FONT_STYLE); + 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_FONT_STYLE); if (error != CSS_OK) return error; - error = css_stylesheet_style_inherit(result, CSS_PROP_FONT_VARIANT); + error = css_stylesheet_style_flag_value(result, flag_value, + CSS_PROP_FONT_VARIANT); if (error != CSS_OK) return error; - error = css_stylesheet_style_inherit(result, CSS_PROP_FONT_WEIGHT); + error = css_stylesheet_style_flag_value(result, flag_value, + CSS_PROP_FONT_WEIGHT); if (error != CSS_OK) return error; - error = css_stylesheet_style_inherit(result, CSS_PROP_FONT_SIZE); + error = css_stylesheet_style_flag_value(result, flag_value, + CSS_PROP_FONT_SIZE); if (error != CSS_OK) return error; - error = css_stylesheet_style_inherit(result, CSS_PROP_LINE_HEIGHT); + error = css_stylesheet_style_flag_value(result, flag_value, + CSS_PROP_LINE_HEIGHT); if (error != CSS_OK) return error; - error = css_stylesheet_style_inherit(result, CSS_PROP_FONT_FAMILY); + error = css_stylesheet_style_flag_value(result, flag_value, + CSS_PROP_FONT_FAMILY); if (error == CSS_OK) parserutils_vector_iterate(vector, ctx); |