LibWeb: Support extended Korean counter styles

This commit is contained in:
Callum Law
2026-02-26 15:25:33 +13:00
committed by Sam Atkins
parent 1877c20c7b
commit d0eabada0b
Notes: github-actions[bot] 2026-02-27 12:12:06 +00:00
10 changed files with 1109 additions and 38 deletions

View File

@@ -7977,6 +7977,48 @@ void Document::build_counter_style_cache()
extended_cjk_range,
"cjk-decimal"_fly_string,
{}));
// https://drafts.csswg.org/css-counter-styles-3/#korean-hangul-formal
// korean-hangul-formal
counter_style_definitions.set(
"korean-hangul-formal"_fly_string,
CSS::CounterStyleDefinition::create(
"korean-hangul-formal"_fly_string,
CSS::CounterStyleAlgorithmOrExtends { CSS::ExtendedCJKCounterStyleAlgorithm { CSS::ExtendedCJKCounterStyleAlgorithm::Type::KoreanHangulFormal } },
CSS::CounterStyleNegativeSign { "\U0000B9C8\U0000C774\U0000B108\U0000C2A4 "_fly_string, ""_fly_string },
{},
", "_fly_string,
extended_cjk_range,
"cjk-decimal"_fly_string,
{}));
// https://drafts.csswg.org/css-counter-styles-3/#korean-hanja-informal
// korean-hanja-informal
counter_style_definitions.set(
"korean-hanja-informal"_fly_string,
CSS::CounterStyleDefinition::create(
"korean-hanja-informal"_fly_string,
CSS::CounterStyleAlgorithmOrExtends { CSS::ExtendedCJKCounterStyleAlgorithm { CSS::ExtendedCJKCounterStyleAlgorithm::Type::KoreanHanjaInformal } },
CSS::CounterStyleNegativeSign { "\U0000B9C8\U0000C774\U0000B108\U0000C2A4 "_fly_string, ""_fly_string },
{},
", "_fly_string,
extended_cjk_range,
"cjk-decimal"_fly_string,
{}));
// https://drafts.csswg.org/css-counter-styles-3/#korean-hanja-formal
// korean-hanja-formal
counter_style_definitions.set(
"korean-hanja-formal"_fly_string,
CSS::CounterStyleDefinition::create(
"korean-hanja-formal"_fly_string,
CSS::CounterStyleAlgorithmOrExtends { CSS::ExtendedCJKCounterStyleAlgorithm { CSS::ExtendedCJKCounterStyleAlgorithm::Type::KoreanHanjaFormal } },
CSS::CounterStyleNegativeSign { "\U0000B9C8\U0000C774\U0000B108\U0000C2A4 "_fly_string, ""_fly_string },
{},
", "_fly_string,
extended_cjk_range,
"cjk-decimal"_fly_string,
{}));
};
CSS::ComputationContext computation_context {