Automatic update from web-platform-tests [grid] Rework ComputeOutOfFlowItemContainingRect. Previously we had the function ComputeOutOfFlowOffsetAndSize which had some relatively complex logic for computing the offset and size of the containing block in that axis. Additionally it has special logic for grid-lanes. By default, we want to use the padding-box, so just pass that into the respective ComputeOutOfFlowItemContainingRect functions, and then "shift" the relevant edge. To do this we need to expose both TrackStartOffset and TrackEndOffset. ComputeOutOfFlowItemContainingRect becomes larger, but easier to reason about. The Shift*EdgeTo logic ensures that we don't get a negative size. Additionally this patch fixes a subtle bug, where if the grid-container had scrollbars we committed them from our calculation. Add a WPT test for this. Other than this fix, there should be no other behaviour change. Change-Id: I49e3694c1996b88f6e63335552b2b0365f45aa05 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7841996 Reviewed-by: Alison Maher <almaher@microsoft.com> Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/main@{#1630789} -- wpt-commits: 678d220a630a27f98e24089bc39d3cc156b29831 wpt-pr: 59890
20 lines
263 B
HTML
20 lines
263 B
HTML
<!DOCTYPE HTML>
|
|
<style>
|
|
#container {
|
|
height: 100px;
|
|
width: 100px;
|
|
overflow: scroll;
|
|
border: solid 3px;
|
|
position: relative;
|
|
}
|
|
|
|
#container > div {
|
|
position: absolute;
|
|
background: green;
|
|
inset: 0;
|
|
}
|
|
</style>
|
|
<div id="container">
|
|
<div></div>
|
|
</div>
|