Bug 260229 - [text-wrap] Support first-line related CSS interactions in text-wrap: balance
Summary: [text-wrap] Support first-line related CSS interactions in text-wrap: balance
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: David Choi
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-15 16:32 PDT by David Choi
Modified: 2023-08-17 12:21 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 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.