Use paragraph base direction always for trailing spaces runs.
As per Unicode UAX#9 L1.4, line trailing whitespaces should always have the direction of the paragraph no matter the direction they had before line breaking. To accomplish that, in inline layout algorithm CreateLine, when an NGInlineItemResult is only trailing spaces, we ignore the bidi level coming from the NGInlineItem, and just use the base direction of the line. This should fix the case of an LTR line with trailing space and pre-wrap in an RTL line that would end up putting the trailing space to the right of the last LTR line instead of to the left of the line. This fixes css/css-text/white-space/eol-spaces-bidi-002.html with width of 7 characters. It is still not fixing the case for 8 characters. Bug: 316409, 1142926 Change-Id: Iab220f79ba0b2526fd51d5341363cc8e9087e133 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2505486 Commit-Queue: José Dapena Paz <jdapena@igalia.com> Reviewed-by:Javier Fernandez <jfernandez@igalia.com> Reviewed-by:
Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#824804}
Showing
Please register or sign in to comment