summaryrefslogtreecommitdiffstats
path: root/layout/reftests/tab-size
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
commit0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch)
treea31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /layout/reftests/tab-size
parentInitial commit. (diff)
downloadfirefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz
firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/tab-size')
-rw-r--r--layout/reftests/tab-size/reftest.list12
-rw-r--r--layout/reftests/tab-size/spaces-0.html1
-rw-r--r--layout/reftests/tab-size/spaces-1.html1
-rw-r--r--layout/reftests/tab-size/spaces-4-multiple.html1
-rw-r--r--layout/reftests/tab-size/spaces-4-offset.html6
-rw-r--r--layout/reftests/tab-size/spaces-4.html1
-rw-r--r--layout/reftests/tab-size/spaces-8.html1
-rw-r--r--layout/reftests/tab-size/tab-size-0.html2
-rw-r--r--layout/reftests/tab-size/tab-size-1.html2
-rw-r--r--layout/reftests/tab-size/tab-size-4-multiple.html1
-rw-r--r--layout/reftests/tab-size/tab-size-4-span.html1
-rw-r--r--layout/reftests/tab-size/tab-size-4-spanoffset.html6
-rw-r--r--layout/reftests/tab-size/tab-size-4.html1
-rw-r--r--layout/reftests/tab-size/tab-size-8.html1
-rw-r--r--layout/reftests/tab-size/tab-size-change-1-ref.html20
-rw-r--r--layout/reftests/tab-size/tab-size-change-1a.html33
-rw-r--r--layout/reftests/tab-size/tab-size-change-1b.html35
-rw-r--r--layout/reftests/tab-size/tab-size-initial.html1
-rw-r--r--layout/reftests/tab-size/tab-size-length-ref.html74
-rw-r--r--layout/reftests/tab-size/tab-size-length.html52
-rw-r--r--layout/reftests/tab-size/tab-size-negative.html1
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&#9;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&#9;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&#9;XYZ&#9;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&#9;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&#9;Z</span>
+1234567<span style="-moz-tab-size: 4">B&#9;Z</span>
+12345678<span style="-moz-tab-size: 4">B&#9;Z</span>
+123456789<span style="-moz-tab-size: 4">B&#9;Z</span>
+1234567890<span style="-moz-tab-size: 4">B&#9;Z</span>
+12345678901<span style="-moz-tab-size: 4">B&#9;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&#9;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&#9;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>&#9;<span>two</span>&#9;<span>three</span>&#9;<span>four</span>&#9;<span>five</span>
+<span>six</span>&#9;<span>seven</span>&#9;<span>eight</span>&#9;<span>nine</span>&#9;<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>&#9;<span>two</span>&#9;<span>three</span>&#9;<span>four</span>&#9;<span>five</span>
+<span>six</span>&#9;<span>seven</span>&#9;<span>eight</span>&#9;<span>nine</span>&#9;<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>&#9;<span id="two">iii</span>&#9;<span id="three">mmmmm</span>&#9;<span id="four">mmmm</span>&#9;<span id="five">mmmm</span>
+<span id="six">x</span>&#9;<span id="seven">x</span>&#9;<span id="eight">x</span>&#9;<span id="nine">x</span>&#9;<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&#9;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&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: 50px">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: 2ch">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: 3em">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: calc(10px + 2em)">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: calc(2em)">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: calc(3.5 - 1)">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: 0.8ch">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: 0px">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: calc(-2em)">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: calc(1px - 2px)">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: calc(-2.5)">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: -2em">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: 100%">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: calc(10% + 2em)">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: 0">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: 0.0">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: 1">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: 3">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: 3.4">A&#9;B&#9;C</pre>
+<pre style="-moz-tab-size: -1.5">A&#9;B&#9;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&#9;X</pre>