summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-contain/content-visibility
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /testing/web-platform/tests/css/css-contain/content-visibility
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-upstream/125.0.1.tar.xz
firefox-upstream/125.0.1.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-contain/content-visibility')
-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
2 files changed, 64 insertions, 0 deletions
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>