[text-box-trim] Support when the last line is empty
Normally, empty lines can exist only in an empty inline
formatting context. But there are some rare cases where empty
lines can exist in non-empty inline formatting context. When
such empty lines are at the end of the inline formatting
context, RelayoutForTextBoxTrimEnd()
needs to let
InlineLayoutAlgorithm
know whether the line is the last
non-empty line or not.
This patch adds ShouldForceTextBoxTrimEnd()
to communicate
that information from BlockLayoutAlgorithm
to
InlineLayoutAlgorithm
.
Bug: 40254880
Change-Id: Ia440325c502db0dcc3c8f248cc3c7ec3588f7fd7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5568835
Auto-Submit: Koji Ishii kojii@chromium.org
Commit-Queue: Koji Ishii kojii@chromium.org
Reviewed-by: Kent Tamura tkent@chromium.org
Reviewed-by: Lingqi Chi lingqi@chromium.org
Cr-Commit-Position: refs/heads/main@{#1306386}