Table flex items has wrong flex base size in column flex container
Categories
(Core :: Layout: Flexbox, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
References
Details
Attachments
(6 files)
Before bug 1674302, table flex item didn't consider flex-basis
properly.
After bug 1674302, table flex item may still returns a wrong flex base size in column flex container if there's a caption on the block-axis or non-zero border & padding with box-sizing: content-box
. We also don't get the 'auto' height when measuring the table flex item content because UseAutoBSize doesn't propagate to the inner table.
Attached a testcase adapted from table-as-item-specified-width.html.
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
We already compute both the inner table frame and the caption frame's
block-sizes in InnerTableShrinkWrapSize() and CaptionShrinkWrapSize(),
respectively. Rather than throwing them away, popping them up to
ComputeAutoSize().
This haven't changed the behavior yet.
Assignee | ||
Comment 3•3 years ago
|
||
An inflexible table flex item's hypothetical main size is its final main
size. With Part 1, it's easy to change
nsTableWrapperFrame::ComputeSize() to return the correct block-size.
Depends on D106155
Assignee | ||
Comment 4•3 years ago
|
||
The mIsFlexContainerMeasuringBSize flag serves two purposes:
(1) Tell ReflowInput::ComputeMinMaxValues() to treat min-block-size and
max-block-size like the initial value.
We can just set both sizes after creating the ReflowInput, like this
patch does.
(2) Add ComputeSizeFlag::UseAutoBSize
to mComputeSizeFlags.
Similar to the reasoning in Bug 1674302 Part 2
https://hg.mozilla.org/mozilla-central/rev/23aff0f21a1d, the
UseAutoBSize flag is buggy when used on table flex items because it
never propagates to inner table frame. We can fix it by providing an
'auto' mStyleBSize in StyleSizeOverrides.
This fixed table flex item's content block-size measurement. As
described in table-as-item-specified-height.html, the specified height
on <table> now won't count as another min-height anymore.
Depends on D106156
Assignee | ||
Comment 5•3 years ago
|
||
Part 2 fixed table-as-item-specified-height-2.html and
table-as-item-specified-height-3.html.
Part 3 fixed table-as-item-specified-height-1.html
Part 2 and Part 3 are both needed to not break
layout/reftests/flexbox/flexbox-table-flex-items-3.html.
Depends on D106157
Updated•3 years ago
|
Updated•3 years ago
|
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/0e35951d5ea3 Part 1 - Let nsTableWrapperFrame::ComputeAutoSize() return a resolved block-size. r=dholbert https://hg.mozilla.org/integration/autoland/rev/2f75ec7fe055 Part 2 - Fix table flex item's flex base size & hypothetical main size in a column flex container. r=dholbert https://hg.mozilla.org/integration/autoland/rev/a07fe77b2108 Part 3 - Fix table flex item's content block-size measurement by removing mIsFlexContainerMeasuringBSize flag. r=dholbert https://hg.mozilla.org/integration/autoland/rev/415a2c4c73b3 Part 4 - Add WPT reftests, and adjust test expectations. r=dholbert
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/27782 for changes under testing/web-platform/tests
Comment 8•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0e35951d5ea3
https://hg.mozilla.org/mozilla-central/rev/2f75ec7fe055
https://hg.mozilla.org/mozilla-central/rev/a07fe77b2108
https://hg.mozilla.org/mozilla-central/rev/415a2c4c73b3
Upstream PR merged by moz-wptsync-bot
Description
•