diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2022-08-15 20:15:58 +0100 |
---|---|---|
committer | Michael Drake <mdrake.unique@gmail.com> | 2022-08-29 13:49:20 +0100 |
commit | 166581e23cb6e1e6279f450635cd16a12f8b0ef2 (patch) | |
tree | 957ce75e15a34e4cd090dc489bd18b8c95b140a3 /src/select/select.c | |
parent | 2504bb6f6414ae36c036a84d21f7821178dc58ee (diff) | |
download | libcss-166581e23cb6e1e6279f450635cd16a12f8b0ef2.tar.gz |
Select: Make inherit flag handling aware of other default values
Diffstat (limited to 'src/select/select.c')
-rw-r--r-- | src/select/select.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/select/select.c b/src/select/select.c index 7d8195f..855a5cc 100644 --- a/src/select/select.c +++ b/src/select/select.c @@ -1294,7 +1294,7 @@ css_error css_select_style(css_select_ctx *ctx, void *node, * value. */ if (prop->set == false || (parent == NULL && - prop->inherit == true)) { + prop->explicit_default == FLAG_VALUE_INHERIT)) { error = set_initial(&state, i, CSS_PSEUDO_ELEMENT_NONE, parent); if (error != CSS_OK) @@ -1548,7 +1548,8 @@ css_error set_hint(css_select_state *state, css_hint *hint) existing->specificity = 0; existing->origin = CSS_ORIGIN_AUTHOR; existing->important = 0; - existing->inherit = (hint->status == 0); + existing->explicit_default = (hint->status == 0) ? + FLAG_VALUE_INHERIT : FLAG_VALUE__NONE; return CSS_OK; } @@ -2600,7 +2601,7 @@ css_error cascade_style(const css_style *style, css_select_state *state) } bool css__outranks_existing(uint16_t op, bool important, css_select_state *state, - bool inherit) + enum flag_value explicit_default) { prop_state *existing = &state->props[op][state->current_pseudo]; bool outranks = false; @@ -2695,7 +2696,7 @@ bool css__outranks_existing(uint16_t op, bool important, css_select_state *state existing->specificity = state->current_specificity; existing->origin = state->current_origin; existing->important = important; - existing->inherit = inherit; + existing->explicit_default = explicit_default; } return outranks; |