Skip to content

Commit

Permalink
[css-counter-styles] Enable new codepath for Korean counter styles
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=256149
rdar://106193134

Reviewed by Myles C. Maxfield.

The spec defines all the Korean counter styles to have two trailing whitespaces for the negative suffix.
Trailing whitespaces in strings seem to be optimized too cleverly by the build system for UA sheets (this bug does not affect author counter styles).

Replace the second whitespace with \20 to make sure the build system doesn't strip the spaces.

This makes the following tests pass with the new codepath:
imported/w3c/web-platform-tests/css/css-counter-styles/korean-hangul-formal/css3-counter-styles-055.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-formal/css3-counter-styles-065.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-informal/css3-counter-styles-060.html [ ImageOnlyFailure ]

* Source/WebCore/css/CSSCounterStyleRegistry.cpp:
(WebCore::isCounterStyleUnsupportedByUserAgent):
* Source/WebCore/css/counterStyles.css:
(@counter-style korean-hangul-formal):
(@counter-style korean-hanja-informal):
(@counter-style korean-hanja-formal):

Canonical link: https://commits.webkit.org/263542@main
  • Loading branch information
nt1m committed Apr 30, 2023
1 parent e820cde commit d1a6662
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions Source/WebCore/css/CSSCounterStyleRegistry.cpp
Expand Up @@ -206,10 +206,6 @@ bool isCounterStyleUnsupportedByUserAgent(CSSValueID valueID)
case CSSValueTradChineseInformal:
case CSSValueTradChineseFormal:
case CSSValueEthiopicNumeric:
// FIXME: Enable Korean styles (rdar://106193134).
case CSSValueKoreanHangulFormal:
case CSSValueKoreanHanjaFormal:
case CSSValueKoreanHanjaInformal:
case CSSValueNone:
return true;
default:
Expand Down
6 changes: 3 additions & 3 deletions Source/WebCore/css/counterStyles.css
Expand Up @@ -332,7 +332,7 @@
additive-symbols: 9000 \AD6C\CC9C, 8000 \D314\CC9C, 7000 \CE60\CC9C, 6000 \C721\CC9C, 5000 \C624\CC9C, 4000 \C0AC\CC9C, 3000 \C0BC\CC9C, 2000 \C774\CC9C, 1000 \C77C\CC9C, 900 \AD6C\BC31, 800 \D314\BC31, 700 \CE60\BC31, 600 \C721\BC31, 500 \C624\BC31, 400 \C0AC\BC31, 300 \C0BC\BC31, 200 \C774\BC31, 100 \C77C\BC31, 90 \AD6C\C2ED, 80 \D314\C2ED, 70 \CE60\C2ED, 60 \C721\C2ED, 50 \C624\C2ED, 40 \C0AC\C2ED, 30 \C0BC\C2ED, 20 \C774\C2ED, 10 \C77C\C2ED, 9 \AD6C, 8 \D314, 7 \CE60, 6 \C721, 5 \C624, 4 \C0AC, 3 \C0BC, 2 \C774, 1 \C77C, 0 \C601;
/* 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 영 */
suffix: ', ';
negative: "\B9C8\C774\B108\C2A4 ";
negative: "\B9C8\C774\B108\C2A4 \20";
/* 마이너스 (followed by a space) */
}

Expand All @@ -342,7 +342,7 @@
additive-symbols: 9000 \4E5D\5343, 8000 \516B\5343, 7000 \4E03\5343, 6000 \516D\5343, 5000 \4E94\5343, 4000 \56DB\5343, 3000 \4E09\5343, 2000 \4E8C\5343, 1000 \5343, 900 \4E5D\767E, 800 \516B\767E, 700 \4E03\767E, 600 \516D\767E, 500 \4E94\767E, 400 \56DB\767E, 300 \4E09\767E, 200 \4E8C\767E, 100 \767E, 90 \4E5D\5341, 80 \516B\5341, 70 \4E03\5341, 60 \516D\5341, 50 \4E94\5341, 40 \56DB\5341, 30 \4E09\5341, 20 \4E8C\5341, 10 \5341, 9 \4E5D, 8 \516B, 7 \4E03, 6 \516D, 5 \4E94, 4 \56DB, 3 \4E09, 2 \4E8C, 1 \4E00, 0 \96F6;
/* 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 零 */
suffix: ', ';
negative: "\B9C8\C774\B108\C2A4 ";
negative: "\B9C8\C774\B108\C2A4 \20";
/* 마이너스 (followed by a space) */
}

Expand All @@ -352,7 +352,7 @@
additive-symbols: 9000 \4E5D\4EDF, 8000 \516B\4EDF, 7000 \4E03\4EDF, 6000 \516D\4EDF, 5000 \4E94\4EDF, 4000 \56DB\4EDF, 3000 \53C3\4EDF, 2000 \8CB3\4EDF, 1000 \58F9\4EDF, 900 \4E5D\767E, 800 \516B\767E, 700 \4E03\767E, 600 \516D\767E, 500 \4E94\767E, 400 \56DB\767E, 300 \53C3\767E, 200 \8CB3\767E, 100 \58F9\767E, 90 \4E5D\62FE, 80 \516B\62FE, 70 \4E03\62FE, 60 \516D\62FE, 50 \4E94\62FE, 40 \56DB\62FE, 30 \53C3\62FE, 20 \8CB3\62FE, 10 \58F9\62FE, 9 \4E5D, 8 \516B, 7 \4E03, 6 \516D, 5 \4E94, 4 \56DB, 3 \53C3, 2 \8CB3, 1 \58F9, 0 \96F6;
/* 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 零 */
suffix: ', ';
negative: "\B9C8\C774\B108\C2A4 ";
negative: "\B9C8\C774\B108\C2A4 \20";
/* 마이너스 (followed by a space) */
}

Expand Down

0 comments on commit d1a6662

Please sign in to comment.