[wpt-sync] Sync PR 31872 - Ignore control characters even if we reached the first character
Categories
(Core :: Layout: Text and Fonts, task, P4)
Tracking
()
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 31872 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/31872
Details from upstream follow.
Javier Fernández García-Boente <jfernandez@igalia.com> wrote:
Ignore control characters even if we reached the first character
When reusing text from previous layout, we should ignore control items
added there to force line-breaks after leading space sequences. We've
implemented this logic in r944940 and r945572, but it seems these
changes haven't fixed the issue 1275383.The problem in our code to detect the issue with the test case attached
in the mentioned bug was that we were not considering that the space,
followed by the control break, could could be just after the first
character. As commented in the previously mentioned CLs, removing the
forced break after that first character, would cause the leading space
in the next line to become a regular space; in this new scenario the
control item doesn't make sense. Since there is no previous space in
the first line we reach the first position of the string without
finding the new line character that motivated the insertion of such
control item.This CL just removes the condition of index being non-zero, which
assumed there were previous space sequences before the line-break.Bug: 1275383, 1263567
Change-Id: Ib9476bde3c0f6fc6a1f95749c044106d28b2797d
Reviewed-on: https://chromium-review.googlesource.com/3311034
WPT-Export-Revision: ba03ab27b0f86a2395448580394486e524304b25
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Description
•