Closed Bug 1918576 Opened 2 months ago Closed 2 months ago

Definite max-block-size and auto block-size shouldn't establish a percentage basis

Categories

(Core :: Layout, defect)

defect

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox130 --- unaffected
firefox131 --- unaffected
firefox132 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

nsIFrame::ComputeBSizeValueAsPercentageBasis() [1] incorrectly returns a definite percentage basis with a definite max-block-size and an auto block-size. We should only apply min-block-size & max-block-size constraint if block-size is a definite value.

[1] https://searchfox.org/mozilla-central/rev/ddd14e6b96331624d56d56b78c1d9a359d3e57d3/layout/generic/nsIFrame.cpp#6689-6712

Set release status flags based on info from the regressing bug 1909761

That is, a definite max block-size and an auto block-size should not compute a
definite percentage basis in the block axis.

Note that we accidentally pass
testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-017.html.
After applying this patch, the test starts to fail, but it will be fixed in the
next part.

In a column-oriented flex container, if a flex item's intrinsic inline size or
its descendants' inline size contributions depend on the item's block size,
NS_FRAME_DESCENDANT_INTRINSIC_ISIZE_DEPENDS_ON_BSIZE will be set. In this
case, when determining the flex item's cross-size, we need to mark the flex
item's intrinsic inline size as dirty such that its (auto) inline size is
recomputed when constructing its ReflowInput.

testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-017.html
is the test coverage for this patch.

Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/e8d914658c03 Part 1 - Apply min & max constraints only if block-size is definite in ComputeBSizeValueAsPercentageBasis(). r=dholbert https://hg.mozilla.org/integration/autoland/rev/51fd81b5ced0 Part 2 - Mark a flex item's intrinsic inline size dirty if we override its block size. r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/48270 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Regressions: 1920084
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: