Bug 232191 - [LFC][IFC] Breaking before hyphen is only allowed when line-break is loose
Summary: [LFC][IFC] Breaking before hyphen is only allowed when line-break is loose
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-22 18:50 PDT by zalan
Modified: 2021-10-24 06:55 PDT (History)
10 users (show)

See Also:


Attachments
Patch (6.41 KB, patch)
2021-10-22 20:34 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2021-10-22 18:50:48 PDT
The following breaks are allowed for loose line breaking if the preceding character belongs to the Unicode line breaking class ID [UAX14] (including when the preceding character is treated as ID due to word-break: break-all), and are otherwise forbidden:
breaks before hyphens:
‐ U+2010, – U+2013

https://drafts.csswg.org/css-text-3/#line-break-property
Comment 1 zalan 2021-10-22 20:34:22 PDT
Created attachment 442245 [details]
Patch
Comment 2 EWS 2021-10-23 08:54:13 PDT
Committed r284744 (243453@main): <https://commits.webkit.org/243453@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 442245 [details].
Comment 3 Radar WebKit Bug Importer 2021-10-23 08:55:17 PDT
<rdar://problem/84580370>
Comment 4 Darin Adler 2021-10-23 09:11:49 PDT
Comment on attachment 442245 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=442245&action=review

> Source/WTF/wtf/unicode/CharacterNames.h:64
> +constexpr UChar endash = 0x2013;

Typically we try to exactly follow the naming scheme from Unicode here, which I think would be enDash, two words.
Comment 5 zalan 2021-10-23 09:28:46 PDT
(In reply to Darin Adler from comment #4)
> Comment on attachment 442245 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=442245&action=review
> 
> > Source/WTF/wtf/unicode/CharacterNames.h:64
> > +constexpr UChar endash = 0x2013;
> 
> Typically we try to exactly follow the naming scheme from Unicode here,
> which I think would be enDash, two words.
Makes sense. Will change it. I was using the postscript name endash, see at  https://www.compart.com/en/unicode/U+2013