Automatic update from web-platform-tests [flex] Use LayoutUnit diffuser when stretching lines. This smears the remainder of "cross_axis_free_space / num_lines" over all the flex-lines. Bug: 40437604 Change-Id: I04e05c0a7d5af194a99856f9aafceb1f8897bc9b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7731227 Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/main@{#1610816} -- wpt-commits: c0218c54f0a2c09599f8e226892ed997b42d8a60 wpt-pr: 59011
40 lines
875 B
HTML
40 lines
875 B
HTML
<!DOCTYPE html>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<link rel="help" href="https://crbug.com/40437604">
|
|
<style>
|
|
#flex {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
width: 10px;
|
|
height: 40px;
|
|
align-content: stretch;
|
|
outline: solid 1px;
|
|
}
|
|
#flex > div {
|
|
width: 10px;
|
|
min-height: 5px;
|
|
background: lime;
|
|
}
|
|
</style>
|
|
<div id="flex">
|
|
<div></div>
|
|
<div></div>
|
|
<div></div>
|
|
<div></div>
|
|
<div></div>
|
|
<div></div>
|
|
<div></div>
|
|
<div id="last"></div>
|
|
</div>
|
|
<script>
|
|
test(function() {
|
|
/* Increase the flexbox by 0.1px increments. */
|
|
for (let i = 0; i < 10; i++) {
|
|
const height = (40 + i/10) + 'px';
|
|
flex.style.height = height;
|
|
assert_equals(last.getBoundingClientRect().bottom, flex.getBoundingClientRect().bottom, height);
|
|
}
|
|
}, 'The last item should match the end edge.');
|
|
</script>
|