Skip to content

Commit

Permalink
Extend supported range of 'cjk-heavenly-stem' and 'cjk-earthly-branch'
Browse files Browse the repository at this point in the history
The two counter styles are officially specified as 'fixed', supporting
only a fixed range. However, the legacy implementation has been
supporting them as alphabetic counter styles. So this patch extends
their ranges to match the existing behavior.

This patch also enables WPT tests in css/css-counter-styles as a
verification. The ref files are added using the same method as
crrev.com/c/2674491

Bug: 687225
Change-Id: Ifc4a6b5240c0f718ef4746bfe9501258adb85112
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2676426
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#851233}
  • Loading branch information
xiaochengh authored and chromium-wpt-export-bot committed Feb 5, 2021
1 parent 75beb1c commit 2f9d75e
Show file tree
Hide file tree
Showing 12 changed files with 243 additions and 12 deletions.
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8"/>
<title>cjk-earthly-branch, 0-12</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#simple-numeric'>
<meta name='flags' content='font'>
<meta name="assert" content="list-style-type:cjk-earthly-branch produces numbers up to 12 per the spec.">
<style type='text/css'>
ol li { list-style-type: cjk-earthly-branch; }
/* the following CSS is not part of the test */
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
</style>
</head>
<body>
<p class="instructions">Test passes if the two columns are the same, IGNORING the suffix.</p>
<div class="test">
<ol>
<div><bdi dir=ltr>子、</bdi></div>
<div><bdi dir=ltr>丑、</bdi></div>
<div><bdi dir=ltr>寅、</bdi></div>
<div><bdi dir=ltr>卯、</bdi></div>
<div><bdi dir=ltr>辰、</bdi></div>
<div><bdi dir=ltr>巳、</bdi></div>
<div><bdi dir=ltr>午、</bdi></div>
<div><bdi dir=ltr>未、</bdi></div>
<div><bdi dir=ltr>申、</bdi></div>
<div><bdi dir=ltr>酉、</bdi></div>
<div><bdi dir=ltr>戌、</bdi></div>
<div><bdi dir=ltr>亥、</bdi></div>
</ol></div>
<!--Notes:
You will need an appropriate font to run this test.
To see the ASCII decimal number associated with a row, mouse over it and the number will pop up in a tooltip.
-->
</body>
</html>
Expand Up @@ -5,13 +5,13 @@
<title>cjk-earthly-branch, 0-12</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#simple-numeric'>
<meta name='flags' content='font'>
<link rel='match' href='css3-counter-styles-201-ref.html'>
<meta name="assert" content="list-style-type:cjk-earthly-branch produces numbers up to 12 per the spec.">
<style type='text/css'>
ol li { list-style-type: cjk-earthly-branch; }
/* the following CSS is not part of the test */
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
ol { margin: 0; padding-left: 8em; list-style-position: inside; }
</style>
</head>
<body>
Expand Down
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8"/>
<title>cjk-earthly-branch, 13+</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#simple-numeric'>
<meta name='flags' content='font'>
<meta name="assert" content="list-style-type: cjk-earthly-branch produces numbers after 12 per the spec.">
<style type='text/css'>
ol li { list-style-type: cjk-earthly-branch; }
/* the following CSS is not part of the test */
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
</style>
</head>
<body>
<p class="instructions">Test passes if the two columns are the same, IGNORING the suffix.</p>
<div class="test">
<ol start="13"><div><bdi dir=ltr>子子、</bdi>子子</div></ol>
<ol start="14"><div><bdi dir=ltr>子丑、</bdi>子丑</div></ol>
<ol start="77"><div><bdi dir=ltr>巳辰、</bdi>巳辰</div></ol>
<ol start="80"><div><bdi dir=ltr>巳未、</bdi>巳未</div></ol>
<ol start="99"><div><bdi dir=ltr>未寅、</bdi>未寅</div></ol>
<ol start="100"><div><bdi dir=ltr>未卯、</bdi>未卯</div></ol>
<ol start="101"><div><bdi dir=ltr>未辰、</bdi>未辰</div></ol>
<ol start="222"><div><bdi dir=ltr>子巳巳、</bdi>子巳巳</div></ol>
<ol start="540"><div><bdi dir=ltr>寅未亥、</bdi>寅未亥</div></ol>
<ol start="999"><div><bdi dir=ltr>巳戌寅、</bdi>巳戌寅</div></ol>
<ol start="1000"><div><bdi dir=ltr>巳戌卯、</bdi>巳戌卯</div></ol>
<ol start="1005"><div><bdi dir=ltr>巳戌申、</bdi>巳戌申</div></ol>
<ol start="1060"><div><bdi dir=ltr>午卯卯、</bdi>午卯卯</div></ol>
<ol start="1065"><div><bdi dir=ltr>午卯申、</bdi>午卯申</div></ol>
<ol start="1800"><div><bdi dir=ltr>亥辰亥、</bdi>亥辰亥</div></ol>
<ol start="1860"><div><bdi dir=ltr>亥酉亥、</bdi>亥酉亥</div></ol>
<ol start="5865"><div><bdi dir=ltr>寅卯未申、</bdi>寅卯未申</div></ol>
<ol start="7005"><div><bdi dir=ltr>寅亥午申、</bdi>寅亥午申</div></ol>
<ol start="7800"><div><bdi dir=ltr>卯巳子亥、</bdi>卯巳子亥</div></ol>
<ol start="7864"><div><bdi dir=ltr>卯巳午卯、</bdi>卯巳午卯</div></ol>
<ol start="9999"><div><bdi dir=ltr>辰申辰寅、</bdi>辰申辰寅</div></ol>
</div>
<!--Notes:
You will need an appropriate font to run this test.
The test relies on the start attribute working.
To see the ASCII decimal number associated with a row, mouse over it and the number will pop up in a tooltip.
-->
</body>
</html>
Expand Up @@ -5,13 +5,13 @@
<title>cjk-earthly-branch, 13+</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#simple-numeric'>
<meta name='flags' content='font'>
<link rel='match' href='css3-counter-styles-202-ref.html'>
<meta name="assert" content="list-style-type: cjk-earthly-branch produces numbers after 12 per the spec.">
<style type='text/css'>
ol li { list-style-type: cjk-earthly-branch; }
/* the following CSS is not part of the test */
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
ol { margin: 0; padding-left: 8em; list-style-position: inside; }
</style>
</head>
<body>
Expand Down
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8"/>
<title>cjk-earthly-branch, suffix</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#simple-numeric'>
<meta name='flags' content='font'>
<meta name="assert" content="list-style-type: cjk-earthly-branch produces a suffix per the spec.">
<style type='text/css'>
ol li { list-style-type: cjk-earthly-branch; }
/* the following CSS is not part of the test */
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
</style>
</head>
<body>
<p class="instructions">Test passes if the numbers AND the suffix in each of the two columns is the same.</p>
<div class='test'><ol>
<div><bdi dir=ltr>子、</bdi>子、</div>
<div><bdi dir=ltr>丑、</bdi>丑、</div>
</ol>
</div>
<!--Notes:
You will need an appropriate font to run this test.
To see the ASCII decimal number associated with a row, mouse over it and the number will pop up in a tooltip.
-->
</body>
</html>
Expand Up @@ -5,13 +5,13 @@
<title>cjk-earthly-branch, suffix</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#simple-numeric'>
<meta name='flags' content='font'>
<link rel='match' href='css3-counter-styles-203-ref.html'>
<meta name="assert" content="list-style-type: cjk-earthly-branch produces a suffix per the spec.">
<style type='text/css'>
ol li { list-style-type: cjk-earthly-branch; }
/* the following CSS is not part of the test */
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
ol { margin: 0; padding-left: 8em; list-style-position: inside; }
</style>
</head>
<body>
Expand Down
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8"/>
<title>cjk-heavenly-stem, 0-9</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#simple-numeric'>
<meta name='flags' content='font'>
<meta name="assert" content="list-style-type:cjk-heavenly-stem produces numbers up to 12 per the spec.">
<style type='text/css'>
ol li { list-style-type: cjk-heavenly-stem; }
/* the following CSS is not part of the test */
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
</style>
</head>
<body>
<p class="instructions">Test passes if the two columns are the same, IGNORING the suffix.</p>
<div class="test">
<ol>
<div><bdi dir=ltr>甲、</bdi></div>
<div><bdi dir=ltr>乙、</bdi></div>
<div><bdi dir=ltr>丙、</bdi></div>
<div><bdi dir=ltr>丁、</bdi></div>
<div><bdi dir=ltr>戊、</bdi></div>
<div><bdi dir=ltr>己、</bdi></div>
<div><bdi dir=ltr>庚、</bdi></div>
<div><bdi dir=ltr>辛、</bdi></div>
<div><bdi dir=ltr>壬、</bdi></div>
<div><bdi dir=ltr>癸、</bdi></div>
</ol></div>
<!--Notes:
You will need an appropriate font to run this test.
To see the ASCII decimal number associated with a row, mouse over it and the number will pop up in a tooltip.
-->
</body>
</html>
Expand Up @@ -5,13 +5,13 @@
<title>cjk-heavenly-stem, 0-9</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#simple-numeric'>
<meta name='flags' content='font'>
<link rel='match' href='css3-counter-styles-204-ref.html'>
<meta name="assert" content="list-style-type:cjk-heavenly-stem produces numbers up to 12 per the spec.">
<style type='text/css'>
ol li { list-style-type: cjk-heavenly-stem; }
/* the following CSS is not part of the test */
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
ol { margin: 0; padding-left: 8em; list-style-position: inside; }
</style>
</head>
<body>
Expand Down
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8"/>
<title>cjk-heavenly-stem, 10+</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#simple-numeric'>
<meta name='flags' content='font'>
<meta name="assert" content="list-style-type: cjk-heavenly-stem produces numbers after 9 per the spec.">
<style type='text/css'>
ol li { list-style-type: cjk-heavenly-stem; }
/* the following CSS is not part of the test */
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
</style>
</head>
<body>
<p class="instructions">Test passes if the two columns are the same, IGNORING the suffix.</p>
<div class="test">
<ol start="11"><div><bdi dir=ltr>甲甲、</bdi>甲甲</div></ol>
<ol start="12"><div><bdi dir=ltr>甲乙、</bdi>甲乙</div></ol>
<ol start="43"><div><bdi dir=ltr>丁丙、</bdi>丁丙</div></ol>
<ol start="77"><div><bdi dir=ltr>庚庚、</bdi>庚庚</div></ol>
<ol start="80"><div><bdi dir=ltr>庚癸、</bdi>庚癸</div></ol>
<ol start="99"><div><bdi dir=ltr>壬壬、</bdi>壬壬</div></ol>
<ol start="100"><div><bdi dir=ltr>壬癸、</bdi>壬癸</div></ol>
<ol start="101"><div><bdi dir=ltr>癸甲、</bdi>癸甲</div></ol>
<ol start="222"><div><bdi dir=ltr>乙乙乙、</bdi>乙乙乙</div></ol>
<ol start="540"><div><bdi dir=ltr>戊丙癸、</bdi>戊丙癸</div></ol>
<ol start="999"><div><bdi dir=ltr>壬壬壬、</bdi>壬壬壬</div></ol>
<ol start="1000"><div><bdi dir=ltr>壬壬癸、</bdi>壬壬癸</div></ol>
<ol start="1005"><div><bdi dir=ltr>壬癸戊、</bdi>壬癸戊</div></ol>
<ol start="1060"><div><bdi dir=ltr>癸戊癸、</bdi>癸戊癸</div></ol>
<ol start="1065"><div><bdi dir=ltr>癸己戊、</bdi>癸己戊</div></ol>
<ol start="1800"><div><bdi dir=ltr>甲庚壬癸、</bdi>甲庚壬癸</div></ol>
<ol start="1860"><div><bdi dir=ltr>甲辛戊癸、</bdi>甲辛戊癸</div></ol>
<ol start="5865"><div><bdi dir=ltr>戊辛己戊、</bdi>戊辛己戊</div></ol>
<ol start="7005"><div><bdi dir=ltr>己壬癸戊、</bdi>己壬癸戊</div></ol>
<ol start="7800"><div><bdi dir=ltr>庚庚壬癸、</bdi>庚庚壬癸</div></ol>
<ol start="7864"><div><bdi dir=ltr>庚辛己丁、</bdi>庚辛己丁</div></ol>
<ol start="9999"><div><bdi dir=ltr>壬壬壬壬、</bdi>壬壬壬壬</div></ol>
</div>
<!--Notes:
You will need an appropriate font to run this test.
The test relies on the start attribute working.
To see the ASCII decimal number associated with a row, mouse over it and the number will pop up in a tooltip.
-->
</body>
</html>
Expand Up @@ -5,13 +5,13 @@
<title>cjk-heavenly-stem, 10+</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#simple-numeric'>
<meta name='flags' content='font'>
<link rel='match' href='css3-counter-styles-205-ref.html'>
<meta name="assert" content="list-style-type: cjk-heavenly-stem produces numbers after 9 per the spec.">
<style type='text/css'>
ol li { list-style-type: cjk-heavenly-stem; }
/* the following CSS is not part of the test */
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
ol { margin: 0; padding-left: 8em; list-style-position: inside; }
</style>
</head>
<body>
Expand Down
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8"/>
<title>cjk-heavenly-stem, suffix</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#simple-numeric'>
<meta name='flags' content='font'>
<meta name="assert" content="list-style-type: cjk-heavenly-stem produces a suffix per the spec.">
<style type='text/css'>
ol li { list-style-type: cjk-heavenly-stem; }
/* the following CSS is not part of the test */
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
</style>
</head>
<body>
<p class="instructions">Test passes if the numbers AND the suffix in each of the two columns is the same.</p>
<div class='test'><ol>
<div><bdi dir=ltr>甲、</bdi>甲、</div>
<div><bdi dir=ltr>乙、</bdi>乙、</div>
</ol>
</div>
<!--Notes:
You will need an appropriate font to run this test.
To see the ASCII decimal number associated with a row, mouse over it and the number will pop up in a tooltip.
-->
</body>
</html>
Expand Up @@ -5,13 +5,13 @@
<title>cjk-heavenly-stem, suffix</title>
<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#simple-numeric'>
<meta name='flags' content='font'>
<link rel='match' href='css3-counter-styles-206-ref.html'>
<meta name="assert" content="list-style-type: cjk-heavenly-stem produces a suffix per the spec.">
<style type='text/css'>
ol li { list-style-type: cjk-heavenly-stem; }
/* the following CSS is not part of the test */
.test { font-size: 25px; }
ol { margin: 0; padding-left: 8em; }
ol { margin: 0; padding-left: 8em; list-style-position: inside; }
</style>
</head>
<body>
Expand Down

0 comments on commit 2f9d75e

Please sign in to comment.