Bug 256937

Summary: [css-flexbox][baseline-alignment] Flex item's with different writing mode from flex container should not always synthesize a baseline
Product: WebKit Reporter: Sammy Gill <sgill26>
Component: Layout and RenderingAssignee: Sammy Gill <sgill26>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://github.com/web-platform-tests/wpt/pull/40153
Attachments:
Description Flags
Testcase none

Description Sammy Gill 2023-05-17 17:53:09 PDT
Created attachment 466390 [details]
Testcase

Flex layout will call into a flex item's firstLineBaseline/lastLineBaseline in order to compute an ascent for the item to use in baseline alignment. If the flex item has a different writing mode from the flex container then it will return std::nullopt because of the check for isWritingModeRoot() and as a result will have a baseline synthesized. In the attached test case (reduced from css-flexbox/alignment/flex-align-baseline-001.html) we should still be able to compute baseline values for the flex items since the block axis for the items is parallel to the alignment context.
Comment 1 Radar WebKit Bug Importer 2023-05-17 17:53:32 PDT
<rdar://problem/109489182>
Comment 2 Sammy Gill 2023-05-19 15:38:02 PDT
Pull request: https://github.com/WebKit/WebKit/pull/14108
Comment 3 Sammy Gill 2023-05-22 21:50:09 PDT
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/40153
Comment 4 EWS 2023-05-23 10:18:58 PDT
Committed 264423@main (2c62617577b6): <https://commits.webkit.org/264423@main>

Reviewed commits have been landed. Closing PR #14108 and removing active labels.
Comment 5 Sammy Gill 2023-12-20 14:50:08 PST
*** Bug 247640 has been marked as a duplicate of this bug. ***