Closed Bug 1675467 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 26410 - Use paragraph base direction always for trailing spaces runs.

Categories

(Core :: Layout: Text and Fonts, task, P4)

task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 26410 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/26410
Details from upstream follow.

b'Javier Fernandez <jfernandez@igalia.com>' wrote:

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/2505486
WPT-Export-Revision: 6005a8e796e8562bf96617632d07981f9a141db8

Component: web-platform-tests → Layout: Text and Fonts
Product: Testing → Core

CI Results

Ran 14 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests

Status Summary

Firefox

PASS: 1

Chrome

FAIL: 1

Safari

PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c984283373c6 [wpt PR 26410] - Use paragraph base direction always for trailing spaces runs., a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.