Prevent break opportunity offset to surpass the item's range_end
When exploring breaking opportunities we were early return, and shaping to the end, when we detected that current candidate overflow and next breaking opportunity surpass the item's range end. However, since we landed in r807457 the new TextBreakIterator's behavior of breaking always after the space run, we can get some opportunities that surpass the item's range_end even if the candidate doesn't overflow. An example of this could be when trailing spaces are located in different items. This patch ensures that even when the candidate doesn't overflow, we never consider breaking opportunity offsets that surpass the item's range end; since we are not overflowing, we'll proceed with the shaping logic considering range_end as maximum of the breaking opportunity offset. Bug: 1128571 Change-Id: I704eb8091cdca00713fed15e22749bb633bacc71 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2414196 Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Reviewed-by:Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#808007}
Showing
Please register or sign in to comment