From dd74dbf4b1a8d27cb49855f067f65b722d65bd42 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 9 Feb 2021 23:38:11 +0000 Subject: implement the firt half of the css 3.1 simple predefined counter styles --- include/libcss/properties.h | 17 ++- src/bytecode/opcodes.h | 16 ++- src/parse/properties/utils.c | 116 +++++++--------- src/parse/propstrings.c | 14 ++ src/parse/propstrings.h | 3 + src/select/format_list_style.c | 227 ++++++++++++++++++++++++++++---- src/select/properties/list_style_type.c | 43 +++++- 7 files changed, 337 insertions(+), 99 deletions(-) diff --git a/include/libcss/properties.h b/include/libcss/properties.h index 577bed0..6f8a51c 100644 --- a/include/libcss/properties.h +++ b/include/libcss/properties.h @@ -606,7 +606,22 @@ enum css_list_style_type_e { CSS_LIST_STYLE_TYPE_GEORGIAN = 0xc, CSS_LIST_STYLE_TYPE_LOWER_ALPHA = 0xd, CSS_LIST_STYLE_TYPE_UPPER_ALPHA = 0xe, - CSS_LIST_STYLE_TYPE_NONE = 0xf + CSS_LIST_STYLE_TYPE_NONE = 0xf, + CSS_LIST_STYLE_TYPE_BINARY = 0x10, + CSS_LIST_STYLE_TYPE_OCTAL = 0x11, + CSS_LIST_STYLE_TYPE_LOWER_HEXADECIMAL = 0x12, + CSS_LIST_STYLE_TYPE_UPPER_HEXADECIMAL = 0x13, + CSS_LIST_STYLE_TYPE_ARABIC_INDIC = 0x14, + CSS_LIST_STYLE_TYPE_LOWER_ARMENIAN = 0x15, + CSS_LIST_STYLE_TYPE_UPPER_ARMENIAN = 0x16, + CSS_LIST_STYLE_TYPE_BENGALI = 0x17, + CSS_LIST_STYLE_TYPE_CAMBODIAN = 0x18, + CSS_LIST_STYLE_TYPE_KHMER = 0x19, + CSS_LIST_STYLE_TYPE_CJK_DECIMAL = 0x1a, + CSS_LIST_STYLE_TYPE_DEVANAGARI = 0x1b, + CSS_LIST_STYLE_TYPE_GUJARATI = 0x1c, + CSS_LIST_STYLE_TYPE_GURMUKHI = 0x1d + }; enum css_margin_e { diff --git a/src/bytecode/opcodes.h b/src/bytecode/opcodes.h index 82bf75f..b74e990 100644 --- a/src/bytecode/opcodes.h +++ b/src/bytecode/opcodes.h @@ -491,7 +491,21 @@ enum op_list_style_type { LIST_STYLE_TYPE_GEORGIAN = 0x000b, LIST_STYLE_TYPE_LOWER_ALPHA = 0x000c, LIST_STYLE_TYPE_UPPER_ALPHA = 0x000d, - LIST_STYLE_TYPE_NONE = 0x000e + LIST_STYLE_TYPE_NONE = 0x000e, + LIST_STYLE_TYPE_BINARY = 0x000f, + LIST_STYLE_TYPE_OCTAL = 0x0010, + LIST_STYLE_TYPE_LOWER_HEXADECIMAL = 0x0011, + LIST_STYLE_TYPE_UPPER_HEXADECIMAL = 0x0012, + LIST_STYLE_TYPE_ARABIC_INDIC = 0x0013, + LIST_STYLE_TYPE_LOWER_ARMENIAN = 0x0014, + LIST_STYLE_TYPE_UPPER_ARMENIAN = 0x0015, + LIST_STYLE_TYPE_BENGALI = 0x0016, + LIST_STYLE_TYPE_CAMBODIAN = 0x0017, + LIST_STYLE_TYPE_KHMER = 0x0018, + LIST_STYLE_TYPE_CJK_DECIMAL = 0x0019, + LIST_STYLE_TYPE_DEVANAGARI = 0x001a, + LIST_STYLE_TYPE_GUJARATI = 0x001b, + LIST_STYLE_TYPE_GURMUKHI = 0x001c }; enum op_margin { diff --git a/src/parse/properties/utils.c b/src/parse/properties/utils.c index 0e49853..a71e22d 100644 --- a/src/parse/properties/utils.c +++ b/src/parse/properties/utils.c @@ -29,77 +29,60 @@ css_error css__parse_list_style_type_value(css_language *c, const css_token *ident, uint16_t *value) { - bool match; - /* IDENT (disc, circle, square, decimal, decimal-leading-zero, * lower-roman, upper-roman, lower-greek, lower-latin, * upper-latin, armenian, georgian, lower-alpha, upper-alpha, * none) */ - if ((lwc_string_caseless_isequal( - ident->idata, c->strings[DISC], - &match) == lwc_error_ok && match)) { - *value = LIST_STYLE_TYPE_DISC; - } else if ((lwc_string_caseless_isequal( - ident->idata, c->strings[CIRCLE], - &match) == lwc_error_ok && match)) { - *value = LIST_STYLE_TYPE_CIRCLE; - } else if ((lwc_string_caseless_isequal( - ident->idata, c->strings[SQUARE], - &match) == lwc_error_ok && match)) { - *value = LIST_STYLE_TYPE_SQUARE; - } else if ((lwc_string_caseless_isequal( - ident->idata, c->strings[DECIMAL], - &match) == lwc_error_ok && match)) { - *value = LIST_STYLE_TYPE_DECIMAL; - } else if ((lwc_string_caseless_isequal( - ident->idata, c->strings[DECIMAL_LEADING_ZERO], - &match) == lwc_error_ok && match)) { - *value = LIST_STYLE_TYPE_DECIMAL_LEADING_ZERO; - } else if ((lwc_string_caseless_isequal( - ident->idata, c->strings[LOWER_ROMAN], - &match) == lwc_error_ok && match)) { - *value = LIST_STYLE_TYPE_LOWER_ROMAN; - } else if ((lwc_string_caseless_isequal( - ident->idata, c->strings[UPPER_ROMAN], - &match) == lwc_error_ok && match)) { - *value = LIST_STYLE_TYPE_UPPER_ROMAN; - } else if ((lwc_string_caseless_isequal( - ident->idata, c->strings[LOWER_GREEK], - &match) == lwc_error_ok && match)) { - *value = LIST_STYLE_TYPE_LOWER_GREEK; - } else if ((lwc_string_caseless_isequal( - ident->idata, c->strings[LOWER_LATIN], - &match) == lwc_error_ok && match)) { - *value = LIST_STYLE_TYPE_LOWER_LATIN; - } else if ((lwc_string_caseless_isequal( - ident->idata, c->strings[UPPER_LATIN], - &match) == lwc_error_ok && match)) { - *value = LIST_STYLE_TYPE_UPPER_LATIN; - } else if ((lwc_string_caseless_isequal( - ident->idata, c->strings[ARMENIAN], - &match) == lwc_error_ok && match)) { - *value = LIST_STYLE_TYPE_ARMENIAN; - } else if ((lwc_string_caseless_isequal( - ident->idata, c->strings[GEORGIAN], - &match) == lwc_error_ok && match)) { - *value = LIST_STYLE_TYPE_GEORGIAN; - } else if ((lwc_string_caseless_isequal( - ident->idata, c->strings[LOWER_ALPHA], - &match) == lwc_error_ok && match)) { - *value = LIST_STYLE_TYPE_LOWER_ALPHA; - } else if ((lwc_string_caseless_isequal( - ident->idata, c->strings[UPPER_ALPHA], - &match) == lwc_error_ok && match)) { - *value = LIST_STYLE_TYPE_UPPER_ALPHA; - } else if ((lwc_string_caseless_isequal( - ident->idata, c->strings[NONE], - &match) == lwc_error_ok && match)) { - *value = LIST_STYLE_TYPE_NONE; - } else - return CSS_INVALID; + #define MAP_ENTRIES 29 + bool match; + int midx; + const struct { + int stringid; + int value; + } mapping[MAP_ENTRIES] = { + { DISC, LIST_STYLE_TYPE_DISC }, + { CIRCLE, LIST_STYLE_TYPE_CIRCLE }, + { SQUARE, LIST_STYLE_TYPE_SQUARE }, + { DECIMAL, LIST_STYLE_TYPE_DECIMAL }, + { DECIMAL_LEADING_ZERO, LIST_STYLE_TYPE_DECIMAL_LEADING_ZERO }, + { LOWER_ROMAN, LIST_STYLE_TYPE_LOWER_ROMAN }, + { UPPER_ROMAN, LIST_STYLE_TYPE_UPPER_ROMAN }, + { LOWER_GREEK, LIST_STYLE_TYPE_LOWER_GREEK }, + { LOWER_LATIN, LIST_STYLE_TYPE_LOWER_LATIN }, + { UPPER_LATIN, LIST_STYLE_TYPE_UPPER_LATIN }, + { ARMENIAN, LIST_STYLE_TYPE_ARMENIAN }, + { GEORGIAN, LIST_STYLE_TYPE_GEORGIAN }, + { LOWER_ALPHA, LIST_STYLE_TYPE_LOWER_ALPHA }, + { UPPER_ALPHA, LIST_STYLE_TYPE_UPPER_ALPHA }, + { NONE, LIST_STYLE_TYPE_NONE }, + { BINARY, LIST_STYLE_TYPE_BINARY }, + { OCTAL, LIST_STYLE_TYPE_OCTAL}, + { LOWER_HEXADECIMAL, LIST_STYLE_TYPE_LOWER_HEXADECIMAL }, + { UPPER_HEXADECIMAL, LIST_STYLE_TYPE_UPPER_HEXADECIMAL }, + { ARABIC_INDIC, LIST_STYLE_TYPE_ARABIC_INDIC }, + { LOWER_ARMENIAN, LIST_STYLE_TYPE_LOWER_ARMENIAN }, + { UPPER_ARMENIAN, LIST_STYLE_TYPE_UPPER_ARMENIAN }, + { BENGALI, LIST_STYLE_TYPE_BENGALI }, + { CAMBODIAN, LIST_STYLE_TYPE_CAMBODIAN }, + { KHMER, LIST_STYLE_TYPE_KHMER }, + { CJK_DECIMAL, LIST_STYLE_TYPE_CJK_DECIMAL }, + { DEVANAGARI, LIST_STYLE_TYPE_DEVANAGARI }, + { GUJARATI, LIST_STYLE_TYPE_GUJARATI }, + { GURMUKHI, LIST_STYLE_TYPE_GURMUKHI } + }; - return CSS_OK; + for (midx = 0; midx < MAP_ENTRIES; midx++) { + if ((lwc_string_caseless_isequal( + ident->idata, + c->strings[mapping[midx].stringid], + &match) == lwc_error_ok && match)) { + *value = mapping[midx].value; + return CSS_OK; + } + } + + return CSS_INVALID; } @@ -1117,7 +1100,7 @@ css_error css__ident_list_or_string_to_string(css_language *c, token = parserutils_vector_iterate(vector, ctx); *result = lwc_string_ref(token->idata); return CSS_OK; - } else if(token->type == CSS_TOKEN_IDENT) { + } else if(token->type == CSS_TOKEN_IDENT) { return css__ident_list_to_string(c, vector, ctx, reserved, result); } @@ -1333,4 +1316,3 @@ cleanup: return error; } - diff --git a/src/parse/propstrings.c b/src/parse/propstrings.c index 3c9401b..302f7f8 100644 --- a/src/parse/propstrings.c +++ b/src/parse/propstrings.c @@ -309,6 +309,20 @@ const stringmap_entry stringmap[LAST_KNOWN] = { { "georgian", SLEN("georgian") }, { "lower-alpha", SLEN("lower-alpha") }, { "upper-alpha", SLEN("upper-alpha") }, + { "binary", SLEN("binary") }, + { "octal", SLEN("octal") }, + { "lower-hexadecimal", SLEN("lower-hexadecimal") }, + { "upper-hexadecimal", SLEN("upper-hexadecimal") }, + { "arabic-indic", SLEN("arabic-indic") }, + { "lower-armenian", SLEN("lower-armenian") }, + { "upper-armenian", SLEN("upper-armenian") }, + { "bengali", SLEN("bengali") }, + { "cambodian", SLEN("cambodian") }, + { "khmer", SLEN("khmer") }, + { "cjk-decimal", SLEN("cjk-decimal") }, + { "devanagari", SLEN("devanagari") }, + { "gujarati", SLEN("gujarati") }, + { "gurmukhi", SLEN("gurmukhi") }, { "invert", SLEN("invert") }, { "visible", SLEN("visible") }, { "always", SLEN("always") }, diff --git a/src/parse/propstrings.h b/src/parse/propstrings.h index 24b681b..65954c6 100644 --- a/src/parse/propstrings.h +++ b/src/parse/propstrings.h @@ -83,6 +83,9 @@ enum { LIGHTER, INSIDE, OUTSIDE, DISC, CIRCLE, SQUARE, DECIMAL, DECIMAL_LEADING_ZERO, LOWER_ROMAN, UPPER_ROMAN, LOWER_GREEK, LOWER_LATIN, UPPER_LATIN, ARMENIAN, GEORGIAN, LOWER_ALPHA, UPPER_ALPHA, + BINARY, OCTAL, LOWER_HEXADECIMAL, UPPER_HEXADECIMAL, ARABIC_INDIC, + LOWER_ARMENIAN, UPPER_ARMENIAN, BENGALI, CAMBODIAN, KHMER, CJK_DECIMAL, + DEVANAGARI, GUJARATI, GURMUKHI, INVERT, VISIBLE, ALWAYS, AVOID, X_LOW, LOW, HIGH, X_HIGH, LIBCSS_STATIC, RELATIVE, ABSOLUTE, ONCE, DIGITS, CONTINUOUS, CODE, SPELL_OUT, X_SLOW, SLOW, FAST, X_FAST, FASTER, SLOWER, CENTER, JUSTIFY, CAPITALIZE, diff --git a/src/select/format_list_style.c b/src/select/format_list_style.c index 4a2fee5..e61f981 100644 --- a/src/select/format_list_style.c +++ b/src/select/format_list_style.c @@ -385,7 +385,7 @@ static const struct list_counter_style lcs_georgian = { }; -static const symbol_t armenian_symbols[] = { +static const symbol_t upper_armenian_symbols[] = { "Ք", "Փ", "Ւ", "Ց", "Ր", "Տ", "Վ", "Ս", "Ռ", "Ջ", "Պ", "Չ", "Ո", "Շ", "Ն", "Յ", "Մ", "Ճ", "Ղ", "Ձ", "Հ", "Կ", "Ծ", "Խ", "Լ", "Ի", "Ժ", @@ -397,14 +397,32 @@ static const int armenian_weights[] = { 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }; -static const struct list_counter_style lcs_armenian = { - .name = "armenian", +static const struct list_counter_style lcs_upper_armenian = { + .name = "upper-armenian", .range = { .start = 1, .end = 9999,}, - .symbols = armenian_symbols, + .symbols = upper_armenian_symbols, .weights = armenian_weights, - .items = (sizeof(armenian_symbols) / SYMBOL_SIZE), + .items = (sizeof(upper_armenian_symbols) / SYMBOL_SIZE), + .calc = calc_additive_system, +}; + + +static const symbol_t lower_armenian_symbols[] = { + "ք", "փ", "ւ", "ց", "ր", "տ", "վ", "ս", "ռ", + "ջ", "պ", "չ", "ո", "շ", "ն", "յ", "մ", "ճ", + "ղ", "ձ", "հ", "կ", "ծ", "խ", "լ", "ի", "ժ", + "թ", "ը", "է", "զ", "ե", "դ", "գ", "բ", "ա" +}; +static const struct list_counter_style lcs_lower_armenian = { + .name = "lower-armenian", + .range = { + .start = 1, + .end = 9999,}, + .symbols = lower_armenian_symbols, + .weights = armenian_weights, + .items = (sizeof(lower_armenian_symbols) / SYMBOL_SIZE), .calc = calc_additive_system, }; @@ -529,18 +547,117 @@ static const struct list_counter_style lcs_square = { .calc = calc_cyclic_system, }; -#if 0 -static const symbol_t lower_hexidecimal_symbols[] = { +static const symbol_t binary_symbols[] = { "0", "1" }; +static const struct list_counter_style lcs_binary = { + .name = "binary", + .symbols = binary_symbols, + .items = (sizeof(binary_symbols) / SYMBOL_SIZE), + .calc = calc_numeric_system, +}; + +static const symbol_t octal_symbols[] = { + "0", "1", "2", "3", "4", "5", "6", "7" +}; +static const struct list_counter_style lcs_octal = { + .name = "octal", + .symbols = octal_symbols, + .items = (sizeof(octal_symbols) / SYMBOL_SIZE), + .calc = calc_numeric_system, +}; + + +static const symbol_t lower_hexadecimal_symbols[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f" }; -static const struct list_counter_style lcs_lower_hexidecimal = { - .name = "lower-hexidecimal", - .symbols = lower_hexidecimal_symbols, - .items = (sizeof(lower_hexidecimal_symbols) / SYMBOL_SIZE), +static const struct list_counter_style lcs_lower_hexadecimal = { + .name = "lower-hexadecimal", + .symbols = lower_hexadecimal_symbols, + .items = (sizeof(lower_hexadecimal_symbols) / SYMBOL_SIZE), + .calc = calc_numeric_system, +}; + +static const symbol_t upper_hexadecimal_symbols[] = { + "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", + "a", "b", "c", "d", "e", "f" +}; +static const struct list_counter_style lcs_upper_hexadecimal = { + .name = "upper-hexadecimal", + .symbols = upper_hexadecimal_symbols, + .items = (sizeof(upper_hexadecimal_symbols) / SYMBOL_SIZE), + .calc = calc_numeric_system, +}; + +static const symbol_t arabic_indic_symbols[] = { + "\xd9\xa0", "\xd9\xa1", "\xd9\xa2", "\xd9\xa3", "\xd9\xa4", "\xd9\xa5", "\xd9\xa6", "\xd9\xa7", "\xd9\xa8", "\xd9\xa9" +}; +static const struct list_counter_style lcs_arabic_indic = { + .name = "arabic-indic", + .symbols = arabic_indic_symbols, + .items = (sizeof(arabic_indic_symbols) / SYMBOL_SIZE), + .calc = calc_numeric_system, +}; + +static const symbol_t bengali_symbols[] = { + "০", "১", "২", "৩", "৪", "৫", "৬", "৭", "৮", "৯" +}; +static const struct list_counter_style lcs_bengali = { + .name = "bengali", + .symbols = bengali_symbols, + .items = (sizeof(bengali_symbols) / SYMBOL_SIZE), + .calc = calc_numeric_system, +}; + +static const symbol_t cambodian_symbols[] = { + "០", "១", "២", "៣", "៤", "៥", "៦", "៧", "៨", "៩" +}; +static const struct list_counter_style lcs_cambodian = { + .name = "cambodian", + .symbols = cambodian_symbols, + .items = (sizeof(cambodian_symbols) / SYMBOL_SIZE), + .calc = calc_numeric_system, +}; + +static const symbol_t cjk_decimal_symbols[] = { + "〇", "一", "二", "三", "四", "五", "六", "七", "八", "九" +}; +static const struct list_counter_style lcs_cjk_decimal = { + .name = "cjk-decimal", + .symbols = cjk_decimal_symbols, + .postfix = "、", + .items = (sizeof(cjk_decimal_symbols) / SYMBOL_SIZE), + .calc = calc_numeric_system, +}; + +static const symbol_t devanagari_symbols[] = { + "०", "१", "२", "३", "४", "५", "६", "७", "८", "९" +}; +static const struct list_counter_style lcs_devanagari = { + .name = "devanagari", + .symbols = devanagari_symbols, + .items = (sizeof(devanagari_symbols) / SYMBOL_SIZE), + .calc = calc_numeric_system, +}; + +static const symbol_t gujarati_symbols[] = { + "૦", "૧", "૨", "૩", "૪", "૫", "૬", "૭", "૮", "૯" +}; +static const struct list_counter_style lcs_gujarati = { + .name = "gujarati", + .symbols = gujarati_symbols, + .items = (sizeof(gujarati_symbols) / SYMBOL_SIZE), + .calc = calc_numeric_system, +}; + +static const symbol_t gurmukhi_symbols[] = { + "੦", "੧", "੨", "੩", "੪", "੫", "੬", "੭", "੮", "੯" +}; +static const struct list_counter_style lcs_gurmukhi = { + .name = "gurmukhi", + .symbols = gurmukhi_symbols, + .items = (sizeof(gurmukhi_symbols) / SYMBOL_SIZE), .calc = calc_numeric_system, }; -#endif /* exported interface defined in select.h */ @@ -558,6 +675,22 @@ css_error css_computed_format_list_style( const struct list_counter_style *cstyle; switch (type) { + case CSS_LIST_STYLE_TYPE_DISC: + cstyle = &lcs_disc; + break; + + case CSS_LIST_STYLE_TYPE_CIRCLE: + cstyle = &lcs_circle; + break; + + case CSS_LIST_STYLE_TYPE_SQUARE: + cstyle = &lcs_square; + break; + + case CSS_LIST_STYLE_TYPE_DECIMAL: + cstyle = &lcs_decimal; + break; + case CSS_LIST_STYLE_TYPE_DECIMAL_LEADING_ZERO: cstyle = &lcs_decimal_leading_zero; break; @@ -570,6 +703,10 @@ css_error css_computed_format_list_style( cstyle = &lcs_upper_roman; break; + case CSS_LIST_STYLE_TYPE_LOWER_GREEK: + cstyle = &lcs_lower_greek; + break; + case CSS_LIST_STYLE_TYPE_LOWER_ALPHA: case CSS_LIST_STYLE_TYPE_LOWER_LATIN: cstyle = &lcs_lower_alpha; @@ -580,38 +717,70 @@ css_error css_computed_format_list_style( cstyle = &lcs_upper_alpha; break; - case CSS_LIST_STYLE_TYPE_LOWER_GREEK: - cstyle = &lcs_lower_greek; - break; - + case CSS_LIST_STYLE_TYPE_UPPER_ARMENIAN: case CSS_LIST_STYLE_TYPE_ARMENIAN: - cstyle = &lcs_armenian; + cstyle = &lcs_upper_armenian; break; case CSS_LIST_STYLE_TYPE_GEORGIAN: cstyle = &lcs_georgian; break; - case CSS_LIST_STYLE_TYPE_DISC: - cstyle = &lcs_disc; + case CSS_LIST_STYLE_TYPE_NONE: + *format_length = 0; + return CSS_OK; + + case CSS_LIST_STYLE_TYPE_BINARY: + cstyle = &lcs_binary; break; - case CSS_LIST_STYLE_TYPE_CIRCLE: - cstyle = &lcs_circle; + case CSS_LIST_STYLE_TYPE_OCTAL: + cstyle = &lcs_octal; break; - case CSS_LIST_STYLE_TYPE_SQUARE: - cstyle = &lcs_square; + case CSS_LIST_STYLE_TYPE_LOWER_HEXADECIMAL: + cstyle = &lcs_lower_hexadecimal; break; - case CSS_LIST_STYLE_TYPE_NONE: - *format_length = 0; - return CSS_OK; + case CSS_LIST_STYLE_TYPE_UPPER_HEXADECIMAL: + cstyle = &lcs_upper_hexadecimal; + break; - case CSS_LIST_STYLE_TYPE_DECIMAL: - default: - cstyle = &lcs_decimal; + case CSS_LIST_STYLE_TYPE_ARABIC_INDIC: + cstyle = &lcs_arabic_indic; break; + + case CSS_LIST_STYLE_TYPE_LOWER_ARMENIAN: + cstyle = &lcs_lower_armenian; + break; + + case CSS_LIST_STYLE_TYPE_BENGALI: + cstyle = &lcs_bengali; + break; + + case CSS_LIST_STYLE_TYPE_CAMBODIAN: + case CSS_LIST_STYLE_TYPE_KHMER: + cstyle = &lcs_cambodian; + break; + + case CSS_LIST_STYLE_TYPE_CJK_DECIMAL: + cstyle = &lcs_cjk_decimal; + break; + + case CSS_LIST_STYLE_TYPE_DEVANAGARI: + cstyle = &lcs_devanagari; + break; + + case CSS_LIST_STYLE_TYPE_GUJARATI: + cstyle = &lcs_gujarati; + break; + + case CSS_LIST_STYLE_TYPE_GURMUKHI: + cstyle = &lcs_gurmukhi; + break; + + default: + return CSS_BADPARM; } alen = cstyle->calc(aval, sizeof(aval), value, cstyle); diff --git a/src/select/properties/list_style_type.c b/src/select/properties/list_style_type.c index b1e5db6..9a6af2c 100644 --- a/src/select/properties/list_style_type.c +++ b/src/select/properties/list_style_type.c @@ -68,6 +68,48 @@ css_error css__cascade_list_style_type(uint32_t opv, css_style *style, case LIST_STYLE_TYPE_NONE: value = CSS_LIST_STYLE_TYPE_NONE; break; + case LIST_STYLE_TYPE_BINARY: + value = CSS_LIST_STYLE_TYPE_BINARY; + break; + case LIST_STYLE_TYPE_OCTAL: + value = CSS_LIST_STYLE_TYPE_OCTAL; + break; + case LIST_STYLE_TYPE_LOWER_HEXADECIMAL: + value = CSS_LIST_STYLE_TYPE_LOWER_HEXADECIMAL; + break; + case LIST_STYLE_TYPE_UPPER_HEXADECIMAL: + value = CSS_LIST_STYLE_TYPE_UPPER_HEXADECIMAL; + break; + case LIST_STYLE_TYPE_ARABIC_INDIC: + value = CSS_LIST_STYLE_TYPE_ARABIC_INDIC; + break; + case LIST_STYLE_TYPE_LOWER_ARMENIAN: + value = CSS_LIST_STYLE_TYPE_LOWER_ARMENIAN; + break; + case LIST_STYLE_TYPE_UPPER_ARMENIAN: + value = CSS_LIST_STYLE_TYPE_UPPER_ARMENIAN; + break; + case LIST_STYLE_TYPE_BENGALI: + value = CSS_LIST_STYLE_TYPE_BENGALI; + break; + case LIST_STYLE_TYPE_CAMBODIAN: + value = CSS_LIST_STYLE_TYPE_CAMBODIAN; + break; + case LIST_STYLE_TYPE_KHMER: + value = CSS_LIST_STYLE_TYPE_KHMER; + break; + case LIST_STYLE_TYPE_CJK_DECIMAL: + value = CSS_LIST_STYLE_TYPE_CJK_DECIMAL; + break; + case LIST_STYLE_TYPE_DEVANAGARI: + value = CSS_LIST_STYLE_TYPE_DEVANAGARI; + break; + case LIST_STYLE_TYPE_GUJARATI: + value = CSS_LIST_STYLE_TYPE_GUJARATI; + break; + case LIST_STYLE_TYPE_GURMUKHI: + value = CSS_LIST_STYLE_TYPE_GURMUKHI; + break; } } @@ -102,4 +144,3 @@ css_error css__compose_list_style_type(const css_computed_style *parent, return set_list_style_type(result, type); } - -- cgit v1.2.3