Bug 197411 - [css-text] word-break: break-all must honor line breaking behavior introduced by characters with the GL character class
Summary: [css-text] word-break: break-all must honor line breaking behavior introduced...
Status: RESOLVED DUPLICATE of bug 235266
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-30 05:44 PDT by Javier Fernandez
Modified: 2022-01-17 09:45 PST (History)
4 users (show)

See Also:


Attachments
Test case to reproduce the issue (172 bytes, text/html)
2019-04-30 05:44 PDT, Javier Fernandez
no flags Details
Actual result (1.03 KB, image/png)
2019-04-30 05:47 PDT, Javier Fernandez
no flags Details
Expected result (1.05 KB, image/png)
2019-04-30 05:48 PDT, Javier Fernandez
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Javier Fernandez 2019-04-30 05:44:18 PDT
Created attachment 368552 [details]
Test case to reproduce the issue

What steps will reproduce the problem?
(1) Load the attached test case

What is the expected result?

The line is broken before the last letter 'X' "XXX|X&nbspXX|XX X|X" (see expected.png)

What happens instead?

The line is broken before the last letter 'X', "non-breakable" space character "XXXX|&nbspXXX|X X |X" (see actual.png)
Comment 1 Javier Fernandez 2019-04-30 05:47:55 PDT
Created attachment 368553 [details]
Actual result
Comment 2 Javier Fernandez 2019-04-30 05:48:16 PDT
Created attachment 368554 [details]
Expected result
Comment 3 Javier Fernandez 2019-04-30 05:54:33 PDT
As it happened in the case reported in bug #197409, Firefox seems to implement the same behavior than us (I guess it has the same bug). 

However, Chrome and Edge implements what I think is the expected behavior, according to the CSS Text 3 specification:

https://drafts.csswg.org/css-text-3/#line-break-details

"Except where explicitly defined otherwise (e.g. for line-break: anywhere or overflow-wrap: anywhere) line breaking behavior defined for the WJ, ZW, GL, and ZWJ line-breaking classes in [UAX14] must be honored. "
Comment 4 Jameela Huq 2021-03-02 16:03:42 PST
In relation to this issue, Chrome and Firefox both break on Japanese periods and commas when "keep-all" is applied: e.g. In the sentence "情報も、スキルも、つながりも。あなたの仕事と未来を支えるSNS。" Chrome and Safari will break here [、。] however, on Safari, it will not break at all, which is very frustrating because "keep-all" is one of the few, reliable ways I have to break Japanese sentences appropriately   at the moment.
Comment 5 Arcady Goldmints-Orlov 2022-01-17 09:45:20 PST
This has been fixed by r288070 allowing LFC integration to work with the complex text path.

*** This bug has been marked as a duplicate of bug 235266 ***