textWrap property

TextWrapStyle textWrap
final

How the lines the clamp KEEPS are broken (text-wrap-style, css-text-4 6.2): TextWrapStyle.balance or TextWrapStyle.pretty re-break them as Balance and Pretty do, and the ellipsis goes where the last of them ends, which is where it ends greedily.

BLINK BREAKS A CLAMPED PARAGRAPH AS IF IT ENDED AT THE CLAMP. Its ScoreLineBreaker takes the greedy lines up to the paragraph's end or to the clamp, whichever comes first (lines_until_clamp), and re-breaks those alone; the bisecting fallback for balance does the same (ParagraphLineBreaker::AttemptParagraphBalancing). So a clamp the paragraph never reaches leaves it balanced or pretty whole, and one it does reach re-breaks the text of the lines kept over the same count -- balanced where there are at most six (Blink's kMaxLinesForBalance), greedy past that; pretty only where the clamp's line is one word under a third of the room, which a line the clamp cuts in the middle of the text seldom is. A paragraph with a forced break, or a word wider than the room, stays greedy.

Implementation

final TextWrapStyle textWrap;