Bug 261244 - [css-grid] grid should not always put first and last baseline aligned items into different alignment contexts
Summary: [css-grid] grid should not always put first and last baseline aligned items i...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sammy Gill
URL:
Keywords: InRadar
Depends on:
Blocks: 260570
  Show dependency treegraph
 
Reported: 2023-09-06 17:01 PDT by Sammy Gill
Modified: 2023-09-12 15:13 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-09-06 17:01:27 PDT
Currently grid computes the alignment context for first/last baseline aligned items as follows:

auto spanForBaselineAlignment = align == ItemPosition::Baseline ? span.startLine() : span.endLine()

This is not correct because items that are in the same track with different baseline alignments are technically in the same alignment context. As a result, items in the same alignment context can be in the same baseline sharing group is their baseline alignment preferences are compatible

https://drafts.csswg.org/css-align-3/#baseline-terms
Comment 1 Radar WebKit Bug Importer 2023-09-06 17:01:42 PDT
<rdar://problem/115083708>
Comment 2 Sammy Gill 2023-09-06 17:17:31 PDT
Pull request: https://github.com/WebKit/WebKit/pull/17517
Comment 3 EWS 2023-09-12 15:13:30 PDT
Committed 267922@main (caab01d5e748): <https://commits.webkit.org/267922@main>

Reviewed commits have been landed. Closing PR #17517 and removing active labels.