diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-058-ref.html | |
parent | Initial commit. (diff) | |
download | firefox-upstream.tar.xz firefox-upstream.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/content-visibility/content-visibility-058-ref.html')
-rw-r--r-- | testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-058-ref.html | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-058-ref.html b/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-058-ref.html new file mode 100644 index 0000000000..a98e4a856a --- /dev/null +++ b/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-058-ref.html @@ -0,0 +1,61 @@ +<!doctype HTML> +<html class="reftest-wait"> +<meta charset="utf8"> +<title>CSS Content Visibility: auto, scrollIntoView() (reference)</title> +<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> +<script src="/common/reftest-wait.js"></script> + +<style> +.spacer { + height: 10000px; +} +.container { + position: relative; + width: 150px; + background: lightblue; + contain-intrinsic-size: 50px 250px; +} +.size_contained { + contain: size; +} +.child { + width: 50px; + height: 300px; + background: lightgreen; +} +#target { + position: absolute; + bottom: 0; + + width: 10px; + height: 10px; + background: blue; +} +</style> + +<p>Test FAILS if this sentence is at the top of the screen. +<div class=spacer></div> +<div id=container class="container"> + <div class=child></div> + <div id=target></div> +</div> +<p>Test PASSES if this sentence is near the top of the screen, after a thin band of three colors. +<div class=spacer></div> + +<script> + +function runReference() { + document.getElementById("target").scrollIntoView(true /* alignToTop */); + requestAnimationFrame(takeScreenshot); +} + +window.onload = requestAnimationFrame(() => { + requestAnimationFrame(() => { + requestAnimationFrame(() => { + runReference(); + }); + }); +}); + +</script> |