diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /layout/reftests/tab-size | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/tab-size')
21 files changed, 253 insertions, 0 deletions
diff --git a/layout/reftests/tab-size/reftest.list b/layout/reftests/tab-size/reftest.list new file mode 100644 index 0000000000..8307a654bc --- /dev/null +++ b/layout/reftests/tab-size/reftest.list @@ -0,0 +1,12 @@ +== tab-size-8.html tab-size-initial.html +== tab-size-8.html spaces-8.html +== tab-size-4.html spaces-4.html +== tab-size-4-span.html spaces-4.html +== tab-size-4-spanoffset.html spaces-4-offset.html +== tab-size-4-multiple.html spaces-4-multiple.html +== tab-size-1.html spaces-1.html +== tab-size-0.html spaces-0.html +== tab-size-negative.html tab-size-initial.html +== tab-size-change-1a.html tab-size-change-1-ref.html +== tab-size-change-1b.html tab-size-change-1-ref.html +fuzzy-if(winWidget,0-100,0-1000) == tab-size-length.html tab-size-length-ref.html diff --git a/layout/reftests/tab-size/spaces-0.html b/layout/reftests/tab-size/spaces-0.html new file mode 100644 index 0000000000..188cb6af86 --- /dev/null +++ b/layout/reftests/tab-size/spaces-0.html @@ -0,0 +1 @@ +<pre>AX</pre> diff --git a/layout/reftests/tab-size/spaces-1.html b/layout/reftests/tab-size/spaces-1.html new file mode 100644 index 0000000000..488e943b3e --- /dev/null +++ b/layout/reftests/tab-size/spaces-1.html @@ -0,0 +1 @@ +<pre>A X</pre> diff --git a/layout/reftests/tab-size/spaces-4-multiple.html b/layout/reftests/tab-size/spaces-4-multiple.html new file mode 100644 index 0000000000..070a9f7717 --- /dev/null +++ b/layout/reftests/tab-size/spaces-4-multiple.html @@ -0,0 +1 @@ +<pre>A XYZ MNO</pre> diff --git a/layout/reftests/tab-size/spaces-4-offset.html b/layout/reftests/tab-size/spaces-4-offset.html new file mode 100644 index 0000000000..0aea1aaa7c --- /dev/null +++ b/layout/reftests/tab-size/spaces-4-offset.html @@ -0,0 +1,6 @@ +<pre>123456B Z +1234567B Z +12345678B Z +123456789B Z +1234567890B Z +12345678901B Z</pre> diff --git a/layout/reftests/tab-size/spaces-4.html b/layout/reftests/tab-size/spaces-4.html new file mode 100644 index 0000000000..ae32ea0142 --- /dev/null +++ b/layout/reftests/tab-size/spaces-4.html @@ -0,0 +1 @@ +<pre>A X</pre> diff --git a/layout/reftests/tab-size/spaces-8.html b/layout/reftests/tab-size/spaces-8.html new file mode 100644 index 0000000000..383983423e --- /dev/null +++ b/layout/reftests/tab-size/spaces-8.html @@ -0,0 +1 @@ +<pre>A X</pre> diff --git a/layout/reftests/tab-size/tab-size-0.html b/layout/reftests/tab-size/tab-size-0.html new file mode 100644 index 0000000000..59e0661a1e --- /dev/null +++ b/layout/reftests/tab-size/tab-size-0.html @@ -0,0 +1,2 @@ +<!-- this test will never insert a space --> +<pre style="-moz-tab-size: 0">A	X</pre> diff --git a/layout/reftests/tab-size/tab-size-1.html b/layout/reftests/tab-size/tab-size-1.html new file mode 100644 index 0000000000..ddeef47c3d --- /dev/null +++ b/layout/reftests/tab-size/tab-size-1.html @@ -0,0 +1,2 @@ +<!-- this test will always insert a space --> +<pre style="-moz-tab-size: 1">A	X</pre> diff --git a/layout/reftests/tab-size/tab-size-4-multiple.html b/layout/reftests/tab-size/tab-size-4-multiple.html new file mode 100644 index 0000000000..db8d04c671 --- /dev/null +++ b/layout/reftests/tab-size/tab-size-4-multiple.html @@ -0,0 +1 @@ +<pre style="-moz-tab-size: 4">A	XYZ	MNO</pre> diff --git a/layout/reftests/tab-size/tab-size-4-span.html b/layout/reftests/tab-size/tab-size-4-span.html new file mode 100644 index 0000000000..a07a679a36 --- /dev/null +++ b/layout/reftests/tab-size/tab-size-4-span.html @@ -0,0 +1 @@ +<pre><span style="-moz-tab-size: 4">A	X</span></pre> diff --git a/layout/reftests/tab-size/tab-size-4-spanoffset.html b/layout/reftests/tab-size/tab-size-4-spanoffset.html new file mode 100644 index 0000000000..cf7a53815a --- /dev/null +++ b/layout/reftests/tab-size/tab-size-4-spanoffset.html @@ -0,0 +1,6 @@ +<pre>123456<span style="-moz-tab-size: 4">B	Z</span> +1234567<span style="-moz-tab-size: 4">B	Z</span> +12345678<span style="-moz-tab-size: 4">B	Z</span> +123456789<span style="-moz-tab-size: 4">B	Z</span> +1234567890<span style="-moz-tab-size: 4">B	Z</span> +12345678901<span style="-moz-tab-size: 4">B	Z</span></pre> diff --git a/layout/reftests/tab-size/tab-size-4.html b/layout/reftests/tab-size/tab-size-4.html new file mode 100644 index 0000000000..6d744e8a9c --- /dev/null +++ b/layout/reftests/tab-size/tab-size-4.html @@ -0,0 +1 @@ +<pre style="-moz-tab-size: 4">A	X</pre> diff --git a/layout/reftests/tab-size/tab-size-8.html b/layout/reftests/tab-size/tab-size-8.html new file mode 100644 index 0000000000..3e0dd49711 --- /dev/null +++ b/layout/reftests/tab-size/tab-size-8.html @@ -0,0 +1 @@ +<pre style="-moz-tab-size: 8">A	X</pre> diff --git a/layout/reftests/tab-size/tab-size-change-1-ref.html b/layout/reftests/tab-size/tab-size-change-1-ref.html new file mode 100644 index 0000000000..12cfdd39af --- /dev/null +++ b/layout/reftests/tab-size/tab-size-change-1-ref.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> +<head> +<style type="text/css"> +body { + font-family: serif; + padding: 2px; +} +span { + padding: 2px; +} +</style> +</head> +<body> +<div style="white-space: pre"> +<span>one</span>	<span>two</span>	<span>three</span>	<span>four</span>	<span>five</span> +<span>six</span>	<span>seven</span>	<span>eight</span>	<span>nine</span>	<span>ten</span> +</div> +</body> +</html> diff --git a/layout/reftests/tab-size/tab-size-change-1a.html b/layout/reftests/tab-size/tab-size-change-1a.html new file mode 100644 index 0000000000..4531a04230 --- /dev/null +++ b/layout/reftests/tab-size/tab-size-change-1a.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<style type="text/css"> +body { + font-family: serif; + padding: 2px; +} +span { + padding: 2px; +} +.a { + -moz-tab-size: 16; +} +</style> +<script type="text/javascript"> +function do_test() { + var elem = document.getElementById("test"); + elem.removeAttribute('class'); + document.documentElement.removeAttribute('class'); +}; +document.addEventListener("MozReftestInvalidate", do_test); +</script> +</head> +<!-- test for modification of tab widths, see comment at + https://bugzilla.mozilla.org/show_bug.cgi?id=631035#c38 --> +<body> +<div style="white-space: pre" id="test" class="a"> +<span>one</span>	<span>two</span>	<span>three</span>	<span>four</span>	<span>five</span> +<span>six</span>	<span>seven</span>	<span>eight</span>	<span>nine</span>	<span>ten</span> +</div> +</body> +</html> diff --git a/layout/reftests/tab-size/tab-size-change-1b.html b/layout/reftests/tab-size/tab-size-change-1b.html new file mode 100644 index 0000000000..56c2166fe4 --- /dev/null +++ b/layout/reftests/tab-size/tab-size-change-1b.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<style type="text/css"> +body { + font-family: serif; + padding: 2px; +} +span { + padding: 2px; +} +</style> +<script type="text/javascript"> +function do_test() { + var elems = ["one","two","three","four","five","six","seven","eight","nine","ten"]; + for (key in elems) { + var e = document.getElementById(elems[key]); + e.innerHTML = elems[key]; + } + document.documentElement.removeAttribute('class'); +}; +document.addEventListener("MozReftestInvalidate", do_test); +</script> +</head> +<!-- Test for modification of text with preformatted tabs, see + https://bugzilla.mozilla.org/show_bug.cgi?id=631035#c38. + In the first line, the tabs remain at the same offsets but widths will change; + in the second line, their offsets will also change. --> +<body> +<div style="white-space: pre"> +<span id="one">iii</span>	<span id="two">iii</span>	<span id="three">mmmmm</span>	<span id="four">mmmm</span>	<span id="five">mmmm</span> +<span id="six">x</span>	<span id="seven">x</span>	<span id="eight">x</span>	<span id="nine">x</span>	<span id="ten">x</span> +</div> +</body> +</html> diff --git a/layout/reftests/tab-size/tab-size-initial.html b/layout/reftests/tab-size/tab-size-initial.html new file mode 100644 index 0000000000..e8682d3993 --- /dev/null +++ b/layout/reftests/tab-size/tab-size-initial.html @@ -0,0 +1 @@ +<pre>A	X</pre> diff --git a/layout/reftests/tab-size/tab-size-length-ref.html b/layout/reftests/tab-size/tab-size-length-ref.html new file mode 100644 index 0000000000..cd013b40ea --- /dev/null +++ b/layout/reftests/tab-size/tab-size-length-ref.html @@ -0,0 +1,74 @@ +<!DOCTYPE HTML> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html><head> + <title>CSS Test: Testing the layout of TAB characters with various 'tab-size' length values</title> + <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com"> + <link rel="help" href="https://drafts.csswg.org/css-text-3/#tab-size-property"> + + <meta charset="utf-8"> + <style type="text/css"> + + @font-face { + font-family:Ahem; src:url(../fonts/Ahem.ttf); + } + * { + font:20px/20px Ahem; + } + html,body { + color:black; background-color:white; + } + + tab { display:inline-block; } + #t1 tab { width:40px; } /* tab-size:20px (valid) */ + #t2 tab { width:50px; } /* tab-size:50px (valid) */ + #t3 tab { width:40px; } /* tab-size:2ch (valid) */ + #t4 tab { width:60px; } /* tab-size:3em (valid) */ + #t5 tab { width:50px; } /* tab-size:calc(10px + 2em) (valid) */ + #t6 tab { width:40px; } /* tab-size:calc(2em) (valid) */ + #t7 tab { width:50px; } /* tab-size:calc(3.5 - 1) (valid) */ + #t8 tab { width:32px; } /* tab-size:0.8ch (valid) */ + #t9 tab { width:20px; } /* tab-size:0px (valid) */ + #t10 tab { width:20px; } /* tab-size:calc(-2em) (valid, but clamped to zero) */ + #t11 tab { width:20px; } /* tab-size:calc(1px - 2px) (valid, but clamped to zero) */ + #t12 tab { width:20px; } /* tab-size:calc(-2.5) (valid, but clamped to zero) */ + #t13 tab { width:160px; } /* tab-size:-2em (invalid, rule ignored, falls back to initial value 8) */ + #t14 tab { width:160px; } /* tab-size:100% (invalid, rule ignored, falls back to initial value 8) */ + #t15 tab { width:160px; } /* tab-size:calc(10% + 2em) (invalid, rule ignored, falls back to initial value 8) */ + #t16 tab { width:20px; } /* tab-size:0 (valid) */ + #t17 tab { width:20px; } /* tab-size:0.0 (valid) */ + #t18 tab { width:40px; } /* tab-size:1 (valid) */ + #t19 tab { width:60px; } /* tab-size:3 (valid) */ + #t20 tab { width:68px; } /* tab-size:3.4 (valid) */ + #t21 tab { width:160px; } /* tab-size:-1.5 (invalid, rule ignored, falls back to initial value 8) */ + + </style> +</head> +<body> + +<pre id="t1"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t2"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t3"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t4"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t5"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t6"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t7"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t8"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t9"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t10"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t11"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t12"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t13"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t14"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t15"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t16"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t17"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t18"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t19"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t20"><tab>A</tab><tab>B</tab>C</pre> +<pre id="t21"><tab>A</tab><tab>B</tab>C</pre> + +</body> +</html> diff --git a/layout/reftests/tab-size/tab-size-length.html b/layout/reftests/tab-size/tab-size-length.html new file mode 100644 index 0000000000..5d39892419 --- /dev/null +++ b/layout/reftests/tab-size/tab-size-length.html @@ -0,0 +1,52 @@ +<!DOCTYPE HTML> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html><head> + <title>CSS Test: Testing the layout of TAB characters with various 'tab-size' length values</title> + <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com"> + <link rel="help" href="https://drafts.csswg.org/css-text-3/#tab-size-property"> + <link rel="match" href="tab-size-length-ref.html"> + + <meta charset="utf-8"> + <style type="text/css"> + + @font-face { + font-family:Ahem; src:url(../fonts/Ahem.ttf); + } + * { + font:20px/20px Ahem; + } + html,body { + color:black; background-color:white; + } + + </style> +</head> +<body> + +<pre style="-moz-tab-size: 20px">A	B	C</pre> +<pre style="-moz-tab-size: 50px">A	B	C</pre> +<pre style="-moz-tab-size: 2ch">A	B	C</pre> +<pre style="-moz-tab-size: 3em">A	B	C</pre> +<pre style="-moz-tab-size: calc(10px + 2em)">A	B	C</pre> +<pre style="-moz-tab-size: calc(2em)">A	B	C</pre> +<pre style="-moz-tab-size: calc(3.5 - 1)">A	B	C</pre> +<pre style="-moz-tab-size: 0.8ch">A	B	C</pre> +<pre style="-moz-tab-size: 0px">A	B	C</pre> +<pre style="-moz-tab-size: calc(-2em)">A	B	C</pre> +<pre style="-moz-tab-size: calc(1px - 2px)">A	B	C</pre> +<pre style="-moz-tab-size: calc(-2.5)">A	B	C</pre> +<pre style="-moz-tab-size: -2em">A	B	C</pre> +<pre style="-moz-tab-size: 100%">A	B	C</pre> +<pre style="-moz-tab-size: calc(10% + 2em)">A	B	C</pre> +<pre style="-moz-tab-size: 0">A	B	C</pre> +<pre style="-moz-tab-size: 0.0">A	B	C</pre> +<pre style="-moz-tab-size: 1">A	B	C</pre> +<pre style="-moz-tab-size: 3">A	B	C</pre> +<pre style="-moz-tab-size: 3.4">A	B	C</pre> +<pre style="-moz-tab-size: -1.5">A	B	C</pre> + +</body> +</html> diff --git a/layout/reftests/tab-size/tab-size-negative.html b/layout/reftests/tab-size/tab-size-negative.html new file mode 100644 index 0000000000..3b80154411 --- /dev/null +++ b/layout/reftests/tab-size/tab-size-negative.html @@ -0,0 +1 @@ +<pre style="-moz-tab-size: -4">A	X</pre> |