Bug 260229

Summary: [text-wrap] Support first-line related CSS interactions in text-wrap: balance
Product: WebKit Reporter: David Choi <david_choi5>
Component: Layout and RenderingAssignee: David Choi <david_choi5>
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   

Description David Choi 2023-08-15 16:32:09 PDT
The current implementation of text-wrap: balance does not account for ::first-line styling, text-indent, and white-space-collapse.

Indentation and ::first-line styling are both CSS factors related to the first line of inline content (or, at least in the case of indentation, the first line after a forced line break). There is also the question of whether leading/trailing white space with `white-space-collapse: preserve` should count as content to be balanced. It turns out that we should always trim leading/trailing preserved white space, except if it is leading preserved white space on the first line (or the first line after a forced line break).
Comment 1 Radar WebKit Bug Importer 2023-08-15 16:33:10 PDT
<rdar://problem/113934501>
Comment 2 David Choi 2023-08-16 20:14:15 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16773
Comment 3 EWS 2023-08-17 12:21:24 PDT
Committed 267009@main (d25ec10246e8): <https://commits.webkit.org/267009@main>

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