summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-contain/container-queries/crashtests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/css-contain/container-queries/crashtests
parentInitial commit. (diff)
downloadfirefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz
firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-contain/container-queries/crashtests')
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/br-crash.html6
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/canvas-as-container-crash.html10
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-bug-1289718-000-crash.html6
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-bug-1289718-001-crash.html6
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-bug-1346969-crash.html14
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-bug-1362391-crash.html8
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-layout-root-crash.html17
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-quotes-crash.html11
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-remove-insert-evaluator-crash.html15
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/columns-in-table-001-crash.html10
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/columns-in-table-002-crash.html15
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/container-in-canvas-crash.html11
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/container-type-change-chrome-legacy-crash.html16
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/dirty-rowgroup-crash.html18
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/flex-in-columns-000-crash.html17
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/flex-in-columns-001-crash.html17
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/flex-in-columns-002-crash.html19
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/flex-in-columns-003-crash.html19
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/focus-inside-content-visibility-crash.html42
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/force-sibling-style-crash.html16
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/grid-in-columns-000-crash.html17
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/grid-in-columns-001-crash.html17
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/grid-in-columns-002-crash.html19
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/grid-in-columns-003-crash.html19
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/iframe-init-crash.html3
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/inline-multicol-inside-container-crash.html21
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/inline-with-columns-000-crash.html17
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/inline-with-columns-001-crash.html17
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/input-column-group-container-crash.html14
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/input-placeholder-inline-size-crash.html12
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/marker-gcs-after-disconnect-crash.html26
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/math-block-container-child-crash.html14
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/orthogonal-replaced-crash.html11
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/pseudo-container-crash.html14
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/svg-layout-root-crash.html22
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/svg-text-crash.html8
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-000-crash.html17
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-001-crash.html17
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-002-crash.html19
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-003-crash.html19
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-004-crash.html16
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-005-crash.html8
42 files changed, 640 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/br-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/br-crash.html
new file mode 100644
index 0000000000..6631ba2fd5
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/br-crash.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<title>Don't crash for blocky &lt;br> (etc) with inline-size containment</title>
+<link rel="help" href="https://drafts.csswg.org/css-contain-3/#contain-property">
+<link rel="help" href="https://crbug.com/1313444">
+<br style="container-type:inline-size; display:block;">
+<wbr style="container-type:inline-size; display:block;">
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/canvas-as-container-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/canvas-as-container-crash.html
new file mode 100644
index 0000000000..ae7fe8dc16
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/canvas-as-container-crash.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<title>CSS Container Queries Test: Absolute positioned canvas container crash</title>
+<link rel="help" href="https://drafts.csswg.org/css-contain-3/#size-container">
+<link rel="help" href="https://crbug.com/1289850">
+<p>Pass if there is no crash.</p>
+<canvas id="canv" style="display:block;position:absolute;container-type:inline-size"></canvas>
+<script>
+ canv.offsetTop;
+ canv.appendChild(document.createElement("span"));
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-bug-1289718-000-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-bug-1289718-000-crash.html
new file mode 100644
index 0000000000..f30461919a
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-bug-1289718-000-crash.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1289718">
+<div style="container-type:inline-size;">
+ <span style="columns:2;"></span>
+</div>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-bug-1289718-001-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-bug-1289718-001-crash.html
new file mode 100644
index 0000000000..ce530fb2c8
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-bug-1289718-001-crash.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1289718">
+<div style="container-type:inline-size;">
+ <video style="columns:2;"></video>
+</div>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-bug-1346969-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-bug-1346969-crash.html
new file mode 100644
index 0000000000..37c74cf8cb
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-bug-1346969-crash.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<title>Chrome crash bug 1346969</title>
+<link rel="help" href="https://crbug.com/1346969">
+<table id="table"> </table>
+<script>
+ document.body.offsetTop;
+ table.style.containerType = "inline-size";
+ table.style.appearance = "auto";
+ table.style.columnCount = 2;
+ table.createTBody();
+ table.createCaption();
+ document.body.offsetTop;
+ table.style.whiteSpace = "pre-wrap";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-bug-1362391-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-bug-1362391-crash.html
new file mode 100644
index 0000000000..d4e1fec400
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-bug-1362391-crash.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<title>DCHECK failure for style recalc from layout tree rebuild</title>
+<link rel="help" href="https://crbug.com/1362391">
+<div style="display:table-column-group">
+ <div style="container-type:size">
+ <image title="crash"></image>
+ </div>
+</div>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-layout-root-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-layout-root-crash.html
new file mode 100644
index 0000000000..e3e709a240
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-layout-root-crash.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<html class="reftest-wait">
+<link rel="help" href="https://crbug.com/1371820">
+<style>
+ body, div, img { container-type: size; }
+</style>
+<p>Pass if no crash.</p>
+<div id="div"><img id="img" alt="a"></div>
+<script>
+ requestAnimationFrame(() => requestAnimationFrame(() => {
+ // Adds a layout root inside the div size container.
+ img.alt = img.src = "b";
+ // Marks div size container for layout which skips style recalc for the sub-tree.
+ div.style.width = "500px";
+ document.documentElement.classList.remove("reftest-wait");
+ }));
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-quotes-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-quotes-crash.html
new file mode 100644
index 0000000000..363f96fd02
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-quotes-crash.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<title>Container Queries Test: Quotes update outside container being laid out causes crash</title>
+<link rel="help" href="https://crbug.com/1313003">
+<style>
+ div { container-type: size }
+</style>
+<div style="float: right">
+ <span></span>
+ <div style="position:absolute"><q></q></div>
+ <q></q>
+</div>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-remove-insert-evaluator-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-remove-insert-evaluator-crash.html
new file mode 100644
index 0000000000..986f6b0bf6
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/chrome-remove-insert-evaluator-crash.html
@@ -0,0 +1,15 @@
+<!doctype html>
+<title>Removing and re-inserting a container should crash</title>
+<link rel="help" href="https://crbug.com/1342750">
+<style>
+ #container { container-type: inline-size }
+</style>
+<div id="outer">
+ <div id="container"></div>
+</div>
+<script>
+ container.offsetTop;
+ let removed = container;
+ container.remove();
+ outer.appendChild(removed);
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/columns-in-table-001-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/columns-in-table-001-crash.html
new file mode 100644
index 0000000000..fe421500da
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/columns-in-table-001-crash.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<title>CSS Container Queries Test: TR container with multicol TD crashes Chrome</title>
+<link rel="help" href="https://drafts.csswg.org/css-contain-3/#size-container">
+<link rel="help" href="https://crbug.com/1291471">
+<p>Pass if test does not crash.</p>
+<table>
+ <tr style="container-type:size;">
+ <td style="columns:2"></td>
+ </tr>
+</table>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/columns-in-table-002-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/columns-in-table-002-crash.html
new file mode 100644
index 0000000000..24b9f1aab2
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/columns-in-table-002-crash.html
@@ -0,0 +1,15 @@
+<!doctype html>
+<title>CSS Container Queries Test: container with multicol table-header-group crashes Chrome</title>
+<link rel="help" href="https://drafts.csswg.org/css-contain-3/#size-container">
+<link rel="help" href="https://crbug.com/1307656">
+<p>Pass if test does not crash.</p>
+<div id="container" style="container-type:inline-size">
+ <span style="display:table-header-group;columns:1"></span>
+ <span style="display:table-header-group;"></span>
+</div>
+<script>
+ // This originally caused a crash.
+ document.body.offsetTop;
+ // Additionally make sure we don't crash when the container is re-attached.
+ container.style.display = "inline-block";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/container-in-canvas-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/container-in-canvas-crash.html
new file mode 100644
index 0000000000..215c6a04db
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/container-in-canvas-crash.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<title>Don't crash with a container query container inside canvas</title>
+<link rel="help" href="https://drafts.csswg.org/css-contain-3">
+<link rel="help" href="https://crbug.com/1321471">
+<canvas>
+ <div>
+ <div style="container-type: size">
+ <div>Test</div>
+ </div>
+ </div>
+</canvas>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/container-type-change-chrome-legacy-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/container-type-change-chrome-legacy-crash.html
new file mode 100644
index 0000000000..609142a2c5
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/container-type-change-chrome-legacy-crash.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<title>CSS Container Queries Test: Changing container-type in Chrome legacy layout</title>
+<link rel="help" href="https://drafts.csswg.org/css-contain-3/#size-container">
+<link rel="help" href="https://crbug.com/1286773">
+<p>Pass if there is no crash.</p>
+<span style="column-count: 1"><table></table></span>
+<video id="video"></video>
+<input id="input"></input>
+<script>
+ document.body.offsetTop;
+ video.style.containerType = "inline-size";
+ document.body.offsetLeft;
+ video.style.columnCount = "1";
+ input.setAttribute("type", "button");
+ document.body.offsetTop;
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/dirty-rowgroup-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/dirty-rowgroup-crash.html
new file mode 100644
index 0000000000..2a66cd452a
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/dirty-rowgroup-crash.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<div style='container-type: size;'></div>
+<table>
+ <tbody id='id_0'></tbody>
+ <th id='id_1'>
+ <tr>
+ <th></th>
+ </tr>
+ </th>
+</table>
+<script>
+ const tbody = document.getElementById('id_0')
+ tbody.getBoundingClientRect();
+ const theader = document.getElementById('id_1')
+ tbody.outerText = 'foo';
+ theader.setAttribute('rowspan', 100)
+ tbody.getBoundingClientRect();
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/flex-in-columns-000-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/flex-in-columns-000-crash.html
new file mode 100644
index 0000000000..e7b789345c
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/flex-in-columns-000-crash.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1276898">
+<style>
+ @container (max-width: 500px) {
+ #target {
+ display: flex;
+ }
+ }
+</style>
+<div id="container" style="columns:2; container-type:inline-size; width:600px;">
+ <div id="target"></div>
+</div>
+<script>
+ document.body.offsetTop;
+ container.style.width = "400px";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/flex-in-columns-001-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/flex-in-columns-001-crash.html
new file mode 100644
index 0000000000..0c0648c15b
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/flex-in-columns-001-crash.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1276898">
+<style>
+ @container (max-width: 500px) {
+ #target {
+ display: flex;
+ }
+ }
+</style>
+<div id="container" style="columns:2; container-type:inline-size; width:400px;">
+ <div id="target"></div>
+</div>
+<script>
+ document.body.offsetTop;
+ container.style.width = "600px";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/flex-in-columns-002-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/flex-in-columns-002-crash.html
new file mode 100644
index 0000000000..ef3052d2c9
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/flex-in-columns-002-crash.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1276898">
+<style>
+ @container (max-width: 250px) {
+ #target {
+ display: flex;
+ }
+ }
+</style>
+<div id="ancestor" style="columns:2; column-gap:0; width:600px;">
+ <div style="container-type:inline-size;">
+ <div id="target"></div>
+ </div>
+</div>
+<script>
+ document.body.offsetTop;
+ ancestor.style.width = "400px";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/flex-in-columns-003-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/flex-in-columns-003-crash.html
new file mode 100644
index 0000000000..a86f25a773
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/flex-in-columns-003-crash.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1276898">
+<style>
+ @container (max-width: 250px) {
+ #target {
+ display: flex;
+ }
+ }
+</style>
+<div id="ancestor" style="columns:2; column-gap:0; width:400px;">
+ <div style="container-type:inline-size;">
+ <div id="target"></div>
+ </div>
+</div>
+<script>
+ document.body.offsetTop;
+ ancestor.style.width = "600px";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/focus-inside-content-visibility-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/focus-inside-content-visibility-crash.html
new file mode 100644
index 0000000000..1bf68d6686
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/focus-inside-content-visibility-crash.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<title>Container Queries Test: size change detected while focusing inside content-visibility: auto container</title>
+<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-queries">
+<link rel="help" href="https://drafts.csswg.org/css-contain-2/#using-cv-auto">
+<link rel="help" href="https://crbug.com/1270848">
+<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
+
+<style>
+.spacer { height: 3000px; }
+.auto { content-visibility: auto; }
+#container {
+ border: 1px solid black;
+ width: 100px;
+ height: 100px;
+
+ container-type: size;
+}
+#input {
+ width: 100%;
+ visibility: hidden;
+}
+@container (min-width: 150px) {
+ #input { visibility: visible; }
+}
+
+</style>
+
+<div class=spacer></div>
+<div class=auto>
+ <div id=container>
+ <input id=input type=text></input>
+ </div>
+</div>
+
+<script>
+function focus() {
+ container.style.width = "200px";
+ input.focus();
+}
+
+onload = () => requestAnimationFrame(() => requestAnimationFrame(focus));
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/force-sibling-style-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/force-sibling-style-crash.html
new file mode 100644
index 0000000000..093a01b809
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/force-sibling-style-crash.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<title>getComputedStyle on sibling of style-dirty container</title>
+<link rel="help" href="https://drafts.csswg.org/css-contain-3/#size-container">
+<link rel="help" href="https://crbug.com/1306385">
+<div id=ancestor style="--x:foo">
+ <div id=container style="container-type:size;width:100px;">
+ <span>Test</span>
+ </div>
+ <div id=target></div>
+</div>
+<script>
+ ancestor.offsetTop;
+ ancestor.style.setProperty('--x', 'bar');
+ container.style.width = '200px';
+ getComputedStyle(target).getPropertyValue('--x');
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/grid-in-columns-000-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/grid-in-columns-000-crash.html
new file mode 100644
index 0000000000..56cf6cfdbb
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/grid-in-columns-000-crash.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1276898">
+<style>
+ @container (max-width: 500px) {
+ #target {
+ display: grid;
+ }
+ }
+</style>
+<div id="container" style="columns:2; container-type:inline-size; width:600px;">
+ <div id="target"></div>
+</div>
+<script>
+ document.body.offsetTop;
+ container.style.width = "400px";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/grid-in-columns-001-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/grid-in-columns-001-crash.html
new file mode 100644
index 0000000000..b9cf100533
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/grid-in-columns-001-crash.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1276898">
+<style>
+ @container (max-width: 500px) {
+ #target {
+ display: grid;
+ }
+ }
+</style>
+<div id="container" style="columns:2; container-type:inline-size; width:400px;">
+ <div id="target"></div>
+</div>
+<script>
+ document.body.offsetTop;
+ container.style.width = "600px";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/grid-in-columns-002-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/grid-in-columns-002-crash.html
new file mode 100644
index 0000000000..762ad44f24
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/grid-in-columns-002-crash.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1276898">
+<style>
+ @container (max-width: 250px) {
+ #target {
+ display: grid;
+ }
+ }
+</style>
+<div id="ancestor" style="columns:2; column-gap:0; width:600px;">
+ <div style="container-type:inline-size;">
+ <div id="target"></div>
+ </div>
+</div>
+<script>
+ document.body.offsetTop;
+ ancestor.style.width = "400px";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/grid-in-columns-003-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/grid-in-columns-003-crash.html
new file mode 100644
index 0000000000..11089e6902
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/grid-in-columns-003-crash.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1276898">
+<style>
+ @container (max-width: 250px) {
+ #target {
+ display: grid;
+ }
+ }
+</style>
+<div id="ancestor" style="columns:2; column-gap:0; width:400px;">
+ <div style="container-type:inline-size;">
+ <div id="target"></div>
+ </div>
+</div>
+<script>
+ document.body.offsetTop;
+ ancestor.style.width = "600px";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/iframe-init-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/iframe-init-crash.html
new file mode 100644
index 0000000000..e915c2479f
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/iframe-init-crash.html
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<audio controls style='container-type: size'></audio>
+<iframe>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/inline-multicol-inside-container-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/inline-multicol-inside-container-crash.html
new file mode 100644
index 0000000000..7e209f7ffd
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/inline-multicol-inside-container-crash.html
@@ -0,0 +1,21 @@
+<!doctype html>
+<title>CSS Container Queries Test: Inline multicol inside size container - crash</title>
+<link rel="help" href="https://drafts.csswg.org/css-contain-3/#size-container">
+<link rel="help" href="https://crbug.com/829028">
+<style>
+ #container {
+ container-type: size;
+ width: 200px;
+ height: 100px;
+ }
+ @container (width <= 200px) {
+ #multicol {
+ column-count: 2;
+ column-gap: 0;
+ }
+ }
+</style>
+<p>Test passes if it doesn't crash.</p>
+<div id="container">
+ <span id="multicol"><div></div></span>
+</div>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/inline-with-columns-000-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/inline-with-columns-000-crash.html
new file mode 100644
index 0000000000..733b2c4ee9
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/inline-with-columns-000-crash.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1276898">
+<style>
+ @container (max-width: 500px) {
+ #target {
+ columns: 2;
+ }
+ }
+</style>
+<div id="container" style="container-type:inline-size; width:600px;">
+ <span id="target"></span>
+</div>
+<script>
+ document.body.offsetTop;
+ container.style.width = "400px";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/inline-with-columns-001-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/inline-with-columns-001-crash.html
new file mode 100644
index 0000000000..3b9bdf32bd
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/inline-with-columns-001-crash.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1276898">
+<style>
+ @container (max-width: 500px) {
+ #target {
+ columns: 2;
+ }
+ }
+</style>
+<div id="container" style="container-type:inline-size; width:400px;">
+ <span id="target"></span>
+</div>
+<script>
+ document.body.offsetTop;
+ container.style.width = "600px";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/input-column-group-container-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/input-column-group-container-crash.html
new file mode 100644
index 0000000000..5e520a45cf
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/input-column-group-container-crash.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<title>CSS Container Queries Test: </title>
+<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-queries">
+<link rel="help" href="https://crbug.com/1282782">
+<p>Pass if this test does not crash</p>
+<span style="column-count: 1">
+ <span style="display:table-column-group"></span>
+ <input id="inp">
+</span>
+<script>
+ document.body.offsetTop;
+ document.body.style.setProperty("container", "inline-size");
+ inp.setAttribute("type", "image");
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/input-placeholder-inline-size-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/input-placeholder-inline-size-crash.html
new file mode 100644
index 0000000000..4b1284e5cb
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/input-placeholder-inline-size-crash.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<title>CSS Container Queries Test: Crash: input inline-size container with placeholder</title>
+<link rel="help" href="https://drafts.csswg.org/css-contain-3/#size-container">
+<link rel="help" href="https://crbug.com/1288692">
+<p>Pass if this test does not crash</p>
+<input id="input" style="container-type:size">
+<script>
+ document.body.offsetTop;
+ input.style.position = "absolute";
+ input.setAttribute("placeholder", "placeholder");
+ document.body.offsetTop;
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/marker-gcs-after-disconnect-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/marker-gcs-after-disconnect-crash.html
new file mode 100644
index 0000000000..3680c79512
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/marker-gcs-after-disconnect-crash.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<title>Don't crash during getComputedStyle which removes ::marker</title>
+<link rel="help" href="https://drafts.csswg.org/css-contain-3">
+<link rel="help" href="https://crbug.com/1349732">
+<style>
+#container {
+ width: 100px;
+ height: 100px;
+ container-type: size;
+}
+@container (width) {
+ span { color: green; }
+}
+</style>
+<ul>
+ <li id="target"></li>
+</ul>
+<div id=container>
+ <span>PASS if no crash</span>
+</div>
+<script>
+let li = document.querySelector('li');
+getComputedStyle(target, '::marker').width;
+li.style.listStyleType = 'none';
+getComputedStyle(target, '::marker').width;
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/math-block-container-child-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/math-block-container-child-crash.html
new file mode 100644
index 0000000000..00b6836655
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/math-block-container-child-crash.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<title>CSS Container Queries Test: Math block container child crash</title>
+<link rel="help" href="https://drafts.csswg.org/css-contain-3/#size-container">
+<link rel="help" href="https://crbug.com/1294268">
+<p>Pass if there is no crash.</p>
+<math id="m" style="display:block math"></math>
+<script>
+ let div = document.createElement("div");
+ div.style.containerType = "size";
+ m.appendChild(div);
+ div.appendChild(document.createElement("span"));
+ document.body.offsetTop;
+ div.style.color = "green";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/orthogonal-replaced-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/orthogonal-replaced-crash.html
new file mode 100644
index 0000000000..10474fd984
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/orthogonal-replaced-crash.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<title>Chrome crash for replaced in orthogonal flow query container</title>
+<link rel="help" href="https://crbug.com/1325673">
+<p>Pass if no crash.</p>
+<iframe></iframe>
+<style>
+ body {
+ container-type: size;
+ writing-mode: vertical-rl;
+ }
+</style>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/pseudo-container-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/pseudo-container-crash.html
new file mode 100644
index 0000000000..f998c3a446
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/pseudo-container-crash.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<title>CSS Container Queries Test: No crash when ::after is a container</title>
+<link rel="help" href="https://drafts.csswg.org/css-contain-3/#query-container">
+<link rel="help" href="https://crbug.com/1225381">
+<style>
+ div::after {
+ container-type: size;
+ content: '';
+ display: block;
+ }
+</style>
+<div>
+ PASS if no crash
+</div>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/svg-layout-root-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/svg-layout-root-crash.html
new file mode 100644
index 0000000000..75a3839add
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/svg-layout-root-crash.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<title>@container changing display of SVG element should not crash</title>
+<link rel="help" href="https://crbug.com/1245689">
+<iframe id="frame" style="width: 200px"></iframe>
+<script>
+ frame.srcdoc = `
+ <style>
+ #container {
+ container-type: inline-size;
+ }
+ @container (min-width: 300px) {
+ .hide { display: none; }
+ }
+ </style>
+ <div id="container">
+ <div class="hide"><svg></svg></div>
+ </div>`;
+
+ requestAnimationFrame(() =>
+ requestAnimationFrame(() =>
+ requestAnimationFrame(() => frame.style.width = "400px")));
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/svg-text-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/svg-text-crash.html
new file mode 100644
index 0000000000..aadba08679
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/svg-text-crash.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<title>SVG text element with size container-type should not crash</title>
+<link rel="help" href="https://crbug.com/1298319">
+<style>
+ text { container-type: inline-size; }
+</style>
+<p>Pass if no crash.</p>
+<svg><text></text></svg>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-000-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-000-crash.html
new file mode 100644
index 0000000000..566a4eb1eb
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-000-crash.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1276898">
+<style>
+ @container (max-width: 500px) {
+ #target {
+ display: table;
+ }
+ }
+</style>
+<div id="container" style="columns:2; container-type:inline-size; width:600px;">
+ <div id="target"></div>
+</div>
+<script>
+ document.body.offsetTop;
+ container.style.width = "400px";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-001-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-001-crash.html
new file mode 100644
index 0000000000..4fab9de88f
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-001-crash.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1276898">
+<style>
+ @container (max-width: 500px) {
+ #target {
+ display: table;
+ }
+ }
+</style>
+<div id="container" style="columns:2; container-type:inline-size; width:400px;">
+ <div id="target"></div>
+</div>
+<script>
+ document.body.offsetTop;
+ container.style.width = "600px";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-002-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-002-crash.html
new file mode 100644
index 0000000000..4f0cdc0740
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-002-crash.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1276898">
+<style>
+ @container (max-width: 250px) {
+ #target {
+ display: table;
+ }
+ }
+</style>
+<div id="ancestor" style="columns:2; column-gap:0; width:600px;">
+ <div style="container-type:inline-size;">
+ <div id="target"></div>
+ </div>
+</div>
+<script>
+ document.body.offsetTop;
+ ancestor.style.width = "400px";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-003-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-003-crash.html
new file mode 100644
index 0000000000..436da592d9
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-003-crash.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1276898">
+<style>
+ @container (max-width: 250px) {
+ #target {
+ display: table;
+ }
+ }
+</style>
+<div id="ancestor" style="columns:2; column-gap:0; width:400px;">
+ <div style="container-type:inline-size;">
+ <div id="target"></div>
+ </div>
+</div>
+<script>
+ document.body.offsetTop;
+ ancestor.style.width = "600px";
+</script>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-004-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-004-crash.html
new file mode 100644
index 0000000000..daed42f009
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-004-crash.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<title>CSS Container Queries Crash Test</title>
+<link rel="help" href="https://crbug.com/1338055">
+<p>Pass if no crash</p>
+<div style="container-type:inline-size">
+ <span style="columns: 1">
+ <canvas>
+ <script>
+ document.body.offsetTop;
+ </script>
+ <div style="container-type:inline-size">
+ <span style="display:table-column-group"></span>
+ </div>
+ </canvas>
+ </span>
+</div>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-005-crash.html b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-005-crash.html
new file mode 100644
index 0000000000..60d6f9d3a1
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/container-queries/crashtests/table-in-columns-005-crash.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<title>CSS Container Queries Crash Test</title>
+<link rel="help" href="https://crbug.com/1336334">
+<li style="container-type:inline-size">
+ <span style="columns:2">
+ <table></table>
+ </span>
+</li>