Bug 1704621 [wpt PR 28447] - [LayoutNG] Nested fixedpos in a multicol, a=testonly
commit5def5f093612fd553709a66bc9cf59a106443f9c
authorAlison Maher <almaher@microsoft.com>
Tue, 13 Apr 2021 10:24:25 +0000 (13 10:24 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Thu, 15 Apr 2021 09:17:39 +0000 (15 09:17 +0000)
tree047b7e89c01b1d02da54556beb444106b82d8e19
parent6bc4b274de48208aaa44740e728626dd845e8f37
Bug 1704621 [wpt PR 28447] - [LayoutNG] Nested fixedpos in a multicol, a=testonly

Automatic update from web-platform-tests
[LayoutNG] Nested fixedpos in a multicol

When a fixedpos is nested in an abspos inside a multicol, and
its containing block is inside the multicol (for example, a
transform), it fails to get laid out. The reason being that
its abspos ancestor is laid out once it reaches the
fragmentation context root, resulting in the fixedpos never
finding its containing block.

To fix this, we now store an additional containing block
fragment and offset inside NGOutOfFlowPositionedNode for
any fixepos descendants. This gets set when the first
potential fixedpos container is encountered as an out-of-
flow fragmentainer descendant makes its way to fragmentation
context root. If the out-of-flow element has a fixedpos
descendant, this extra containing block info is used to
perform layout on that descendant.

Because we are now storing two containing block fragments/
offsets in NGOutOfFlowPositionedNode, a new struct called
NGOOFPositionedContainingBlock was added to hold the fragment
and offset for each containing block inside
NGOutOfFlowPositionedNode.

Additionally, the code that checked for the breakability of
an element resulted in all fixedpos elements becoming
monolithic. However, they should only be treated as such
if their containing block is the viewport. The web test that
had been added to test the old behavior has been deleted, and
new wpt tests have been added to test that fixedpos
elements with a non-viewport containing block break properly.

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

--

wpt-commits: 0e16f34e25e621bccf287f93c8c7034bdc7422e1
wpt-pr: 28447
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-029.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-030.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-031.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-032.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-033.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-034.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-035.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/out-of-flow-in-multicolumn-036.html [new file with mode: 0644]