summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-contain
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-contain')
-rw-r--r--testing/web-platform/tests/css/css-contain/contain-layout-ink-overflow-019.html1
-rw-r--r--testing/web-platform/tests/css/css-contain/contain-layout-overflow-001.html1
-rw-r--r--testing/web-platform/tests/css/css-contain/contain-style-counters-002.html17
-rw-r--r--testing/web-platform/tests/css/css-contain/container-queries/custom-property-style-queries.html2
-rw-r--r--testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-intrinsic-size-001-ref.html29
-rw-r--r--testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-intrinsic-size-001.html35
-rw-r--r--testing/web-platform/tests/css/css-contain/reference/contain-style-counters-002-ref.html18
7 files changed, 89 insertions, 14 deletions
diff --git a/testing/web-platform/tests/css/css-contain/contain-layout-ink-overflow-019.html b/testing/web-platform/tests/css/css-contain/contain-layout-ink-overflow-019.html
index d4909aa70f..5cda6cd5be 100644
--- a/testing/web-platform/tests/css/css-contain/contain-layout-ink-overflow-019.html
+++ b/testing/web-platform/tests/css/css-contain/contain-layout-ink-overflow-019.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<meta charset="UTF-8">
+ <meta name="fuzzy" content="1;0-50">
<title>CSS Test: 'contain: layout' on element that overflows and its parent has 'overflow: scroll'</title>
diff --git a/testing/web-platform/tests/css/css-contain/contain-layout-overflow-001.html b/testing/web-platform/tests/css/css-contain/contain-layout-overflow-001.html
index 5bf984e2bf..05c66fa1e9 100644
--- a/testing/web-platform/tests/css/css-contain/contain-layout-overflow-001.html
+++ b/testing/web-platform/tests/css/css-contain/contain-layout-overflow-001.html
@@ -3,6 +3,7 @@
<html>
<head>
<meta charset="utf-8">
+ <meta name="fuzzy" content="1;0-50">
<title>CSS Test: 'contain: layout' should force all overflow to be ink overflow.</title>
<link rel="author" title="Morgan Rae Reschenberg" href="mailto:mreschenberg@berkeley.edu">
<link rel="help" href="https://drafts.csswg.org/css-contain/#containment-layout">
diff --git a/testing/web-platform/tests/css/css-contain/contain-style-counters-002.html b/testing/web-platform/tests/css/css-contain/contain-style-counters-002.html
index 48494ce2be..862ee789b7 100644
--- a/testing/web-platform/tests/css/css-contain/contain-style-counters-002.html
+++ b/testing/web-platform/tests/css/css-contain/contain-style-counters-002.html
@@ -5,10 +5,9 @@
<title>CSS Containment Test: 'contain: style' and counter (with 'display: contents')</title>
<link rel="help" href="https://www.w3.org/TR/css-contain-1/#containment-style">
- <link rel=help href="https://github.com/w3c/csswg-drafts/issues/7392">
- <link rel="match" href="reference/contain-style-counters-001-ref.html">
-
- <meta content="This test checks that when an element has 'contain: style', then counters which may be affecting its subtree are reset to 0 for such scope. In this test, the div#test does not generate a principal box because of 'display: contents'. Despite that particular condition, 'contain: style' will have an effect on div#test." name="assert">
+ <link rel="match" href="reference/contain-style-counters-002-ref.html">
+ <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/7392">
+ <meta content="This test checks that when an element has 'contain: style', then counters which may be affecting its subtree are not reset if they don't generate a box, e.g. due to display: contents" name="assert">
<style>
div#create-counter
@@ -29,14 +28,6 @@
font-size: 3em;
}
- /*
- Other types of containment (size, layout, paint) have no
- effect on box that do not generate a principal box which
- is the case here with div#test because of 'display: contents'.
- But in this test, 'contain: style' will apply and will
- have a rendering effect on the counter.
- */
-
div#test span
{
counter-increment: counter-of-span 5;
@@ -61,7 +52,7 @@
</style>
- <p>Test passes if there is the digit 5.
+ <p>Test passes if there is the number 14.
<div id="create-counter"></div>
diff --git a/testing/web-platform/tests/css/css-contain/container-queries/custom-property-style-queries.html b/testing/web-platform/tests/css/css-contain/container-queries/custom-property-style-queries.html
index 29b5004af0..4ae5efca91 100644
--- a/testing/web-platform/tests/css/css-contain/container-queries/custom-property-style-queries.html
+++ b/testing/web-platform/tests/css/css-contain/container-queries/custom-property-style-queries.html
@@ -415,7 +415,7 @@
color: green;
}
}
- @container style(--number: a b) {
+ @container style(--spaces: a b) {
#original-text-spaces {
color: red;
}
diff --git a/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-intrinsic-size-001-ref.html b/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-intrinsic-size-001-ref.html
new file mode 100644
index 0000000000..8d9bd96f7e
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-intrinsic-size-001-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <meta charset="utf-8">
+ <title>content-visibility and intrinsic size (reference)</title>
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <script src="/common/rendering-utils.js"></script>
+ <style>
+ #container {
+ position: sticky;
+ }
+ #container > div {
+ font: 25px/1 Ahem;
+ }
+ </style>
+ <div id="container">
+ <div>X</div>
+ <div id="target">XX</div>
+ <div>XXX</div>
+ <div>XXXX</div>
+ </div>
+ <script>
+ target.scrollIntoView();
+ document.fonts.ready.then(() => {
+ waitForAtLeastOneFrame().then(() => {
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ });
+ </script>
+</html>
diff --git a/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-intrinsic-size-001.html b/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-intrinsic-size-001.html
new file mode 100644
index 0000000000..3a378d17e8
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-intrinsic-size-001.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <meta charset="utf-8">
+ <title>content-visibility and intrinsic size</title>
+ <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1880928">
+ <link rel="match" href="content-visibility-intrinsic-size-001-ref.html">
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <meta name="assert" content="Rendering of should stabilize, with all the 'content-visibility: auto' divs becoming close to viewport.">
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <script src="/common/rendering-utils.js"></script>
+ <style>
+ #container {
+ position: sticky;
+ }
+ #container > div {
+ font: 25px/1 Ahem;
+ content-visibility: auto;
+ contain-intrinsic-size: 1px 5000px;
+ }
+ </style>
+ <div id="container">
+ <div>X</div>
+ <div id="target">XX</div>
+ <div>XXX</div>
+ <div>XXXX</div>
+ </div>
+ <script>
+ target.scrollIntoView();
+ document.fonts.ready.then(() => {
+ waitForAtLeastOneFrame().then(() => {
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ });
+ </script>
+</html>
diff --git a/testing/web-platform/tests/css/css-contain/reference/contain-style-counters-002-ref.html b/testing/web-platform/tests/css/css-contain/reference/contain-style-counters-002-ref.html
new file mode 100644
index 0000000000..7a14112c44
--- /dev/null
+++ b/testing/web-platform/tests/css/css-contain/reference/contain-style-counters-002-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+
+ <meta charset="UTF-8">
+
+ <title>CSS Reference Test</title>
+
+ <link rel="author" title="GĂ©rard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
+
+ <style>
+ div
+ {
+ font-size: 3em;
+ }
+ </style>
+
+ <p>Test passes if there is the number 14.
+
+ <div>14</div>