mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 05:08:36 +02:00
Automatic update from web-platform-testsOnly update intrinsic_content_logical_height_ if we don't have an override height If we do have an override height, children will size themselves relative to the override height (e.g. flexbox flexing/stretching, percentage heights). Because our intrinsic height is based on our children, we would then store an incorrect intrinsic height. Right now this is rarely a problem in practice because we do not use this height for min-height: auto in case of a nested column flexbox, but we would like to apply this in the future. This change will make it possible to do so without affecting performance. For context, see crrev.com/c/1246730 and crrev.com/1631033003 Change-Id: I1ee8ad87a9d6a6517a3154f47e2be170be44a189 Reviewed-on: https://chromium-review.googlesource.com/c/1283482 Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Commit-Queue: Christian Biesinger <cbiesinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#600067} -- wpt-commits: 2c8559924a1a4207673c492110cbf26c54bb20e4 wpt-pr: 13547
64 lines
1.9 KiB
HTML
64 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<title>Tests correct handling of min-height: min-content with dynamic changes</title>
|
|
<link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#resolve-flexible-lengths" title="4.5. Implied Minimum Size of Flex Items" />
|
|
<link rel="author" title="Google Inc." href="http://www.google.com/">
|
|
<link href="support/flexbox.css" rel="stylesheet">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/resources/check-layout-th.js"></script>
|
|
<style>
|
|
.container {
|
|
height: 300px;
|
|
outline: 2px solid black;
|
|
}
|
|
|
|
.inner
|
|
{
|
|
width: 400px;
|
|
flex: 1;
|
|
background-color: green;
|
|
}
|
|
#container2 .flexbox > * { flex-basis: 0; }
|
|
#container2 .column > * { flex-basis: auto; }
|
|
.container .flexbox { min-height: min-content; }
|
|
.container > .flexbox { min-height: 0; }
|
|
</style>
|
|
<script>
|
|
function change() {
|
|
var container = document.getElementById('container');
|
|
container.offsetHeight;
|
|
container.style.height = '80px';
|
|
container = document.getElementById('container2');
|
|
container.offsetHeight;
|
|
container.style.height = '80px';
|
|
checkLayout('.container');
|
|
}
|
|
</script>
|
|
<body onload="change()">
|
|
<p>Green rectangle should be entirely within the black rectangle</p>
|
|
<div id="log"></div>
|
|
<div id="container" class="container">
|
|
<div class="flexbox column" style="height: 100%;">
|
|
<div class="flexbox flex-one">
|
|
<div class="flexbox column">
|
|
<div class="flexbox column flex-one">
|
|
<div class="inner" data-expected-height="80">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="container2" class="container">
|
|
<div class="flexbox column" style="height: 100%;">
|
|
<div class="flexbox flex-one">
|
|
<div class="flexbox column">
|
|
<div class="flexbox column flex-one">
|
|
<div class="inner" data-expected-height="80">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|