Closed Bug 1703213 Opened 5 years ago Closed 5 years ago

Firefox layout is different from other browsers if there are IDEOGRAPHIC SPACE (U+3000)

Categories

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

Desktop
Windows 10
defect

Tracking

()

VERIFIED FIXED
89 Branch
Tracking Status
firefox89 --- verified

People

(Reporter: alice0775, Assigned: jfkthame)

References

Details

(Keywords: nightly-community, parity-chrome)

Attachments

(3 files)

Attached file IDEOGRAPHIC_SPACE.html

Steps to reproduce:

  1. Open https://www.city.daito.lg.jp/site/covid-19/23963.html
    or attached testcase

Actual results:
Firefox layout is different from other browsers

Regression window:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=4e3362864fbd&tochange=264f0a7a878c

Suspect: Bug 765166

Attached image screenshot

I think the primary issue here is that Gecko treats U+3000 like a generic ideographic character, allowing a line-break before or after it, whereas the other browsers only allow a break after it (and not within a sequence of multiple U+3000 characters).

A reduced testcase that shows this, even for single U+3000 characters:

data:text/html;charset=utf-8,<div style="background:yellow;width: 3.5em">%E3%80%87%E3%80%80%E3%80%87%E3%80%80%E3%80%87%E3%80%80%E3%80%87

This renders differently for me in each of Safari, Chrome and Firefox.

There was some discussion related to this in https://github.com/w3c/csswg-drafts/issues/2500.

This should be superseded by the Unified Segmenter work and migration to a more UAX14-based line-breaker in the fairly near future. Still, I think it's worth applying a simple fix for now in our existing line-break implementation, to improve compatibility here (and it turns out to fix a whole bunch of currently-failing WPT tests).

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dab1af643107 Disallow soft line break between adjacent IDEOGRAPHIC SPACE characters. r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch

I verified fix in Nightly89.0a1(20210408215439).

Status: RESOLVED → VERIFIED
Duplicate of this bug: 1597534
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: