[wpt-sync] Sync PR 28634 - [LayoutNG] Nested fixedpos in nested multicol w/ CB in outer multicol
Categories
(Core :: Layout, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox90 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 28634 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/28634
Details from upstream follow.
b'Alison Maher <almaher@microsoft.com>' wrote:
[LayoutNG] Nested fixedpos in nested multicol w/ CB in outer multicol
Nested fixedpos elements in a nested multicol were handled previously
by CL:2791850 and CL:2823871. However, if a fixedpos was nested in an
OOF element inside a nested multicol, and the containing block for
the fixedpos was in an outer multicol, the fixedpos was never laid out.
The reason being that when we add an inner multicol with pending OOFs,
we don't make any changes to its OOF descendants. So if the fixedpos
containing block existed outside the inner multicol but inside the
outer multicol, fixedpos_containing_block in NGOutOfFlowPositionedNode
would never be set.In order to fix this, we need to store a fixedpos_containing_block along
with any inner multicols with pending OOFs, if one exists. A new
struct, NGMulticolWithPendingOOFs, was added to store this information.
The fixedpos_containing_block gets set the first time the inner multicol
reaches a potential fixedpos containing block.The multicol_offset variable of NGMulticolWithPendingOOFs was added for
two purposes:
- Similarly to CL:2836226, the static position was incorrect for
nested fixedpos elements in a nested fragmentation
context, and whose containing block was outside both multicols.
(See fixed-in-nested-multicol-with-transform-container.html for an
example).
In this case, multicol_offset is the accumulate multicol offset
relative to the outer fragmentation context. This gets added
to the static pos of any fixedpos descendants in
NGContainerFragmentBuilder::TransferOutOfFlowCandidates().- In the case where the inner multicol found a fixedpos containing
block, multicol_offset will be the offset from the multicol
to the top of the fixedpos containing block. This is also used
in NGContainerFragmentBuilder::TransferOutOfFlowCandidates() to
ensure that the fixedpos static position is correctly updated.MulticolCollection was updated from a HeapHashSet of inner multicol
LayoutBoxes to a HeapHashMap from inner multicol LayoutBoxes to
NGMulticolWithPendingOOFs.In order to avoid creating two NGMulticolWithPendingOOFs structs (one
for the logical space and one for the physical space), the
NGContainingBlock struct was also updated to a templated struct.Note: this CL does not handle the case of more than two layers
of nesting. For example, in the following case, the fixedpos would
not be laid out at the correct offset:
multicol
multicol
transform
multicol
relpos
abspos
fixedposIn order to get this case working, we'd also need to store a reference
to the multicol that the fixedpos containing block was found in inside
NGMulticolWithPendingOOFs. However, this use-case doesn't seem worth
handling at this time.Bug: 1198674,1200324
Change-Id: I213c35514fecf84fc62e55fe5531cff8b0830429
Reviewed-on: https://chromium-review.googlesource.com/2844299
WPT-Export-Revision: 64262d3c16403bfeef33cddcc482e23f68644da4
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 1•5 years ago
|
||
| Assignee | ||
Comment 2•5 years ago
|
||
CI Results
Ran 15 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 3 tests
Status Summary
Firefox
PASS: 2
FAIL: 1
Chrome
PASS: 1
FAIL: 2
Safari
PASS: 1
FAIL: 2
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
/css/css-multicol/fixed-in-nested-multicol-with-transform-container.html: FAIL (Chrome: PASS, Safari: FAIL)
Comment 4•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/3d2718212589
https://hg.mozilla.org/mozilla-central/rev/829f3ea5f613
Description
•