Bug 193002 - Unprefix -webkit-hyphens
Summary: Unprefix -webkit-hyphens
Status: RESOLVED DUPLICATE of bug 243670
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 193003
Blocks: 217522
  Show dependency treegraph
 
Reported: 2018-12-21 19:54 PST by Myles C. Maxfield
Modified: 2023-07-05 04:01 PDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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
<rdar://problem/86128104>
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 ***