Sync web-platform-tests PR 20708 into mozilla-central (this bug is closed when the sync is complete).
[LayoutNG] Fix hyphens when rewinding occurs
This is a re-land of:
The original patch caused a regression and was reverted for
crbug.com/1028817. A test was added for the case at:
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
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