Skip to content

Commit

Permalink
[GridFragmentation] Propagate child break values follow-up
Browse files Browse the repository at this point in the history
As a follow-up to CL:3451309 and CL:3451161, add a call to
SetShouldPropagateChildBreakValues() in the ConstraintSpaceBuilder
so that if the parent space has this flag set, the child will too.

This means that we are propagating these values on all layout
runs inside a fragmentation context root (even if
SetupSpaceBuilderForFragmentation() isn't called.)

However, this allows us to propagate break values in grid (and flex)
past the immediate child level in the non-fragmenting layout pass.

external/wpt/css/css-break/grid/grid-item-fragmentation-045.html
was updated to add an extra layer of propagation to ensure that
we are correctly propagating past the first child level for grid.

Bug: 614667
Change-Id: Ie7323a565a4183d6cf36d58e33fa6d60029913ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3465477
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Alison Maher <almaher@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#971929}
  • Loading branch information
alisonmaher authored and pull[bot] committed Jan 25, 2024
1 parent eedb8da commit 1520671
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion css/css-break/grid/grid-item-fragmentation-045.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<div style="position: relative; width: 100px; height: 100px; columns: 2; column-gap: 0; column-fill: auto; background: red;">
<div style="display: grid; grid-template-rows: 50px 100px;">
<div style="background: green; break-after: avoid;">
<div style="break-after: column;"></div> <!-- This break-after should be propagated to the grid row. -->
<div>
<div style="break-after: column;"></div> <!-- This break-after should be propagated to the grid row. -->
</div>
</div>
<div style="background: green;">
</div>
Expand Down

0 comments on commit 1520671

Please sign in to comment.