mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 02:40:22 -10:00
Automatic update from web-platform-tests [LayoutNG] Fix hyphens when rewinding occurs This is a re-land of: https://chromium-review.googlesource.com/c/chromium/src/+/1868534 The original patch caused a regression and was reverted for crbug.com/1028817. A test was added for the case at: https://chromium-review.googlesource.com/c/chromium/src/+/1941451 The problem happened when |HandleOverflow| tried to break a text item but it didn't fit. |NGLineBreaker| looks for previous opportunities and rewind, but items it tried to break were modified, which confused |NGLineBreaker|. The old patch stopped rewinding there. The new approach is to restore the original item when it failed to break so that it can always see the original items. :: The original description follows :: This patch removes |NGLineInfo::LineEndFragment|, which was introduced to support hyphens and ellipsis with the single code. However, ellipsis was changed to use different code, and |LineEndFragment| ended up with non-optimal way to handle hyphens. Although hyphens appear at most once in a line, storing this to |NGLineInfo| makes harder to keep it in sync with the hyphenated item. This patch changes it to a field in |NGInlineItemResult|. Bug: 1015297 Change-Id: I1dab0dacd8445ed563527bdc90d58b18470725f1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1943784 Reviewed-by: Ian Kilpatrick <[email protected]> Commit-Queue: Koji Ishii <[email protected]> Cr-Commit-Position: refs/heads/master@{#723458} -- wpt-commits: 5297717c66073692f003d0cbb780594c07df6190 wpt-pr: 20708