WPT css/css-flexbox/alignment/flex-align-baseline-flex-003.html and flex-align-baseline-flex-004.html fail in Firefox
Categories
(Core :: Layout: Flexbox, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox116 | --- | fixed |
People
(Reporter: dholbert, Assigned: TYLin)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
We fail various subtests in these two WPTs:
https://wpt.fyi/results/css/css-flexbox/alignment/flex-align-baseline-flex-003.html
https://wpt.fyi/results/css/css-flexbox/alignment/flex-align-baseline-flex-004.html
http://wpt.live/css/css-flexbox/alignment/flex-align-baseline-flex-003.html
http://wpt.live/css/css-flexbox/alignment/flex-align-baseline-flex-004.html
Looking at the first failure in -003 test: the test is doing e.g. first baseline
alignment between a flex container and another element, and it's testing whether we export the correct baseline for that flex container.
In this case the test seems to be expecting that the flex container should derive its first baseline
from an item in its first row, and that item happens to be last baseline aligned. (There are no first-baseline aligned items in that first row.) We instead fall back to just using the first flex item.
The relevant spec text is here:
https://drafts.csswg.org/css-flexbox-1/#flex-baselines
If any of the flex items on the flex container’s startmost/endmost flex line participate in baseline alignment, the flex container’s first/last main-axis baseline set is generated from the shared alignment baseline of those flex items.
This doesn't say anything about requiring the flex items to be participating in first vs. last baseline alignment; just whether they "participate in baseline alignment".
So we probably need to adjust the logic here:
https://searchfox.org/mozilla-central/rev/c0adc2160976e2c118e2e5709d08aac071fddce9/layout/generic/nsFlexContainerFrame.cpp#5257-5262
...to fall back from FirstBaselineOffset()
to the line's LastBaselineOffset()
before we finally give up and fall back to the sentinel value to trigger the first flex item.
Assignee | ||
Comment 1•1 year ago
|
||
Likewise, we should also consider first baseline in the endmost line when
computing flex container last baseline.
Fixed the XXX comment by using logical coordinates. This is necessary to pass
flex-align-baseline-flex-004.html because it tests a vertical-rl flex container.
Updated•1 year ago
|
Comment 4•1 year ago
|
||
bugherder |
Description
•