[wpt-sync] Sync PR 34249 - Pass parent constraint space to child space builder when possible.
Categories
(Core :: Layout, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox103 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 34249 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/34249
Details from upstream follow.
Morten Stenshorne <mstensho@chromium.org> wrote:
Pass parent constraint space to child space builder when possible.
Prefer using the NGConstraintSpaceBuilder(const NGConstraintSpace&
parent_space...) constructor, when possible. It inherits a flag from the
parent - "ShouldPropagateChildBreakValues". Failing to inherit this
inside the table layout code was actually causing bugs (see test
included).The real motivation behind this change, though, is that I'm planning on
adding one more flag here for repeated content (repeated table headers /
footers, and also fixed-positioned elements when printing).The changes here are all about tables and out-of-flow positioning. We
can now get rid of a couple of members from NGOutOfFlowLayoutPart. At
the same time, now that we're using the NGConstraintSpaceBuilder that
takes a constraint space, we can no longer "cheat" about what the
parent's writing mode is. So NGOutOfFlowLayoutPart::GenerateFragment()
needs to convert the size of the child from the writing-mode of the
child to the writing-mode of the container, and pass that as available
size to the constraint space builder.LayoutNGMixin\<Base>::UpdateOutOfFlowBlockLayout() was also passing an
incorrect constraint space to NGOutOfFlowLayoutPart. It should be
created based on the container, NOT the child. Because of this change,
we now need to remove the DCHECK for formatting context root from
NGConstraintSpace::CreateFromLayoutObject(), since we may now end up
here even if the containing block isn't a formatting context root. But
that's okay, as long as we're not going to lay it out. Re-add [1] an
equivalent DCHECK to UpdateInFlowBlockLayout().[1] Was removed in CL:1473393, in favor of the one in
CreateFromLayoutObject(), which now is gone.Bug: 1078927
Change-Id: I28783925326df87311c9894b72f898525daa5811
Reviewed-on: https://chromium-review.googlesource.com/3673761
WPT-Export-Revision: 1459bd1df0dc4642619ab9fb3498268518b59062
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests
Status Summary
Firefox
FAIL
: 1
Chrome
FAIL
: 1
Safari
FAIL
: 1
Links
Details
New Tests That Don't Pass
- /css/css-break/table/break-avoidance-in-table-in-grid.html [wpt.fyi]:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
https://hg.mozilla.org/mozilla-central/rev/dbf86ee616fa
https://hg.mozilla.org/mozilla-central/rev/55c70f6ec387
Description
•