Gitweb links:
...log
http://git.netsurf-browser.org/libcss.git/shortlog/0504194e51a35a88ceba06...
...commit
http://git.netsurf-browser.org/libcss.git/commit/0504194e51a35a88ceba0628...
...tree
http://git.netsurf-browser.org/libcss.git/tree/0504194e51a35a88ceba06288a...
The branch, master has been updated
via 0504194e51a35a88ceba06288a6a2d8243b27516 (commit)
from dbccd7cceb79d0fabebe5e183d85f750c058cd7e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=0504194e51a35a88ceba...
commit 0504194e51a35a88ceba06288a6a2d8243b27516
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
add css 3.1 complex predefined counter styles for addative systems
diff --git a/include/libcss/properties.h b/include/libcss/properties.h
index a5569d0..ae00551 100644
--- a/include/libcss/properties.h
+++ b/include/libcss/properties.h
@@ -638,7 +638,12 @@ enum css_list_style_type_e {
CSS_LIST_STYLE_TYPE_HIAGANA = 0x2c,
CSS_LIST_STYLE_TYPE_HIAGANA_IROHA = 0x2d,
CSS_LIST_STYLE_TYPE_KATAKANA = 0x2e,
- CSS_LIST_STYLE_TYPE_KATAKANA_IROHA = 0x2f
+ CSS_LIST_STYLE_TYPE_KATAKANA_IROHA = 0x2f,
+ CSS_LIST_STYLE_TYPE_JAPANESE_INFORMAL = 0x30,
+ CSS_LIST_STYLE_TYPE_JAPANESE_FORMAL = 0x31,
+ CSS_LIST_STYLE_TYPE_KOREAN_HANGUL_FORMAL = 0x32,
+ CSS_LIST_STYLE_TYPE_KOREAN_HANJA_INFORMAL = 0x33,
+ CSS_LIST_STYLE_TYPE_KOREAN_HANJA_FORMAL = 0x34
};
enum css_margin_e {
diff --git a/src/bytecode/opcodes.h b/src/bytecode/opcodes.h
index 1e561e5..01ea25a 100644
--- a/src/bytecode/opcodes.h
+++ b/src/bytecode/opcodes.h
@@ -523,7 +523,12 @@ enum op_list_style_type {
LIST_STYLE_TYPE_HIAGANA = 0x002b,
LIST_STYLE_TYPE_HIAGANA_IROHA = 0x002c,
LIST_STYLE_TYPE_KATAKANA = 0x002d,
- LIST_STYLE_TYPE_KATAKANA_IROHA = 0x002e
+ LIST_STYLE_TYPE_KATAKANA_IROHA = 0x002e,
+ LIST_STYLE_TYPE_JAPANESE_INFORMAL = 0x002f,
+ LIST_STYLE_TYPE_JAPANESE_FORMAL = 0x0030,
+ LIST_STYLE_TYPE_KOREAN_HANGUL_FORMAL = 0x0031,
+ LIST_STYLE_TYPE_KOREAN_HANJA_INFORMAL = 0x0032,
+ LIST_STYLE_TYPE_KOREAN_HANJA_FORMAL = 0x0033
};
enum op_margin {
diff --git a/src/parse/properties/utils.c b/src/parse/properties/utils.c
index c82c88f..707a22b 100644
--- a/src/parse/properties/utils.c
+++ b/src/parse/properties/utils.c
@@ -34,7 +34,7 @@ css_error css__parse_list_style_type_value(css_language *c, const
css_token *ide
* upper-latin, armenian, georgian, lower-alpha, upper-alpha,
* none)
*/
- #define MAP_ENTRIES 47
+ #define MAP_ENTRIES 52
bool match;
int midx;
const struct {
@@ -87,7 +87,12 @@ css_error css__parse_list_style_type_value(css_language *c, const
css_token *ide
{ HIAGANA, LIST_STYLE_TYPE_HIAGANA },
{ HIAGANA_IROHA, LIST_STYLE_TYPE_HIAGANA_IROHA },
{ KATAKANA, LIST_STYLE_TYPE_KATAKANA },
- { KATAKANA_IROHA, LIST_STYLE_TYPE_KATAKANA_IROHA }
+ { KATAKANA_IROHA, LIST_STYLE_TYPE_KATAKANA_IROHA },
+ { JAPANESE_INFORMAL, LIST_STYLE_TYPE_JAPANESE_INFORMAL },
+ { JAPANESE_FORMAL, LIST_STYLE_TYPE_JAPANESE_FORMAL },
+ { KOREAN_HANGUL_FORMAL, LIST_STYLE_TYPE_KOREAN_HANGUL_FORMAL },
+ { KOREAN_HANJA_INFORMAL, LIST_STYLE_TYPE_KOREAN_HANJA_INFORMAL },
+ { KOREAN_HANJA_FORMAL, LIST_STYLE_TYPE_KOREAN_HANJA_FORMAL }
};
for (midx = 0; midx < MAP_ENTRIES; midx++) {
diff --git a/src/parse/propstrings.c b/src/parse/propstrings.c
index a2d9175..7d723e1 100644
--- a/src/parse/propstrings.c
+++ b/src/parse/propstrings.c
@@ -345,6 +345,11 @@ const stringmap_entry stringmap[LAST_KNOWN] = {
SMAP("hiragana-iroha"),
SMAP("katakana"),
SMAP("katakana-iroha"),
+ SMAP("japanese-informal"),
+ SMAP("japanese-formal"),
+ SMAP("korean-hangul-formal"),
+ SMAP("korean-hanja-informal"),
+ SMAP("korean-hanja-formal"),
SMAP("invert"),
SMAP("visible"),
SMAP("always"),
diff --git a/src/parse/propstrings.h b/src/parse/propstrings.h
index f011231..fd24a47 100644
--- a/src/parse/propstrings.h
+++ b/src/parse/propstrings.h
@@ -88,7 +88,8 @@ enum {
DEVANAGARI, GUJARATI, GURMUKHI, HEBREW, KANNADA, LAO, MALAYALAM,
MONGOLIAN, MYANMAR, ORIYA, PERSIAN, TAMIL, TELUGU, THAI, TIBETAN,
CJK_EARTHLY_BRANCH, CJK_HEAVENLY_STEM, HIAGANA, HIAGANA_IROHA,
- KATAKANA, KATAKANA_IROHA,
+ KATAKANA, KATAKANA_IROHA, JAPANESE_INFORMAL, JAPANESE_FORMAL,
+ KOREAN_HANGUL_FORMAL, KOREAN_HANJA_INFORMAL, KOREAN_HANJA_FORMAL,
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 9cc5de7..0e3a39e 100644
--- a/src/select/format_list_style.c
+++ b/src/select/format_list_style.c
@@ -8,7 +8,7 @@
#include "select/propget.h"
#include "utils/utils.h"
-#define SYMBOL_SIZE 5
+#define SYMBOL_SIZE 8
typedef char symbol_t[SYMBOL_SIZE];
/**
@@ -330,6 +330,9 @@ calc_additive_system(int value,
/* iterate over the available weights */
for (widx = 0; widx < cstyle->items; widx++) {
+ if (cstyle->weights[widx] == 0) {
+ break;
+ }
times = value / cstyle->weights[widx];
if (times > 0) {
for (idx = 0;idx < times;idx++) {
@@ -975,6 +978,106 @@ static struct list_counter_style lcs_katakana_iroha = {
.suffix = "���",
};
+/**
+ * weights suitable for the five complex addative styles
+ */
+static const int complex_counter_weights[] = {
+ 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000,
+ 900, 800, 700, 600, 500, 400, 300, 200, 100,
+ 90, 80, 70, 60, 50, 40, 30, 20, 10,
+ 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
+};
+static const symbol_t japanese_informal_symbols[] = {
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"���",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"���",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"���",
+ "���", "���", "���", "���", "���",
"���", "���", "���", "���", "���",
+};
+static const struct list_counter_style lcs_japanese_informal = {
+ .name = "japanese-informal",
+ .system = calc_additive_system,
+ .fallback = &lcs_cjk_decimal,
+ .symbols = japanese_informal_symbols,
+ .weights = complex_counter_weights,
+ .items = (sizeof(japanese_informal_symbols) / SYMBOL_SIZE),
+ .range = { .start = -9999, .end = 9999 },
+ .negative = { .pre = "������������" },
+ .suffix = "\xE3\x80\x81",
+};
+
+static const symbol_t japanese_formal_symbols[] = {
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "���", "���", "���", "���", "���",
"���", "���", "���", "���", "���",
+};
+static const struct list_counter_style lcs_japanese_formal = {
+ .name = "japanese-formal",
+ .system = calc_additive_system,
+ .fallback = &lcs_cjk_decimal,
+ .symbols = japanese_formal_symbols,
+ .weights = complex_counter_weights,
+ .items = (sizeof(japanese_formal_symbols) / SYMBOL_SIZE),
+ .range = { .start = -9999, .end = 9999 },
+ .negative = { .pre = "������������" },
+ .suffix = "\xE3\x80\x81",
+};
+
+static const symbol_t korean_hangul_formal_symbols[] = {
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "���", "���", "���", "���", "���",
"���", "���", "���", "���", "���"
+};
+static const struct list_counter_style lcs_korean_hangul_formal = {
+ .name = "korean-hangul-formal",
+ .system = calc_additive_system,
+ .fallback = &lcs_cjk_decimal,
+ .symbols = korean_hangul_formal_symbols,
+ .weights = complex_counter_weights,
+ .items = (sizeof(korean_hangul_formal_symbols) / SYMBOL_SIZE),
+ .range = { .start = -9999, .end = 9999 },
+ .negative = { .pre = "\xEB\xA7\x88\xEC\x9D\xB4\xEB\x84\x88\xEC\x8A\xA4 " },
+ .suffix = ", ",
+};
+
+static const symbol_t korean_hanja_informal_symbols[] = {
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"���",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"���",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"���",
+ "���", "���", "���", "���", "���",
"���", "���", "���", "���", "���"
+};
+static const struct list_counter_style lcs_korean_hanja_informal = {
+ .name = "korean-hanja-informal",
+ .system = calc_additive_system,
+ .fallback = &lcs_cjk_decimal,
+ .symbols = korean_hanja_informal_symbols,
+ .weights = complex_counter_weights,
+ .items = (sizeof(korean_hanja_informal_symbols) / SYMBOL_SIZE),
+ .range = { .start = -9999, .end = 9999 },
+ .negative = { .pre = "\xEB\xA7\x88\xEC\x9D\xB4\xEB\x84\x88\xEC\x8A\xA4 " },
+ .suffix = ", ",
+};
+
+static const symbol_t korean_hanja_formal_symbols[] = {
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "���", "���", "���", "���", "���",
"���", "���", "���", "���", "���"
+};
+static const struct list_counter_style lcs_korean_hanja_formal = {
+ .name = "korean-hanja-formal",
+ .system = calc_additive_system,
+ .fallback = &lcs_cjk_decimal,
+ .symbols = korean_hanja_formal_symbols,
+ .weights = complex_counter_weights,
+ .items = (sizeof(korean_hanja_formal_symbols) / SYMBOL_SIZE),
+ .range = { .start = -9999, .end = 9999 },
+ .negative = { .pre = "\xEB\xA7\x88\xEC\x9D\xB4\xEB\x84\x88\xEC\x8A\xA4 " },
+ .suffix = ", ",
+};
+
+
static const struct list_counter_style *
counter_style_from_computed_style(const css_computed_style *style)
@@ -1070,6 +1173,16 @@ counter_style_from_computed_style(const css_computed_style *style)
return &lcs_katakana;
case CSS_LIST_STYLE_TYPE_KATAKANA_IROHA:
return &lcs_katakana_iroha;
+ case CSS_LIST_STYLE_TYPE_JAPANESE_INFORMAL:
+ return &lcs_japanese_informal;
+ case CSS_LIST_STYLE_TYPE_JAPANESE_FORMAL:
+ return &lcs_japanese_formal;
+ case CSS_LIST_STYLE_TYPE_KOREAN_HANGUL_FORMAL:
+ return &lcs_korean_hangul_formal;
+ case CSS_LIST_STYLE_TYPE_KOREAN_HANJA_INFORMAL:
+ return &lcs_korean_hanja_informal;
+ case CSS_LIST_STYLE_TYPE_KOREAN_HANJA_FORMAL:
+ return &lcs_korean_hanja_formal;
}
return NULL;
}
diff --git a/src/select/properties/list_style_type.c
b/src/select/properties/list_style_type.c
index 7560c3b..e32d1b1 100644
--- a/src/select/properties/list_style_type.c
+++ b/src/select/properties/list_style_type.c
@@ -164,6 +164,21 @@ css_error css__cascade_list_style_type(uint32_t opv, css_style
*style,
case LIST_STYLE_TYPE_KATAKANA_IROHA:
value = CSS_LIST_STYLE_TYPE_KATAKANA_IROHA;
break;
+ case LIST_STYLE_TYPE_JAPANESE_INFORMAL:
+ value = CSS_LIST_STYLE_TYPE_JAPANESE_INFORMAL;
+ break;
+ case LIST_STYLE_TYPE_JAPANESE_FORMAL:
+ value = CSS_LIST_STYLE_TYPE_JAPANESE_FORMAL;
+ break;
+ case LIST_STYLE_TYPE_KOREAN_HANGUL_FORMAL:
+ value = CSS_LIST_STYLE_TYPE_KOREAN_HANGUL_FORMAL;
+ break;
+ case LIST_STYLE_TYPE_KOREAN_HANJA_INFORMAL:
+ value = CSS_LIST_STYLE_TYPE_KOREAN_HANJA_INFORMAL;
+ break;
+ case LIST_STYLE_TYPE_KOREAN_HANJA_FORMAL:
+ value = CSS_LIST_STYLE_TYPE_KOREAN_HANJA_FORMAL;
+ break;
}
}
-----------------------------------------------------------------------
Summary of changes:
include/libcss/properties.h | 7 +-
src/bytecode/opcodes.h | 7 +-
src/parse/properties/utils.c | 9 ++-
src/parse/propstrings.c | 5 ++
src/parse/propstrings.h | 3 +-
src/select/format_list_style.c | 115 ++++++++++++++++++++++++++++++-
src/select/properties/list_style_type.c | 15 ++++
7 files changed, 155 insertions(+), 6 deletions(-)
diff --git a/include/libcss/properties.h b/include/libcss/properties.h
index a5569d0..ae00551 100644
--- a/include/libcss/properties.h
+++ b/include/libcss/properties.h
@@ -638,7 +638,12 @@ enum css_list_style_type_e {
CSS_LIST_STYLE_TYPE_HIAGANA = 0x2c,
CSS_LIST_STYLE_TYPE_HIAGANA_IROHA = 0x2d,
CSS_LIST_STYLE_TYPE_KATAKANA = 0x2e,
- CSS_LIST_STYLE_TYPE_KATAKANA_IROHA = 0x2f
+ CSS_LIST_STYLE_TYPE_KATAKANA_IROHA = 0x2f,
+ CSS_LIST_STYLE_TYPE_JAPANESE_INFORMAL = 0x30,
+ CSS_LIST_STYLE_TYPE_JAPANESE_FORMAL = 0x31,
+ CSS_LIST_STYLE_TYPE_KOREAN_HANGUL_FORMAL = 0x32,
+ CSS_LIST_STYLE_TYPE_KOREAN_HANJA_INFORMAL = 0x33,
+ CSS_LIST_STYLE_TYPE_KOREAN_HANJA_FORMAL = 0x34
};
enum css_margin_e {
diff --git a/src/bytecode/opcodes.h b/src/bytecode/opcodes.h
index 1e561e5..01ea25a 100644
--- a/src/bytecode/opcodes.h
+++ b/src/bytecode/opcodes.h
@@ -523,7 +523,12 @@ enum op_list_style_type {
LIST_STYLE_TYPE_HIAGANA = 0x002b,
LIST_STYLE_TYPE_HIAGANA_IROHA = 0x002c,
LIST_STYLE_TYPE_KATAKANA = 0x002d,
- LIST_STYLE_TYPE_KATAKANA_IROHA = 0x002e
+ LIST_STYLE_TYPE_KATAKANA_IROHA = 0x002e,
+ LIST_STYLE_TYPE_JAPANESE_INFORMAL = 0x002f,
+ LIST_STYLE_TYPE_JAPANESE_FORMAL = 0x0030,
+ LIST_STYLE_TYPE_KOREAN_HANGUL_FORMAL = 0x0031,
+ LIST_STYLE_TYPE_KOREAN_HANJA_INFORMAL = 0x0032,
+ LIST_STYLE_TYPE_KOREAN_HANJA_FORMAL = 0x0033
};
enum op_margin {
diff --git a/src/parse/properties/utils.c b/src/parse/properties/utils.c
index c82c88f..707a22b 100644
--- a/src/parse/properties/utils.c
+++ b/src/parse/properties/utils.c
@@ -34,7 +34,7 @@ css_error css__parse_list_style_type_value(css_language *c, const
css_token *ide
* upper-latin, armenian, georgian, lower-alpha, upper-alpha,
* none)
*/
- #define MAP_ENTRIES 47
+ #define MAP_ENTRIES 52
bool match;
int midx;
const struct {
@@ -87,7 +87,12 @@ css_error css__parse_list_style_type_value(css_language *c, const
css_token *ide
{ HIAGANA, LIST_STYLE_TYPE_HIAGANA },
{ HIAGANA_IROHA, LIST_STYLE_TYPE_HIAGANA_IROHA },
{ KATAKANA, LIST_STYLE_TYPE_KATAKANA },
- { KATAKANA_IROHA, LIST_STYLE_TYPE_KATAKANA_IROHA }
+ { KATAKANA_IROHA, LIST_STYLE_TYPE_KATAKANA_IROHA },
+ { JAPANESE_INFORMAL, LIST_STYLE_TYPE_JAPANESE_INFORMAL },
+ { JAPANESE_FORMAL, LIST_STYLE_TYPE_JAPANESE_FORMAL },
+ { KOREAN_HANGUL_FORMAL, LIST_STYLE_TYPE_KOREAN_HANGUL_FORMAL },
+ { KOREAN_HANJA_INFORMAL, LIST_STYLE_TYPE_KOREAN_HANJA_INFORMAL },
+ { KOREAN_HANJA_FORMAL, LIST_STYLE_TYPE_KOREAN_HANJA_FORMAL }
};
for (midx = 0; midx < MAP_ENTRIES; midx++) {
diff --git a/src/parse/propstrings.c b/src/parse/propstrings.c
index a2d9175..7d723e1 100644
--- a/src/parse/propstrings.c
+++ b/src/parse/propstrings.c
@@ -345,6 +345,11 @@ const stringmap_entry stringmap[LAST_KNOWN] = {
SMAP("hiragana-iroha"),
SMAP("katakana"),
SMAP("katakana-iroha"),
+ SMAP("japanese-informal"),
+ SMAP("japanese-formal"),
+ SMAP("korean-hangul-formal"),
+ SMAP("korean-hanja-informal"),
+ SMAP("korean-hanja-formal"),
SMAP("invert"),
SMAP("visible"),
SMAP("always"),
diff --git a/src/parse/propstrings.h b/src/parse/propstrings.h
index f011231..fd24a47 100644
--- a/src/parse/propstrings.h
+++ b/src/parse/propstrings.h
@@ -88,7 +88,8 @@ enum {
DEVANAGARI, GUJARATI, GURMUKHI, HEBREW, KANNADA, LAO, MALAYALAM,
MONGOLIAN, MYANMAR, ORIYA, PERSIAN, TAMIL, TELUGU, THAI, TIBETAN,
CJK_EARTHLY_BRANCH, CJK_HEAVENLY_STEM, HIAGANA, HIAGANA_IROHA,
- KATAKANA, KATAKANA_IROHA,
+ KATAKANA, KATAKANA_IROHA, JAPANESE_INFORMAL, JAPANESE_FORMAL,
+ KOREAN_HANGUL_FORMAL, KOREAN_HANJA_INFORMAL, KOREAN_HANJA_FORMAL,
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 9cc5de7..0e3a39e 100644
--- a/src/select/format_list_style.c
+++ b/src/select/format_list_style.c
@@ -8,7 +8,7 @@
#include "select/propget.h"
#include "utils/utils.h"
-#define SYMBOL_SIZE 5
+#define SYMBOL_SIZE 8
typedef char symbol_t[SYMBOL_SIZE];
/**
@@ -330,6 +330,9 @@ calc_additive_system(int value,
/* iterate over the available weights */
for (widx = 0; widx < cstyle->items; widx++) {
+ if (cstyle->weights[widx] == 0) {
+ break;
+ }
times = value / cstyle->weights[widx];
if (times > 0) {
for (idx = 0;idx < times;idx++) {
@@ -975,6 +978,106 @@ static struct list_counter_style lcs_katakana_iroha = {
.suffix = "���",
};
+/**
+ * weights suitable for the five complex addative styles
+ */
+static const int complex_counter_weights[] = {
+ 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000,
+ 900, 800, 700, 600, 500, 400, 300, 200, 100,
+ 90, 80, 70, 60, 50, 40, 30, 20, 10,
+ 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
+};
+static const symbol_t japanese_informal_symbols[] = {
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"���",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"���",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"���",
+ "���", "���", "���", "���", "���",
"���", "���", "���", "���", "���",
+};
+static const struct list_counter_style lcs_japanese_informal = {
+ .name = "japanese-informal",
+ .system = calc_additive_system,
+ .fallback = &lcs_cjk_decimal,
+ .symbols = japanese_informal_symbols,
+ .weights = complex_counter_weights,
+ .items = (sizeof(japanese_informal_symbols) / SYMBOL_SIZE),
+ .range = { .start = -9999, .end = 9999 },
+ .negative = { .pre = "������������" },
+ .suffix = "\xE3\x80\x81",
+};
+
+static const symbol_t japanese_formal_symbols[] = {
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "���", "���", "���", "���", "���",
"���", "���", "���", "���", "���",
+};
+static const struct list_counter_style lcs_japanese_formal = {
+ .name = "japanese-formal",
+ .system = calc_additive_system,
+ .fallback = &lcs_cjk_decimal,
+ .symbols = japanese_formal_symbols,
+ .weights = complex_counter_weights,
+ .items = (sizeof(japanese_formal_symbols) / SYMBOL_SIZE),
+ .range = { .start = -9999, .end = 9999 },
+ .negative = { .pre = "������������" },
+ .suffix = "\xE3\x80\x81",
+};
+
+static const symbol_t korean_hangul_formal_symbols[] = {
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "���", "���", "���", "���", "���",
"���", "���", "���", "���", "���"
+};
+static const struct list_counter_style lcs_korean_hangul_formal = {
+ .name = "korean-hangul-formal",
+ .system = calc_additive_system,
+ .fallback = &lcs_cjk_decimal,
+ .symbols = korean_hangul_formal_symbols,
+ .weights = complex_counter_weights,
+ .items = (sizeof(korean_hangul_formal_symbols) / SYMBOL_SIZE),
+ .range = { .start = -9999, .end = 9999 },
+ .negative = { .pre = "\xEB\xA7\x88\xEC\x9D\xB4\xEB\x84\x88\xEC\x8A\xA4 " },
+ .suffix = ", ",
+};
+
+static const symbol_t korean_hanja_informal_symbols[] = {
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"���",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"���",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"���",
+ "���", "���", "���", "���", "���",
"���", "���", "���", "���", "���"
+};
+static const struct list_counter_style lcs_korean_hanja_informal = {
+ .name = "korean-hanja-informal",
+ .system = calc_additive_system,
+ .fallback = &lcs_cjk_decimal,
+ .symbols = korean_hanja_informal_symbols,
+ .weights = complex_counter_weights,
+ .items = (sizeof(korean_hanja_informal_symbols) / SYMBOL_SIZE),
+ .range = { .start = -9999, .end = 9999 },
+ .negative = { .pre = "\xEB\xA7\x88\xEC\x9D\xB4\xEB\x84\x88\xEC\x8A\xA4 " },
+ .suffix = ", ",
+};
+
+static const symbol_t korean_hanja_formal_symbols[] = {
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "������", "������", "������", "������",
"������", "������", "������", "������",
"������",
+ "���", "���", "���", "���", "���",
"���", "���", "���", "���", "���"
+};
+static const struct list_counter_style lcs_korean_hanja_formal = {
+ .name = "korean-hanja-formal",
+ .system = calc_additive_system,
+ .fallback = &lcs_cjk_decimal,
+ .symbols = korean_hanja_formal_symbols,
+ .weights = complex_counter_weights,
+ .items = (sizeof(korean_hanja_formal_symbols) / SYMBOL_SIZE),
+ .range = { .start = -9999, .end = 9999 },
+ .negative = { .pre = "\xEB\xA7\x88\xEC\x9D\xB4\xEB\x84\x88\xEC\x8A\xA4 " },
+ .suffix = ", ",
+};
+
+
static const struct list_counter_style *
counter_style_from_computed_style(const css_computed_style *style)
@@ -1070,6 +1173,16 @@ counter_style_from_computed_style(const css_computed_style *style)
return &lcs_katakana;
case CSS_LIST_STYLE_TYPE_KATAKANA_IROHA:
return &lcs_katakana_iroha;
+ case CSS_LIST_STYLE_TYPE_JAPANESE_INFORMAL:
+ return &lcs_japanese_informal;
+ case CSS_LIST_STYLE_TYPE_JAPANESE_FORMAL:
+ return &lcs_japanese_formal;
+ case CSS_LIST_STYLE_TYPE_KOREAN_HANGUL_FORMAL:
+ return &lcs_korean_hangul_formal;
+ case CSS_LIST_STYLE_TYPE_KOREAN_HANJA_INFORMAL:
+ return &lcs_korean_hanja_informal;
+ case CSS_LIST_STYLE_TYPE_KOREAN_HANJA_FORMAL:
+ return &lcs_korean_hanja_formal;
}
return NULL;
}
diff --git a/src/select/properties/list_style_type.c
b/src/select/properties/list_style_type.c
index 7560c3b..e32d1b1 100644
--- a/src/select/properties/list_style_type.c
+++ b/src/select/properties/list_style_type.c
@@ -164,6 +164,21 @@ css_error css__cascade_list_style_type(uint32_t opv, css_style
*style,
case LIST_STYLE_TYPE_KATAKANA_IROHA:
value = CSS_LIST_STYLE_TYPE_KATAKANA_IROHA;
break;
+ case LIST_STYLE_TYPE_JAPANESE_INFORMAL:
+ value = CSS_LIST_STYLE_TYPE_JAPANESE_INFORMAL;
+ break;
+ case LIST_STYLE_TYPE_JAPANESE_FORMAL:
+ value = CSS_LIST_STYLE_TYPE_JAPANESE_FORMAL;
+ break;
+ case LIST_STYLE_TYPE_KOREAN_HANGUL_FORMAL:
+ value = CSS_LIST_STYLE_TYPE_KOREAN_HANGUL_FORMAL;
+ break;
+ case LIST_STYLE_TYPE_KOREAN_HANJA_INFORMAL:
+ value = CSS_LIST_STYLE_TYPE_KOREAN_HANJA_INFORMAL;
+ break;
+ case LIST_STYLE_TYPE_KOREAN_HANJA_FORMAL:
+ value = CSS_LIST_STYLE_TYPE_KOREAN_HANJA_FORMAL;
+ break;
}
}
--
Cascading Style Sheets library