diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /testing/web-platform/tests/css/css-text | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-text')
23 files changed, 310 insertions, 15 deletions
diff --git a/testing/web-platform/tests/css/css-text/crashtests/eol-spaces-bidi-min-content-crash.html b/testing/web-platform/tests/css/css-text/crashtests/eol-spaces-bidi-min-content-crash.html new file mode 100644 index 0000000000..d8c3ec337b --- /dev/null +++ b/testing/web-platform/tests/css/css-text/crashtests/eol-spaces-bidi-min-content-crash.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com"> +<link rel="help" href="https://issues.chromium.org/issues/324684931"> + +<style> + div { + width: min-content; + } +</style> + +<div dir="rtl">X   X</div> diff --git a/testing/web-platform/tests/css/css-text/inheritance.html b/testing/web-platform/tests/css/css-text/inheritance.html index 2043afe999..f41a5edcaf 100644 --- a/testing/web-platform/tests/css/css-text/inheritance.html +++ b/testing/web-platform/tests/css/css-text/inheritance.html @@ -3,7 +3,7 @@ <head> <meta charset="utf-8"> <title>Inheritance of CSS Text properties</title> -<link rel="help" href="https://drafts.csswg.org/css-text/#property-index"> +<link rel="help" href="https://www.w3.org/TR/css-text/#property-index"> <meta name="assert" content="Properties inherit according to the spec."> <meta name="assert" content="Properties have initial values according to the spec."> <script src="/resources/testharness.js"></script> @@ -17,7 +17,7 @@ <script> assert_inherited('hanging-punctuation', 'none', 'first last'); assert_inherited('hyphens', 'manual', 'none'); -assert_inherited('letter-spacing', 'normal', '10px'); +assert_inherited('letter-spacing', 'normal', '10px', '10%'); assert_inherited('line-break', 'auto', 'strict'); assert_inherited('overflow-wrap', 'normal', 'break-word'); assert_inherited('tab-size', '8', '10px'); @@ -33,7 +33,7 @@ assert_inherited('text-wrap-style', 'auto', 'balance'); assert_inherited('white-space', 'normal', 'pre-wrap'); assert_inherited('white-space-collapse', 'collapse', 'preserve'); assert_inherited('word-break', 'normal', 'break-all'); -assert_inherited('word-spacing', '0px', '10px'); +assert_inherited('word-spacing', '0px', '10px', '10%'); assert_inherited('word-wrap', 'normal', 'break-word'); </script> </body> diff --git a/testing/web-platform/tests/css/css-text/letter-spacing/letter-spacing-percent-001.html b/testing/web-platform/tests/css/css-text/letter-spacing/letter-spacing-percent-001.html new file mode 100644 index 0000000000..522320de58 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/letter-spacing/letter-spacing-percent-001.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html lang="en" > +<meta charset="utf-8"> +<title>letter-spacing as percentages</title> +<link rel='author' title='Elika J. Etemad' href='http://fantasai.inkedblade.net/contact'> +<link rel='help' href='https://www.w3.org/TR/css-text-4/#letter-spacing'> +<link rel='match' href='reference/letter-spacing-percent-001-ref.html'> +<meta name="assert" content="Percentage values of letter-spacing are relative to the current font-size."> +<style type='text/css'> + div { font-size: 20px; line-height: 1; color: blue; } + small { font-size: 50%; } +</style> + +<p>Test passes if the pattern is identical on all four lines. + +<div style="letter-spacing: 0.1em">ABC123().*$いろはx x x፡x་x + <small style="letter-spacing: .1em">ABC123().*$いろはx x x፡x་x</small></div> +<div style="letter-spacing: 10%">ABC123().*$いろはx x x፡x་x + <small>ABC123().*$いろはx x x፡x་x</small></div> +<div style="letter-spacing: calc(0.05em + 5%)">ABC123().*$いろはx x x፡x་x + <small style="letter-spacing: calc(0.05em + 5%)">ABC123().*$いろはx x x፡x་x</small></div> +<div style="letter-spacing: 10%; font-size: 0.1em"><div style="font-size: 20px">ABC123().*$いろはx x x፡x་x + <small>ABC123().*$いろはx x x፡x་x</small></div></div> diff --git a/testing/web-platform/tests/css/css-text/letter-spacing/reference/letter-spacing-percent-001-ref.html b/testing/web-platform/tests/css/css-text/letter-spacing/reference/letter-spacing-percent-001-ref.html new file mode 100644 index 0000000000..1025ecb67c --- /dev/null +++ b/testing/web-platform/tests/css/css-text/letter-spacing/reference/letter-spacing-percent-001-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html lang="en" > +<meta charset="utf-8"> +<title>letter-spacing as percentages</title> +<style type='text/css'> + div { font-size: 20px; line-height: 1; color: blue; } + small { font-size: 50%; } +</style> + +<p>Test passes if the pattern is identical on all four lines. + +<div style="letter-spacing: 0.1em">ABC123().*$いろはx x x፡x་x + <small style="letter-spacing: 0.1em">ABC123().*$いろはx x x፡x་x</small></div> +<div style="letter-spacing: 0.1em">ABC123().*$いろはx x x፡x་x + <small style="letter-spacing: 0.1em">ABC123().*$いろはx x x፡x་x</small></div> +<div style="letter-spacing: 0.1em">ABC123().*$いろはx x x፡x་x + <small style="letter-spacing: 0.1em">ABC123().*$いろはx x x፡x་x</small></div> +<div style="letter-spacing: 0.1em">ABC123().*$いろはx x x፡x་x + <small style="letter-spacing: 0.1em">ABC123().*$いろはx x x፡x་x</small></div> diff --git a/testing/web-platform/tests/css/css-text/parsing/letter-spacing-computed.html b/testing/web-platform/tests/css/css-text/parsing/letter-spacing-computed.html index 45417d1b4a..a7ef1390c1 100644 --- a/testing/web-platform/tests/css/css-text/parsing/letter-spacing-computed.html +++ b/testing/web-platform/tests/css/css-text/parsing/letter-spacing-computed.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Text: getComputedStyle().letterSpacing</title> <link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-letter-spacing"> -<meta name="assert" content="letter-spacing computed value is an absolute length."> +<meta name="assert" content="letter-spacing computed value is an absolute length and/or percentage."> <meta name="assert" content="'normal' computes to zero, but the resolved value of 0px is 'normal', so that's the value that is observed."> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> @@ -24,6 +24,10 @@ test_computed_value("letter-spacing", "0px", "normal"); test_computed_value("letter-spacing", "10px"); test_computed_value("letter-spacing", "-20px"); test_computed_value("letter-spacing", "calc(10px - 0.5em)", "-10px"); +test_computed_value("letter-spacing", "110%"); +test_computed_value("letter-spacing", "-5%"); +test_computed_value("letter-spacing", "calc(10% - 20%)", "-10%"); +test_computed_value("letter-spacing", "calc(10px - (5% + 10%)", "calc(-15% + 10px)"); </script> </body> </html> diff --git a/testing/web-platform/tests/css/css-text/parsing/letter-spacing-invalid.html b/testing/web-platform/tests/css/css-text/parsing/letter-spacing-invalid.html index e9ad4e56a5..e32b98c6d7 100644 --- a/testing/web-platform/tests/css/css-text/parsing/letter-spacing-invalid.html +++ b/testing/web-platform/tests/css/css-text/parsing/letter-spacing-invalid.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Text Module Test: parsing letter-spacing with invalid values</title> <link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-letter-spacing"> -<meta name="assert" content="letter-spacing supports only the grammar 'normal | <length>'."> +<meta name="assert" content="letter-spacing supports only the grammar 'normal | <length-percentage>'."> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/parsing-testcommon.js"></script> @@ -13,10 +13,9 @@ <script> test_invalid_value("letter-spacing", "auto"); test_invalid_value("letter-spacing", "20"); -test_invalid_value("letter-spacing", "30%"); -test_invalid_value("letter-spacing", "calc(40% + 50px)"); test_invalid_value("letter-spacing", "normal 10px"); +test_invalid_value("letter-spacing", "10% 10px"); </script> </body> </html> diff --git a/testing/web-platform/tests/css/css-text/parsing/letter-spacing-valid.html b/testing/web-platform/tests/css/css-text/parsing/letter-spacing-valid.html index 740d1fc398..f20fa21de1 100644 --- a/testing/web-platform/tests/css/css-text/parsing/letter-spacing-valid.html +++ b/testing/web-platform/tests/css/css-text/parsing/letter-spacing-valid.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Text Module Test: parsing letter-spacing with valid values</title> <link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-letter-spacing"> -<meta name="assert" content="letter-spacing supports the full grammar 'normal | <length>'."> +<meta name="assert" content="letter-spacing supports the full grammar 'normal | <length-percentage>'."> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/parsing-testcommon.js"></script> @@ -12,10 +12,17 @@ <body> <script> test_valid_value("letter-spacing", "normal"); - test_valid_value("letter-spacing", "0", "0px"); + test_valid_value("letter-spacing", "-10px"); +test_valid_value("letter-spacing", "20px"); test_valid_value("letter-spacing", "calc(2em + 3ex)"); + +// Level 4 adds percentages +test_valid_value("letter-spacing", "120%"); +test_valid_value("letter-spacing", "-10%"); +test_valid_value("letter-spacing", "calc(2ch - 30%)", "calc(-30% + 2ch)"); +test_valid_value("letter-spacing", "calc(40% + 50px)"); </script> </body> </html> diff --git a/testing/web-platform/tests/css/css-text/parsing/webkit-text-stroke-computed.html b/testing/web-platform/tests/css/css-text/parsing/webkit-text-stroke-computed.html new file mode 100644 index 0000000000..0dadfe402a --- /dev/null +++ b/testing/web-platform/tests/css/css-text/parsing/webkit-text-stroke-computed.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS webkit-text-stroke Test: Computed webkit-text-stroke</title> +<link rel="author" title="Takuya Kurimoto" href="mailto:takuya004869@gmail.com"> +<link rel="help" href="https://compat.spec.whatwg.org/#propdef--webkit-text-stroke"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/computed-testcommon.js"></script> +<style> + #target { + color: lime; + } +</style> +</head> +<body> +<div id="target"></div> +<script> +test_computed_value("-webkit-text-stroke", "green", "0px rgb(0, 128, 0)"); +test_computed_value("-webkit-text-stroke", "3px", "3px rgb(0, 255, 0)"); +test_computed_value("-webkit-text-stroke", "1px red", "1px rgb(255, 0, 0)"); +</script> +</body> +</html> diff --git a/testing/web-platform/tests/css/css-text/parsing/word-spacing-computed.html b/testing/web-platform/tests/css/css-text/parsing/word-spacing-computed.html index 192dec6f7a..7c3f989525 100644 --- a/testing/web-platform/tests/css/css-text/parsing/word-spacing-computed.html +++ b/testing/web-platform/tests/css/css-text/parsing/word-spacing-computed.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Text: getComputedStyle().wordSpacing</title> <link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-word-spacing"> -<meta name="assert" content="word-spacing computed value is an absolute length."> +<meta name="assert" content="word-spacing computed value is an absolute length and/or percentage."> <meta name="assert" content="'normal' computes to zero."> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> @@ -19,10 +19,15 @@ <div id="target"></div> <script> test_computed_value("word-spacing", "normal", "0px"); +test_computed_value("word-spacing", "0", "0px"); test_computed_value("word-spacing", "10px"); test_computed_value("word-spacing", "-20px"); test_computed_value("word-spacing", "calc(10px - 0.5em)", "-10px"); +test_computed_value("word-spacing", "110%"); +test_computed_value("word-spacing", "-5%"); +test_computed_value("word-spacing", "calc(10% - 20%)", "-10%"); +test_computed_value("word-spacing", "calc(10px - (5% + 10%)", "calc(-15% + 10px)"); </script> </body> </html> diff --git a/testing/web-platform/tests/css/css-text/parsing/word-spacing-invalid.html b/testing/web-platform/tests/css/css-text/parsing/word-spacing-invalid.html index 3a1c4ca487..ae8e121b9d 100644 --- a/testing/web-platform/tests/css/css-text/parsing/word-spacing-invalid.html +++ b/testing/web-platform/tests/css/css-text/parsing/word-spacing-invalid.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Text Module Test: parsing word-spacing with invalid values</title> <link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-word-spacing"> -<meta name="assert" content="word-spacing supports only the grammar 'normal | <length>'."> +<meta name="assert" content="word-spacing supports only the grammar 'normal | <length-percentage>'."> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/parsing-testcommon.js"></script> @@ -12,9 +12,9 @@ <body> <script> test_invalid_value("word-spacing", "auto"); -test_invalid_value("word-spacing", "20%"); test_invalid_value("word-spacing", "normal 10px"); +test_invalid_value("word-spacing", "10% 10px"); </script> </body> </html> diff --git a/testing/web-platform/tests/css/css-text/parsing/word-spacing-valid.html b/testing/web-platform/tests/css/css-text/parsing/word-spacing-valid.html index 217b2488f5..640f697f70 100644 --- a/testing/web-platform/tests/css/css-text/parsing/word-spacing-valid.html +++ b/testing/web-platform/tests/css/css-text/parsing/word-spacing-valid.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>CSS Text Module Test: parsing word-spacing with valid values</title> <link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-word-spacing"> -<meta name="assert" content="word-spacing supports the full grammar 'normal | <length>'."> +<meta name="assert" content="word-spacing supports the full grammar 'normal | <length-percentage>'."> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/parsing-testcommon.js"></script> @@ -12,11 +12,17 @@ <body> <script> test_valid_value("word-spacing", "normal"); +test_valid_value("word-spacing", "0", "0px"); test_valid_value("word-spacing", "10px"); test_valid_value("word-spacing", "-20px"); test_valid_value("word-spacing", "calc(2em + 3ex)"); -test_valid_value("word-spacing", "0", "0px"); + +// Level 4 adds percentages +test_valid_value("word-spacing", "120%"); +test_valid_value("word-spacing", "-10%"); +test_valid_value("word-spacing", "calc(2ch - 30%)", "calc(-30% + 2ch)"); +test_valid_value("word-spacing", "calc(40% + 50px)"); </script> </body> </html> diff --git a/testing/web-platform/tests/css/css-text/text-spacing-trim/text-spacing-trim-span-001-ref.html b/testing/web-platform/tests/css/css-text/text-spacing-trim/text-spacing-trim-span-001-ref.html new file mode 100644 index 0000000000..072fd1e917 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/text-spacing-trim/text-spacing-trim-span-001-ref.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<script src="support/variant-class.js"></script> +<style> +@font-face { + font-family: halt-font; + src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt.otf'); +} +#container { + font-family: halt-font; + font-size: 20px; + inline-size: 4em; + text-spacing-trim: space-all; +} +.vrl { + writing-mode: vertical-rl; +} +halt { + font-feature-settings: 'halt' 1, 'vhal' 1; +} +.trim-start { + ps, ls { font-feature-settings: 'halt' 1, 'vhal' 1; } +} +.space-first { + ls { font-feature-settings: 'halt' 1, 'vhal' 1; } +} +</style> +<div id="container"> + <div>国)<halt>(国</halt></div> + <div>国国国)<ls>(国</ls></div> +</div> diff --git a/testing/web-platform/tests/css/css-text/text-spacing-trim/text-spacing-trim-span-001.html b/testing/web-platform/tests/css/css-text/text-spacing-trim/text-spacing-trim-span-001.html new file mode 100644 index 0000000000..623abbf7c7 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/text-spacing-trim/text-spacing-trim-span-001.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-spacing-trim-property"> +<link rel="match" href="text-spacing-trim-span-001-ref.html"> +<meta name="variant" content="?class=halt,htb"> +<meta name="variant" content="?class=chws,htb"> +<meta name="variant" content="?class=halt,vrl"> +<meta name="variant" content="?class=chws,vrl"> +<meta name="variant" content="?class=space-first,halt,htb"> +<meta name="variant" content="?class=space-first,chws,htb"> +<meta name="variant" content="?class=space-first,halt,vrl"> +<meta name="variant" content="?class=space-first,chws,vrl"> +<meta name="variant" content="?class=trim-start,halt,htb"> +<meta name="variant" content="?class=trim-start,chws,htb"> +<meta name="variant" content="?class=trim-start,halt,vrl"> +<meta name="variant" content="?class=trim-start,chws,vrl"> +<script src="support/variant-class.js"></script> +<style> +@font-face { + font-family: halt-font; + src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt.otf'); +} +@font-face { + font-family: chws-font; + src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-chws.otf'); +} +#container { + font-family: halt-font; + font-size: 20px; + inline-size: 4em; +} +.chws #container { + font-family: chws-font; +} +.vrl { + writing-mode: vertical-rl; +} +.trim-start { + text-spacing-trim: trim-start; +} +.space-first { + text-spacing-trim: space-first; +} +</style> +<div id="container"> + <div>国)<span>(国</span></div> + <div>国国国)<span>(国</span></div> +</div> diff --git a/testing/web-platform/tests/css/css-text/white-space/reference/text-wrap-balance-003-ref.html b/testing/web-platform/tests/css/css-text/white-space/reference/text-wrap-balance-003-ref.html new file mode 100644 index 0000000000..318480bb50 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/white-space/reference/text-wrap-balance-003-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> +<style> +div { + font: 15px Ahem; + width: 35ch; + margin: 1em; +} +.green { + color: green; +} +.blue { + color: blue; +} +</style> +<p>Both test blocks (green) should have the same layout as the reference (blue):</p> +<div class="green">The quickest brown fox<br>jumped over the lazy dog</div> +<div class="green">The quickest brown fox<br>jumped over the lazy dog</div> +<div class="blue">The quickest brown fox<br>jumped over the lazy dog</div> diff --git a/testing/web-platform/tests/css/css-text/white-space/text-wrap-balance-003.html b/testing/web-platform/tests/css/css-text/white-space/text-wrap-balance-003.html new file mode 100644 index 0000000000..a2eb8bbff5 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/white-space/text-wrap-balance-003.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-wrap-style"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1881855"> +<link rel="match" href="reference/text-wrap-balance-003-ref.html"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> +<style> +div { + font: 15px Ahem; + width: 35ch; + margin: 1em; +} +.test { + text-wrap: balance; + color: green; +} +.ref { + color: blue; +} +</style> +<p>Both test blocks (green) should have the same layout as the reference (blue):</p> +<div class="test">The quickest brown fox jumped over the lazy dog</div> +<!-- inline child elements should not affect wrapping --> +<div class="test">The <span>quickest <span>brown</span> fox</span> jumped <span>over</span> the <span>lazy dog</span></div> +<div class="ref">The quickest brown fox<br>jumped over the lazy dog</div> diff --git a/testing/web-platform/tests/css/css-text/white-space/trailing-space-and-text-alignment-002.html b/testing/web-platform/tests/css/css-text/white-space/trailing-space-and-text-alignment-002.html index 30e37908a2..6ee7d03d9d 100644 --- a/testing/web-platform/tests/css/css-text/white-space/trailing-space-and-text-alignment-002.html +++ b/testing/web-platform/tests/css/css-text/white-space/trailing-space-and-text-alignment-002.html @@ -1,5 +1,6 @@ <!DOCTYPE html> <meta charset="utf-8"> +<meta name="fuzzy" content="1;0-50"> <title>CSS Text level 3 Test: preserved trailing white space that hang in a textarea</title> <link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> diff --git a/testing/web-platform/tests/css/css-text/white-space/trailing-space-and-text-alignment-004.html b/testing/web-platform/tests/css/css-text/white-space/trailing-space-and-text-alignment-004.html index 3d7aad0541..69d74051f7 100644 --- a/testing/web-platform/tests/css/css-text/white-space/trailing-space-and-text-alignment-004.html +++ b/testing/web-platform/tests/css/css-text/white-space/trailing-space-and-text-alignment-004.html @@ -1,5 +1,6 @@ <!DOCTYPE html> <meta charset="utf-8"> +<meta name="fuzzy" content="1;0-50"> <title>CSS Text level 3 Test: preserved trailing white space that hang in a textarea</title> <link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> diff --git a/testing/web-platform/tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-002.html b/testing/web-platform/tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-002.html index 0422506b51..3da84ae512 100644 --- a/testing/web-platform/tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-002.html +++ b/testing/web-platform/tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-002.html @@ -1,5 +1,6 @@ <!DOCTYPE html> <meta charset="utf-8"> +<meta name="fuzzy" content="1;0-50"> <title>CSS Text level 3 Test: preserved trailing RTL white space that hang in a textarea</title> <link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> diff --git a/testing/web-platform/tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-004.html b/testing/web-platform/tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-004.html index 7705d6dfb1..480969efc0 100644 --- a/testing/web-platform/tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-004.html +++ b/testing/web-platform/tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-004.html @@ -1,5 +1,6 @@ <!DOCTYPE html> <meta charset="utf-8"> +<meta name="fuzzy" content="1;0-50"> <title>CSS Text level 3 Test: preserved trailing RTL white space that hang in a textarea</title> <link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> diff --git a/testing/web-platform/tests/css/css-text/word-spacing/reference/word-spacing-percent-001-ref.html b/testing/web-platform/tests/css/css-text/word-spacing/reference/word-spacing-percent-001-ref.html new file mode 100644 index 0000000000..02bd2f64f4 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/word-spacing/reference/word-spacing-percent-001-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html lang="en" > +<meta charset="utf-8"> +<title>word-spacing as percentages</title> +<style type='text/css'> + div { font-size: 20px; line-height: 1; color: blue; } + small { font-size: 50%; } +</style> + +<p>Test passes if the pattern is identical on all four lines. + +<div style="word-spacing: 1em">ABC123().*$いろはx x x፡x་x + <small style="word-spacing: 1em">ABC123().*$いろはx x x፡x་x</small></div> +<div style="word-spacing: 1em">ABC123().*$いろはx x x፡x་x + <small style="word-spacing: 1em">ABC123().*$いろはx x x፡x་x</small></div> +<div style="word-spacing: 1em">ABC123().*$いろはx x x፡x་x + <small style="word-spacing: 1em">ABC123().*$いろはx x x፡x་x</small></div> +<div style="word-spacing: 1em">ABC123().*$いろはx x x፡x་x + <small style="word-spacing: 1em">ABC123().*$いろはx x x፡x་x</small></div> diff --git a/testing/web-platform/tests/css/css-text/word-spacing/word-spacing-002.html b/testing/web-platform/tests/css/css-text/word-spacing/word-spacing-002.html new file mode 100644 index 0000000000..0def7e0179 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/word-spacing/word-spacing-002.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<title>CSS Text Test: Word Spacing</title> +<link rel="author" title="Nicholas Nethercote" href="mailto:nnethercote@mozilla.com"> +<link rel="author" title="Elika Etemad" href="http://fantasai.inkedblade.net/contact"> +<link rel="help" href="http://www.w3.org/TR/css-text-3/#word-spacing"> +<link rel="stylesheet" href="/fonts/ahem.css"> +<link rel="match" href="word-spacing-001-ref.html"> +<meta name="flags" content="ahem"> +<meta name="assert" content="Test checks various length values of word-spacing, including calc()."> +<style> +@font-face { + font-family: Ahem; + src: url(/fonts/Ahem.ttf); +} +/* We use Ahem to avoid very minor differences between the test and the + reference that occur with certain font+platform combinations. */ +div { font-family: Ahem, monospace; font-size: 20px; } +div.ws0 { word-spacing: -1ch; } +div.ws1 { word-spacing: 0; } +div.ws2 { word-spacing: 1ch; } +div.ws3 { word-spacing: calc(1ch + 1ch); } +div.ws4 { word-spacing: calc(0.5*2ch); white-space: pre;} +</style> +<body> + <p>Test passes if the space between the words starts at zero and increases by + an even amount on each subsequent line.</p> + <div class="ws0">A Bc Def Ghij</div> + <div class="ws1">A Bc Def Ghij</div> + <div class="ws2">A Bc Def Ghij</div> + <div class="ws3">A Bc Def Ghij</div> + <div class="ws4">A Bc Def Ghij</div> +</body> diff --git a/testing/web-platform/tests/css/css-text/word-spacing/word-spacing-computed-001.html b/testing/web-platform/tests/css/css-text/word-spacing/word-spacing-computed-001.html index 84d1fcf1e5..fac211af66 100644 --- a/testing/web-platform/tests/css/css-text/word-spacing/word-spacing-computed-001.html +++ b/testing/web-platform/tests/css/css-text/word-spacing/word-spacing-computed-001.html @@ -76,7 +76,6 @@ verifyComputedStyle("word-spacing", "3rem", "48px"); verifyComputedStyle("word-spacing", "0ch", "0px"); - } startTesting(); diff --git a/testing/web-platform/tests/css/css-text/word-spacing/word-spacing-percent-001.html b/testing/web-platform/tests/css/css-text/word-spacing/word-spacing-percent-001.html new file mode 100644 index 0000000000..65f9972040 --- /dev/null +++ b/testing/web-platform/tests/css/css-text/word-spacing/word-spacing-percent-001.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html lang="en" > +<meta charset="utf-8"> +<title>word-spacing as percentages</title> +<link rel='author' title='Elika J. Etemad' href='http://fantasai.inkedblade.net/contact'> +<link rel='help' href='https://www.w3.org/TR/css-text-4/#word-spacing'> +<link rel='match' href='reference/word-spacing-percent-001-ref.html'> +<meta name="assert" content="Percentage values of word-spacing are relative to the current font-size."> +<style type='text/css'> + div { font-size: 20px; line-height: 1; color: blue; } + small { font-size: 50%; } +</style> + +<p>Test passes if the pattern is identical on all four lines. + +<div style="word-spacing: 1em">ABC123().*$いろはx x x፡x་x <small style="word-spacing: 1em">ABC123().*$いろはx x x፡x་x</small></div> +<div style="word-spacing: 100%">ABC123().*$いろはx x x፡x་x <small>ABC123().*$いろはx x x፡x་x</small></div> +<div style="word-spacing: calc(0.5em + 50%)">ABC123().*$いろはx x x፡x་x <small style="word-spacing: calc(0.5em + 50%)">ABC123().*$いろはx x x፡x་x</small></div> +<div style="word-spacing: 100%; font-size: 0.1em"><div style="font-size: 20px">ABC123().*$いろはx x x፡x་x <small>ABC123().*$いろはx x x፡x་x</small></div></div> |