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