Closed Bug 1819025 Opened 3 years ago Closed 3 years ago

Zero-width joiners should not affect CSS white-space processing (collapsing/trimmng of space)

Categories

(Core :: Layout: Text and Fonts, defect)

Firefox 109
defect

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(2 files)

Spun off from bug 1817862 comment 3:

The presence of ZWJ (or ZWNJ) at the beginning or end of a word (e.g. as sometimes used to force joining forms of Arabic letters) should not have any effect on the CSS white-space processing of the surrounding spaces.

Testcase: https://codepen.io/jfkthame/pen/XWPNVPP

Here, the lines with 200c and 200d (ZWNJ and ZWJ) incorrectly show a leading space; and the first paragraph (with width:min-content) shows an unwanted leading space, a double space between "is" and "a", and excessive width of the frame.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

These both fail with current mozilla-central, but pass once the patch here is applied.
They pass as expected in Safari.
Test 001 also passes in Chrome; 002 fails because of an apparent min-width calculation error
resulting in different wrapping.

Depends on D171061

Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fad4426b7b0b Don't consider following join-controls when determining whether a space is collapsible. r=emilio https://hg.mozilla.org/integration/autoland/rev/655b861eeef0 Add a couple of WPT reftests for joiners vs white-space processing. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/38736 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: