Bug
1693544 [wpt PR 27677] - Consider the hyhen size in the available width when evaluating overflow, a=testonly
Automatic update from web-platform-tests
Consider the hyhen size in the available width when evaluating overflow
The logic in NGLineBreaker::BreakText completes the algorithm by
evaluating whether the NGInlineItem inline size fits in the available
width, received in the function argument "available_width".
However, when hyphenation is applied, we reduce this initial available
width, subtracting the hyphen inline size, and run another iteration of
the ShapeLine() function. The new item's inline size is evaluated again
to check whether it overflows or not.
The root case of the issue described in the bug is that we are using
the value stored in the available_width variable, which we've just
reduced because of hyphenation. We should use the
available_width_with_hyphens variable instead.
Bug:
1175716
Change-Id: I3ecac2362f7cf9951cd0d323a7b163385d240f89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
2704079
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#855647}
--
wpt-commits:
7550407f4cfcf8368f12858ad0e9800887c8ee22
wpt-pr: 27677