-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[css-counter-styles] Support CJK counter styles outside of range #46446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
EWS run on previous version of this PR (hash b32655f) |
b32655f
to
723f31f
Compare
EWS run on previous version of this PR (hash 723f31f) |
EWS run on previous version of this PR (hash af07675) |
af07675
to
0124960
Compare
EWS run on current version of this PR (hash 0124960) |
EWS run on previous version of this PR (hash 0124960) |
0124960
to
7befb85
Compare
EWS run on current version of this PR (hash 7befb85) |
EWS run on previous version of this PR (hash 7befb85) |
7befb85
to
178f089
Compare
EWS run on current version of this PR (hash 178f089) |
EWS run on previous version of this PR (hash 178f089)
|
178f089
to
16355ae
Compare
EWS run on previous version of this PR (hash 16355ae) |
16355ae
to
7e4f88e
Compare
EWS run on current version of this PR (hash 7e4f88e) |
EWS run on previous version of this PR (hash 7e4f88e) |
<li value="10000" style="list-style-type: japanese-informal;">The list marker should show (decimal 10000) (japanese-informal: -9999999999999999 9999999999999999).</li> | ||
<li value="-10000" style="list-style-type: japanese-informal;">The list marker should show (decimal -10000) (japanese-informal: -9999999999999999 9999999999999999).</li> | ||
<li value="10000" style="list-style-type: japanese-formal;">The list marker should show (decimal 10000) (japanese-formal: -9999999999999999 9999999999999999).</li> | ||
<li value="-10000" style="list-style-type: japanese-formal;">The list marker should show (decimal -10000) (japanese-formal: -9999999999999999 9999999999999999).</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to use a dash between the numbers, to be consistent with the other entries in this test. :)
addSpace = false; | ||
bool trailingZero = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a comment about what these are about?
<link rel='author' title='Richard Ishida' href='mailto:[email protected]'> | ||
<link rel="author" title="Mats Palmgren" href="mailto:[email protected]"> | ||
<link rel='help' href='http://www.w3.org/TR/css-counter-styles-3/#complex-cjk'> | ||
<link rel="reviewer" title="Chris Lilley" href="mailto:[email protected]" /> | ||
<meta name="assert" content="[Exploratory] list-style-type: trad-chinese-formal produces counter values outside its range without using the prescribed fallback style."> | ||
<style type='text/css'> | ||
<link rel='help' href='https://bugzilla.mozilla.org/show_bug.cgi?id=1738356'> | ||
<style> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing these are import changes? It seems weird to change the credits given the the test writer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have test coverage for values such as:
1,2345,6789 (all digits non-zero)
12,0045,3001 ( leading zero in group, sandwiched zeros in group)
987,000,0123 (skipped group, leading zeros and ones)
509,000,1234 (skipped group, leading one)
?
@fantasai Not yet, it would be helpful to have verified results to test against. |
@igower Get the results from Firefox, they're almost certainly correct. You can cross-check by tracing through the spec algorithm. |
7e4f88e
to
851e952
Compare
EWS run on previous version of this PR (hash 851e952) |
851e952
to
d7bc232
Compare
EWS run on previous version of this PR (hash d7bc232) |
d7bc232
to
55630f8
Compare
EWS run on previous version of this PR (hash 55630f8) |
https://bugs.webkit.org/show_bug.cgi?id=257369 rdar://problem/109875198 Reviewed by NOBODY (OOPS!). Updated the counterForSystemCJK function to account for values in an expanded range. Now in range 10^-16 + 1 to 10^16 -1 for Chinese and Japanese styles. For tests, switched out expected behavior to behavior defined in alt-ref files to match increased range. * LayoutTests/fast/lists/li-values-expected.txt: * LayoutTests/fast/lists/li-values.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-formal/css3-counter-styles-049-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-formal/css3-counter-styles-049.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-informal/counter-japanese-informal-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-informal/css3-counter-styles-044-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-informal/css3-counter-styles-044.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hangul-formal/css3-counter-styles-054-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hangul-formal/css3-counter-styles-054.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-formal/css3-counter-styles-064-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-formal/css3-counter-styles-064.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-informal/css3-counter-styles-059-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-informal/css3-counter-styles-059.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-formal/css3-counter-styles-078-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-formal/css3-counter-styles-078.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-informal/counter-simp-chinese-informal-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-informal/css3-counter-styles-073-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-informal/css3-counter-styles-073.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-formal/css3-counter-styles-088-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-formal/css3-counter-styles-088.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-informal/counter-trad-chinese-informal-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-informal/css3-counter-styles-083-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-informal/css3-counter-styles-083.html: * Source/WebCore/css/CSSCounterStyle.cpp: (WebCore::counterForSystemCJK): (WebCore::CSSCounterStyle::counterForSystemSimplifiedChineseInformal): (WebCore::CSSCounterStyle::counterForSystemSimplifiedChineseFormal): (WebCore::CSSCounterStyle::counterForSystemTraditionalChineseInformal): (WebCore::CSSCounterStyle::counterForSystemTraditionalChineseFormal): (WebCore::CSSCounterStyle::counterForSystemJapaneseInformal): (WebCore::CSSCounterStyle::counterForSystemJapaneseFormal): (WebCore::CSSCounterStyle::counterForSystemKoreanHangulFormal): (WebCore::CSSCounterStyle::counterForSystemKoreanHanjaInformal): (WebCore::CSSCounterStyle::counterForSystemKoreanHanjaFormal): (WebCore::CSSCounterStyle::initialRepresentation const): (WebCore::CSSCounterStyle::isInRange const): * Source/WebCore/css/CSSCounterStyle.h: * Source/WebCore/css/CSSCounterStyleDescriptors.cpp: (WebCore::CSSCounterStyleDescriptors::areSymbolsValidForSystem): (WebCore::CSSCounterStyleDescriptors::systemCSSText const): * Source/WebCore/css/CSSCounterStyleDescriptors.h: * Source/WebCore/css/CSSCounterStyleRule.cpp: (WebCore::toCounterStyleSystemEnum): * Source/WebCore/css/CSSValueKeywords.in: * Source/WebCore/css/counterStyles.css: (@counter-style simp-chinese-informal): (@counter-style simp-chinese-formal): (@counter-style trad-chinese-informal): (@counter-style trad-chinese-formal): (@counter-style japanese-informal): (@counter-style japanese-formal): (@counter-style korean-hangul-formal): (@counter-style korean-hanja-informal): (@counter-style korean-hanja-formal): * Source/WebCore/css/parser/CSSPropertyParserConsumer+CounterStyles.cpp: (WebCore::CSSPropertyParserHelpers::consumeCounterStyleSystem):
55630f8
to
3f54df7
Compare
EWS run on current version of this PR (hash 3f54df7) |
Tests have been included for 123456789 (all digits non-zero), 1200453001 ( leading zero in group, sandwiched zeros in group), 700000123 (skipped group, leading zeros and ones), 1000001234 (skipped group, leading one). All Chinese, Japanese, and Korean styles have been updated. WPT tests have been changed to fit the altered ranges. |
3f54df7
3f54df7
🛠 playstation