Bug 193002

Summary: Unprefix -webkit-hyphens
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: TextAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: bfulgham, graouts, ishida, kai.hollberg, mmaxfield, sierkb, the.bull, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 193003    
Bug Blocks: 217522    

Description Myles C. Maxfield 2018-12-21 19:54:31 PST
There are 2 things stopping us:

1) CSS-Text-3 says "The UA must therefore only automatically hyphenate text for which the content language is known and for which it has an appropriate hyphenation resource."

Currently, if the content isn't language-tagged, we'll use the system's locale, contrary to the spec

2) CSS-Text-3 says: "When shaping scripts such as Arabic are allowed to break within words due to hyphenation, the characters must still be shaped as if the word were not broken  "

We shape text as if the hyphen is the end of the line, meaning the last glyph gets put into its final form, rather than its medial form. Instead, we should shape the entire word, and chop the shaped word in the middle.
Comment 1 Radar WebKit Bug Importer 2021-12-06 15:56:31 PST
Comment 2 r12a 2021-12-09 03:56:05 PST
Fwiw, Arabic language text doesn't normally hyphenate at all.  

If the Arabic script is used to write Uighur language text, however, hyphenation is used, and the shaping is needed.  Note also that the 'hyphen' itself looks like and probably is U+0640 ARABIC TATWEEL, separated from the preceding characters by a small space.

For examples, see https://r12a.github.io/scripts/arabic/images_ug/large/shanjak_kizti_may11_2002_lr.jpg
Comment 3 r12a 2021-12-09 04:01:11 PST
Is using the system locale something you want to change in the spec, or do you want to conform to the current spec?  It seems to me that using the system locale could be problematic if someone who normally works in a language such as Uighur (or numerous others that use special characters or placement of 'hyphens', or no hyphenation, like Arabic) opens a page in English that doesn't have the language information set.  They'll see some odd effects where the English text is hyphenated.
Comment 4 Myles C. Maxfield 2021-12-09 11:02:41 PST
Re:system locale - I don’t have sufficient evidence that the spec should change. We had concerns about web compat, because lots of web content is not language tagged (so this change would break that content), but I believe all other browsers follow the spec. We should at least try to change WebKit to match the spec and see if it causes breakage.
Comment 5 Antoine Quint 2022-03-08 08:47:11 PST
Ideally this would add animation support for this property in CSSPropertyAnimation. See the many uses of DiscretePropertyWrapper, this will likely be a one-liner.
Comment 6 Sam Sneddon [:gsnedders] 2023-07-05 04:01:29 PDT

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