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-flexbox/dynamic-grid-flex-abspos.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-flexbox/dynamic-grid-flex-abspos.html')
-rw-r--r-- | testing/web-platform/tests/css/css-flexbox/dynamic-grid-flex-abspos.html | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-flexbox/dynamic-grid-flex-abspos.html b/testing/web-platform/tests/css/css-flexbox/dynamic-grid-flex-abspos.html new file mode 100644 index 0000000000..73318466f0 --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/dynamic-grid-flex-abspos.html @@ -0,0 +1,82 @@ +<!DOCTYPE html> +<title>grid items and abspos flex children</title> +<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org" /> +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#abspos-items"> +<link rel="help" href="https://drafts.csswg.org/css-grid/#algo-overview" title="Note at bottom of this section: 'the size of a grid item which is stretched is also considered definite.'"> +<link rel="bookmark" href="https://crbug.com/1091588" /> +<link rel="bookmark" href="https://crbug.com/1018439" /> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> + +<style> +.grid { + display: grid; +} + +.flexbox { + display: flex; +} + +.relpos { + position: relative; +} + +.abspos { + position: absolute; + border: 1px solid; +} + +/* These are just for making the test look better. */ +p { + margin: 0px; +} +p + div { + margin-bottom: 40px; +} +</style> + +<p>This crashed Chrome 84.</p> +<div class=grid> + <div class="relpos flexbox" data-expected-height=20> + <div class=abspos>Test</div> + <div style="height: 20px;"></div> + </div> +</div> + +<p>Outer is a regular div.</p> +<div> + <div class="relpos flexbox" data-expected-height=20> + <div class=abspos>Test</div> + <div style="height: 20px;"></div> + </div> +</div> + +<p>relpos element is a regular div, not flexbox.</p> +<div class=grid> + <div class="relpos" data-expected-height=20> + <div class=abspos>Test</div> + <div style="height: 20px;"></div> + </div> +</div> + +<p>Relpos flexbox has a % height descendant. The height of the flexbox grid item is supposed to be definite, allowing the %height flex item to resolve. + +This fails in chrome because of https://crbug.com/1018439</p> +<div class=grid> + <div class="relpos flexbox" data-expected-height=20> + <div class=abspos>Test</div> + <div style="height: 20px;"></div> + <div style="height: 50%" data-expected-height=10></div> + </div> +</div> + +<script> + checkLayout('.relpos'); + // Changing the abspos border shouldn't change the size of any inflow element. + for (abspos of document.querySelectorAll(".abspos")) { + abspos.style.borderWidth = "10px"; + } + checkLayout('.relpos'); +</script> |