Files
sousa-gecko/testing/web-platform/tests/css/css-grid/anonymous-grid-items-002.html
T
Ian Kilpatrick 2e4f4db684 Bug 1971791 [wpt PR 53021] - [layout] Fix AddChildBeforeDescendant for LayoutBlock., a=testonly
Automatic update from web-platform-tests
[layout] Fix AddChildBeforeDescendant for LayoutBlock.

LayoutBlock handles the adding/removing children for
grid/flex/table-parts/etc.

AddChildBeforeDescendant previously was called from
LayoutBlockFlow::AddChild *and* LayoutBlock::AddChild, however there are
subtly different rules for both of them.

For grid/flex/etc, when inserting an OOF-positioned element, it should
split any anonymous blocks, and add the OOF-positioned at the top level.
We weren't previously doing this - instead we were adding it directly to
the anonymous block-flow.

As the rules are slightly different, split AddChildBeforeDescendant into
two private methods on each.

Bug: 40560663
Change-Id: I5fffe9597314c9d98dc499ab46b24ecd5a55aad2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6626458
Reviewed-by: David Grogan <dgrogan@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1471901}

--

wpt-commits: afed1c28152fcea1924994eb88b6c879094b93f9
wpt-pr: 53021
2025-06-23 09:35:06 +00:00

13 lines
453 B
HTML

<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-items">
<link rel="match" href="anonymous-grid-items-002-ref.html">
<p>Test passes if there are two lines below:</p>
<hr>
<div style="display: grid; grid-auto-flow: row;">
line one <span id="target" style="position: absolute; display: none;"></span> line two
</div>
<script>
document.body.offsetTop;
document.getElementById('target').style.display = 'inline';
</script>