summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-overflow/overflow-empty-child-box.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-overflow/overflow-empty-child-box.html
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-overflow/overflow-empty-child-box.html')
-rw-r--r--testing/web-platform/tests/css/css-overflow/overflow-empty-child-box.html59
1 files changed, 59 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-overflow/overflow-empty-child-box.html b/testing/web-platform/tests/css/css-overflow/overflow-empty-child-box.html
new file mode 100644
index 0000000000..880e0d3684
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/overflow-empty-child-box.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+ <meta charset="utf-8">
+ <title>CSS Overflow Test: Testing an empty child box and its container's scrollable overflow area</title>
+ <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
+ <link rel="author" title="Mozilla" href="https://www.mozilla.org/">
+ <link rel="help" href="https://drafts.csswg.org/css-overflow-3/#scrollable">
+ <meta name="assert" content="This test verifies that an empty child box shouldn't contribute to its parents scrollable overflow area.">
+
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/resources/check-layout-th.js"></script>
+
+ <style>
+ .container {
+ border: 1px solid black;
+ width: 200px;
+ height: 100px;
+ }
+
+ .empty {
+ position: relative;
+ width: 0px;
+ height: 0px;
+ left: 500px;
+ top: 300px;
+ box-shadow: 0 0 0 10px blue;
+ }
+ </style>
+
+ <body onload="checkLayout('.container')">
+ <p>You should see no scrollbars in these container because an empty child
+ box shouldn't contribute to its parents scrollable overflow area. </p>
+
+ <div class="container" style="overflow: visible"
+ data-expected-scroll-width="200" data-expected-scroll-height="100">
+ <div class="empty"></div>
+ </div>
+
+ <div class="container" style="overflow: auto"
+ data-expected-scroll-width="200" data-expected-scroll-height="100">
+ <div class="empty"></div>
+ </div>
+
+ <div class="container" style="overflow: hidden"
+ data-expected-scroll-width="200" data-expected-scroll-height="100">
+ <div class="empty"></div>
+ </div>
+
+ <div class="container" style="overflow: clip"
+ data-expected-scroll-width="200" data-expected-scroll-height="100">
+ <div class="empty"></div>
+ </div>
+ </body>
+</html>