gecko-dev/testing/web-platform/tests/css/css-flexbox/flex-minimum-height-flex-items-012.html
Christian Biesinger 3d7da4dfcf Bug 1526559 [wpt PR 15238] - [css-flexbox] Don't apply min-height: auto to children with percentage heights, a=testonly
Automatic update from web-platform-tests
[css-flexbox] Don't apply min-height: auto to children with percentage heights

In such a case, we compute an incorrect intrinsic logical height, because
we resolve pre-flex percentages when we calculate the intrinsic height.
In common cases this can be 100% of the flexbox height, which we later
use as a min-height of the flex item, leading to it not shrinking when
it should.

This reverts https://crrev.com/c/1269235 for the case of a flex item
which is a flexbox with percentage children.

Bug: 927066
Change-Id: I955bf651f75495122bb454d5221303b188bbb03c
Reviewed-on: https://chromium-review.googlesource.com/c/1452477
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Auto-Submit: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628806}

--

wpt-commits: ad61eacc8526ee3b277a6307c2d717bdc3985ef2
wpt-pr: 15238
2019-02-14 11:38:53 +00:00

37 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html>
<title>CSS Flexbox: Combining 100% heights with min-height: auto should not lead to overflow</title>
<link rel="author" title="Google LLC" href="https://www.google.com/" />
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#min-size-auto" />
<link rel="issue" href="https://bugs.chromium.org/p/chromium/issues/detail?id=927066" />
<style>
.flexbox {
display: flex;
}
.column {
flex-flow: column;
}
.flexbox span {
height: 100%;
background: orange;
display: block;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.flexbox')">
<div id=log></div>
<div class="flexbox column" style="height: 100px; width: 100px; background: green">
<div style="height: 10px; flex: 0.1;" data-expected-height="10"></div>
<div style="height: 100%; display: flex; background: teal; flex: 0.9;" data-expected-height="90">
<div style="height: 100%"></div>
</div>
</div>
</body>
</html>