Skip to content

Commit

Permalink
Bug 1731541 - When line-clamp is in effect, make text-wrap:balance co…
Browse files Browse the repository at this point in the history
…nsider only the lines up to the clamp limit. r=emilio

This corresponds to how Chrome behaves, and passes the test they included in WPT.

It's unclear to me whether this behavior actually follows from the current spec
(see w3c/csswg-drafts#9310), but it seems to be the desired
result.

(I've put it behind a (default-enabled) pref for now, so that it's possible to
experiment with the two possible interpretations, but we can remove the pref once
the spec question is clarified/confirmed.)

This patch also disables balancing for fragmented/overflowing blocks, as that will
not currently work well. We may want to address that as a followup issue (though it
won't matter to the primary balance use-cases such as titles).

Depends on D188139

Differential Revision: https://phabricator.services.mozilla.com/D188220

UltraBlame original commit: 8c9ba927121cd7f1cb5b31ffb86addc4c34b59a8
  • Loading branch information
marco-c committed Oct 1, 2023
1 parent df8bfb5 commit 4e8bbd8
Show file tree
Hide file tree
Showing 3 changed files with 355 additions and 53 deletions.
Loading

0 comments on commit 4e8bbd8

Please sign in to comment.