Bug 1840796 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

We fail 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, which happens to be **last** baseline aligned.

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.
We fail 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.)

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.
We fail 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.
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.

Back to Bug 1840796 Comment 0