Fix max preferred width for LayoutText when break-all
This patch fixes max preferred width for LayoutText when break-all
preferred width ("word-break: break-all" or "word-break: break-word")
is used.
The problem only appears when the sum of character widths is not equal
to the word width. However, when the sum is larger (e.g., kerning,) the
difference is hardly noticeable.
Also an optimization in LayoutText::width() hides the problem when
!preserveNewline(), so it is visible only when "white-space: pre-wrap"
or "white-space: pre-line".
BUG=
655590
Committed:
https://crrev.com/715e724f5eb62b3517f093cadf5716e0fb3040ea
Cr-Commit-Position: refs/heads/master@{#426946}