summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-tables/paint
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-tables/paint')
-rw-r--r--testing/web-platform/tests/css/css-tables/paint/col-change-span-bg-invalidation-001.html42
-rw-r--r--testing/web-platform/tests/css/css-tables/paint/col-change-span-bg-invalidation-002.html40
-rw-r--r--testing/web-platform/tests/css/css-tables/paint/col-paint-htb-rtl-ref.html17
-rw-r--r--testing/web-platform/tests/css/css-tables/paint/col-paint-htb-rtl.html19
-rw-r--r--testing/web-platform/tests/css/css-tables/paint/col-paint-vrl-rtl-ref.html17
-rw-r--r--testing/web-platform/tests/css/css-tables/paint/col-paint-vrl-rtl.html19
-rw-r--r--testing/web-platform/tests/css/css-tables/paint/row-background-paint-remove-last-cell-ref.html18
-rw-r--r--testing/web-platform/tests/css/css-tables/paint/row-background-paint-remove-last-cell.html31
8 files changed, 203 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-tables/paint/col-change-span-bg-invalidation-001.html b/testing/web-platform/tests/css/css-tables/paint/col-change-span-bg-invalidation-001.html
new file mode 100644
index 0000000000..997745954e
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/paint/col-change-span-bg-invalidation-001.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/rendering-utils.js"></script>
+<link rel="author" title="Andreu Botella" href="abotella@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-tables-3/#drawing-cell-backgrounds">
+<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
+<meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-4400">
+<meta name=assert content="Changing the span of a table column element will invalidate column backgrounds">
+<style>
+table {
+ width: 100px;
+ height: 100px;
+ border-spacing: 0;
+}
+.green {
+ background: green;
+}
+.red {
+ background: red;
+}
+</style>
+<title>CSS table column span invalidation</title>
+<script>
+waitForAtLeastOneFrame().then(() => {
+ const changeSpanCol = document.getElementById("changeSpan");
+ changeSpanCol.setAttribute("span", "2");
+ takeScreenshot();
+});
+</script>
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<table>
+ <col id="changeSpan" class="green">
+ <col class="green">
+ <col class="red">
+ <tr>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+</table>
+</html>
diff --git a/testing/web-platform/tests/css/css-tables/paint/col-change-span-bg-invalidation-002.html b/testing/web-platform/tests/css/css-tables/paint/col-change-span-bg-invalidation-002.html
new file mode 100644
index 0000000000..abfd6dbaaf
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/paint/col-change-span-bg-invalidation-002.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/rendering-utils.js"></script>
+<link rel="author" title="Andreu Botella" href="abotella@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-tables-3/#drawing-cell-backgrounds">
+<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
+<meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-4400">
+<meta name=assert content="Changing the span of a table column element will invalidate column backgrounds, even if previously any columns with backgrounds spanned no cells">
+<style>
+table {
+ width: 100px;
+ height: 100px;
+ border-spacing: 0;
+ background: linear-gradient(to right, green 67%, red 67%);
+}
+.green {
+ background: green;
+}
+</style>
+<title>CSS table column span invalidation</title>
+<script>
+waitForAtLeastOneFrame().then(() => {
+ const changeSpanCol = document.getElementById("changeSpan");
+ changeSpanCol.removeAttribute("span");
+ takeScreenshot();
+});
+</script>
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<table>
+ <col id="changeSpan" span="2">
+ <col>
+ <col class="green">
+ <tr>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+</table>
+</html>
diff --git a/testing/web-platform/tests/css/css-tables/paint/col-paint-htb-rtl-ref.html b/testing/web-platform/tests/css/css-tables/paint/col-paint-htb-rtl-ref.html
new file mode 100644
index 0000000000..107a960958
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/paint/col-paint-htb-rtl-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<style>
+table { border: solid 2px; border-spacing: 5px; padding: 5px; }
+col { background: linear-gradient(60deg, red 50%, blue 50%); }
+</style>
+<table>
+ <col style="width: 50px;"></col>
+ <col style="width: 100px;"></col>
+ <tr style="height: 100px;">
+ <td></td>
+ <td></td>
+ </tr>
+ <tr style="height: 50px;">
+ <td></td>
+ <td></td>
+ </tr>
+</table>
diff --git a/testing/web-platform/tests/css/css-tables/paint/col-paint-htb-rtl.html b/testing/web-platform/tests/css/css-tables/paint/col-paint-htb-rtl.html
new file mode 100644
index 0000000000..1508421818
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/paint/col-paint-htb-rtl.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<link rel="help" href="https://drafts.csswg.org/css-tables-3/#drawing-cell-backgrounds">
+<link rel="match" href="col-paint-htb-rtl-ref.html">
+<style>
+table { border: solid 2px; border-spacing: 5px; padding: 5px; }
+col { background: linear-gradient(60deg, red 50%, blue 50%); }
+</style>
+<table style="direction: rtl;">
+ <col style="width: 100px;"></col>
+ <col style="width: 50px;"></col>
+ <tr style="height: 100px;">
+ <td></td>
+ <td></td>
+ </tr>
+ <tr style="height: 50px;">
+ <td></td>
+ <td></td>
+ </tr>
+</table>
diff --git a/testing/web-platform/tests/css/css-tables/paint/col-paint-vrl-rtl-ref.html b/testing/web-platform/tests/css/css-tables/paint/col-paint-vrl-rtl-ref.html
new file mode 100644
index 0000000000..a651e03b1c
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/paint/col-paint-vrl-rtl-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<style>
+table { border: solid 2px; border-spacing: 5px; padding: 5px; }
+col { background: linear-gradient(-60deg, red 50%, blue 50%); }
+</style>
+<table style="transform: rotate(90deg);">
+ <col style="width: 100px;"></col>
+ <col style="width: 50px;"></col>
+ <tr style="height: 100px;">
+ <td></td>
+ <td></td>
+ </tr>
+ <tr style="height: 50px;">
+ <td></td>
+ <td></td>
+ </tr>
+</table>
diff --git a/testing/web-platform/tests/css/css-tables/paint/col-paint-vrl-rtl.html b/testing/web-platform/tests/css/css-tables/paint/col-paint-vrl-rtl.html
new file mode 100644
index 0000000000..d76ea59dac
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/paint/col-paint-vrl-rtl.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<link rel="help" href="https://drafts.csswg.org/css-tables-3/#drawing-cell-backgrounds">
+<link rel="match" href="col-paint-vrl-rtl-ref.html">
+<style>
+table { border: solid 2px; border-spacing: 5px; padding: 5px; }
+col { background: linear-gradient(30deg, red 50%, blue 50%); }
+</style>
+<table style="writing-mode: vertical-rl; direction: rtl;">
+ <col style="height: 50px;"></col>
+ <col style="height: 100px;"></col>
+ <tr style="width: 100px;">
+ <td></td>
+ <td></td>
+ </tr>
+ <tr style="width: 50px;">
+ <td></td>
+ <td></td>
+ </tr>
+</table>
diff --git a/testing/web-platform/tests/css/css-tables/paint/row-background-paint-remove-last-cell-ref.html b/testing/web-platform/tests/css/css-tables/paint/row-background-paint-remove-last-cell-ref.html
new file mode 100644
index 0000000000..57beaedd47
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/paint/row-background-paint-remove-last-cell-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="en">
+<style>
+tr { background-color: rgb(255, 0, 0); }
+td:not(#remove) { background-color: green; }
+</style>
+<title>CSS Test Reference</title>
+<p>Test passes if you see three green cells and no red below.</p>
+<table>
+ <tr>
+ <td>A1</td>
+ <td>A2</td>
+ </tr>
+ <tr>
+ <td>B1</td>
+ </tr>
+</table>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/css-tables/paint/row-background-paint-remove-last-cell.html b/testing/web-platform/tests/css/css-tables/paint/row-background-paint-remove-last-cell.html
new file mode 100644
index 0000000000..e61b5d4fea
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/paint/row-background-paint-remove-last-cell.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/rendering-utils.js"></script>
+<link rel="author" title="Chenguang Shao" href="chenguangshao1@gmail.com">
+<link rel="help" href="https://drafts.csswg.org/css-tables-3/#drawing-cell-backgrounds">
+<link rel="match" href="row-background-paint-remove-last-cell-ref.html">
+<style>
+tr { background-color: rgb(255, 0, 0); }
+td:not(#remove) { background-color: green; }
+</style>
+<title>CSS Table Module Test: table-row repaint after removing last cell</title>
+<script>
+waitForAtLeastOneFrame().then(() => {
+ const remove = document.getElementById('remove');
+ remove.remove();
+ takeScreenshot();
+});
+</script>
+<p>Test passes if you see three green cells and no red below.</p>
+<table>
+ <tr>
+ <td>A1</td>
+ <td>A2</td>
+ </tr>
+ <tr>
+ <td>B1</td>
+ <td id="remove"> B2 </td>
+ </tr>
+</table>
+</html> \ No newline at end of file