Bug 1717152 [wpt PR 29430] - [LayoutNG] OOF with inline containing block in multicol...
commit44096962bc1ad6d604870434d280c601f10c3952
authorAlison Maher <almaher@microsoft.com>
Fri, 25 Jun 2021 22:15:04 +0000 (25 22:15 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Sat, 26 Jun 2021 22:33:21 +0000 (26 22:33 +0000)
tree5bcfc380b140882f946b73479502a3c1668ccb40
parent37aa1858de4c52f2b2869c54d931cd8e4f5bdcf2
Bug 1717152 [wpt PR 29430] - [LayoutNG] OOF with inline containing block in multicol, a=testonly

Automatic update from web-platform-tests
[LayoutNG] OOF with inline containing block in multicol

This CL adds support for fragmented OOFs with an inline containing
block. This involved determining the containing block info at the right
time and collecting all of the inline items from all fragmentainers in
order to compute the correct full containing block rect. Some of the
work involved in this update included:

1. Skipping over the call to ComputeInlineContainingBlocks() in
NGOutOfFlowLayoutPart::LayoutCandidates() when inside a fragmentation
context.

2. Adding a similar method to ComputeInlineContainingBlocks() called
ComputeInlineContainingBlocksForFragmentainer() that performs the
same calculation but in the case of fragmentation. This is called
in NGOutOfFlowLayoutPart::LayoutFragmentainerDescendants() in order
to set up the correct ContainingBlockInfo for the inline containing
block.

3. Move the existing inline containing block helpers from
NGBoxFragmentBuilder to a new utils file: InlineContainingBlockUtils.
One such helper, ComputeInlineContainerGeometry(), required different
logic in the case of fragmentation, so a new helper,
ComputeInlineContainerGeometryForFragmentainer(), was added to handle
the collection of inline items in this case. Besides the newly added
method, no changes were made to the methods moved from
NGBoxFragmentBuilder to InlineContainingBlockUtils.

4. Move PreviousFragmentainerBreakToken() from NGOutOfFlowLayoutPart
to ng_fragmentation_utils for easier access in
InlineContainingBlockUtils.

A few follow-up changes include handling the relpos offset for inline
containing blocks, legacy writeback, and handling OOFs whose inline
containing block is a direct child of the multicol (CL:2938502).

Bug: 1079031
Change-Id: Ie5b46b7e49304d5c198c2df2e6a6735f9d2fc68c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2969783
Commit-Queue: Alison Maher <almaher@microsoft.com>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#894823}

--

wpt-commits: 5489ba7536af49653702776c427b0d84d918dca4
wpt-pr: 29430
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-048.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-049.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-050.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-051.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-052.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-053.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-054.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-055.html [new file with mode: 0644]