Bug 260087 - [css-flex][baseline-alignment] Use writing-mode end most flex line when determining last baseline of row nowrap flexboxes
Summary: [css-flex][baseline-alignment] Use writing-mode end most flex line when deter...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-11 14:11 PDT by Sammy Gill
Modified: 2023-08-11 14:11 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sammy Gill 2023-08-11 14:11:31 PDT
In order for a flex container to itself participate in baseline alignment (e.g. when the flex container is itself a flex item in an outer flex container), it needs to submit the position of the baselines that will best represent its contents. To this end, the baselines of a flex container are determined as follows (after reordering with order, and taking flex-direction into account):

first/last main-axis baseline set
When the inline axis of the flex container matches its main axis, its baselines are determined as follows:
1.) 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.
2.) Otherwise, if the flex container has at least one flex item, the flex container’s first/last main-axis baseline set is generated from the alignment baseline of the startmost/endmost flex item. (If that item has no alignment baseline parallel to the flex container’s main axis, then one is first synthesized from its border edges.)
3.) Otherwise, the flex container has no first/last main-axis baseline set, and one is synthesized if needed according to the rules of its alignment context.

first/last cross-axis baseline set
When the inline axis of the flex container matches its cross axis, its baselines are determined as follows:
1.) If the flex container has at least one flex item, the flex container’s first/last cross-axis baseline set is generated from the alignment baseline of the startmost/endmost flex item. (If that item has no alignment baseline parallel to the flex container’s cross axis, then one is first synthesized from its border edges.)
2.) Otherwise, the flex container has no first/last cross-axis baseline set, and one is synthesized if needed according to the rules of its alignment context.
Comment 1 Radar WebKit Bug Importer 2023-08-11 14:11:50 PDT
<rdar://problem/113770317>