Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7b1e435b78be41ca145ca0472c93e8914dbb81eb
      
https://github.com/WebKit/WebKit/commit/7b1e435b78be41ca145ca0472c93e8914dbb81eb
  Author: Alan Baradlay <[email protected]>
  Date:   2026-07-29 (Wed, 29 Jul 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexbox-baseline-and-last-baseline-groups-line-size-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexbox-baseline-and-last-baseline-groups-line-size.html
    M Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp

  Log Message:
  -----------
  [Flex] A flex line's cross size mixes the 'baseline' and 'last baseline' 
sharing groups
https://bugs.webkit.org/show_bug.cgi?id=320558

Reviewed by Antti Koivisto.

A flex line is at least as tall as each of its baseline-sharing groups, and a 
group is as tall as its largest
ascent plus its largest descent. align-self: baseline and align-self: last 
baseline align to opposite edges of the
line, so they are two separate groups.

crossSizeForFlexLines kept the two ascents apart but shared one descent between 
them, and each group's total read
that shared value. So a last-baseline item's descent was added to the 
first-baseline group's ascent, and the other
way round, making the line taller than either group really is. It also made the 
result depend on the order the
items appear in, since a descent only reached the other group once it had been 
seen.

Give the last-baseline group its own descent. Both groups now sum the ascent 
and descent of their own members.

Chrome and Firefox both size these lines correctly.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexbox-baseline-and-last-baseline-groups-line-size-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexbox-baseline-and-last-baseline-groups-line-size.html:
 Added.
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::FlexFormattingContext::crossSizeForFlexLines):

Canonical link: https://commits.webkit.org/318165@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to